aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2021-05-18 12:13:02 -0700
committerThomas Gleixner <tglx@linutronix.de>2021-05-20 15:19:49 +0200
commitb337b4965e3a3e567f11828a9e3fe3fb3faefa47 (patch)
treea4c91b73913de17052f31c4335939dcc04a5ee80 /tools/perf/scripts/python/stackcollapse.py
parent0595494891723a1dcca5eaa8eeca8ab54ad953b9 (diff)
x86/entry: Treat out of range and gap system calls the same
The current 64-bit system call entry code treats out-of-range system calls differently than system calls that map to a hole in the system call table. This is visible to the user if system calls are intercepted via ptrace or seccomp and the return value (regs->ax) is modified: in the former case, the return value is preserved, and in the latter case, sys_ni_syscall() is called and the return value is forced to -ENOSYS. The API spec in <asm-generic/syscalls.h> is very clear that only (int)-1 is the non-system-call sentinel value, so make the system call behavior consistent by calling sys_ni_syscall() for all invalid system call numbers except for -1. Although currently sys_ni_syscall() simply returns -ENOSYS, calling it explicitly is friendly for tracing and future possible extensions, and as this is an error path there is no reason to optimize it. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20210518191303.4135296-6-hpa@zytor.com
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions