]> git.baikalelectronics.ru Git - kernel.git/commit
x86/regs: Syscall_get_nr() returns -1 for a non-system call
authorH. Peter Anvin <hpa@zytor.com>
Mon, 10 May 2021 18:53:15 +0000 (11:53 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 12 May 2021 08:49:15 +0000 (10:49 +0200)
commitd8a8a07595ef676bcf6a45f4527c1159adb1b2cc
treeae07eba26f7bdc1a6cf308b192200cae77b57bae
parent7438a73920518bd3a8f27e15b895daf78c817f30
x86/regs: Syscall_get_nr() returns -1 for a non-system call

syscall_get_nr() is defined to return -1 for a non-system call or a
ptrace/seccomp restart; not just any arbitrary number. See comment in
<asm-generic/syscall.h> for the official definition of this function.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210510185316.3307264-7-hpa@zytor.com
arch/x86/kernel/ptrace.c
arch/x86/kernel/signal.c