aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syscall.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <[email protected]>2016-11-07 21:26:37 +0000
committerSteven Rostedt (VMware) <[email protected]>2019-04-05 13:26:43 +0000
commitb35f549df1d7520d37ba1e6d4a8d4df6bd52d136 (patch)
treeb7e544da953806a2f4d9b2d0aeb167d0baad3955 /lib/syscall.c
parentcsky: Fix syscall_get_arguments() and syscall_set_arguments() (diff)
downloadkernel-b35f549df1d7520d37ba1e6d4a8d4df6bd52d136.tar.gz
kernel-b35f549df1d7520d37ba1e6d4a8d4df6bd52d136.zip
syscalls: Remove start and number from syscall_get_arguments() args
At Linux Plumbers, Andy Lutomirski approached me and pointed out that the function call syscall_get_arguments() implemented in x86 was horribly written and not optimized for the standard case of passing in 0 and 6 for the starting index and the number of system calls to get. When looking at all the users of this function, I discovered that all instances pass in only 0 and 6 for these arguments. Instead of having this function handle different cases that are never used, simply rewrite it to return the first 6 arguments of a system call. This should help out the performance of tracing system calls by ptrace, ftrace and perf. Link: http://lkml.kernel.org/r/[email protected] Cc: Oleg Nesterov <[email protected]> Cc: Kees Cook <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Dominik Brodowski <[email protected]> Cc: Dave Martin <[email protected]> Cc: "Dmitry V. Levin" <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Paul Burton <[email protected]> # MIPS parts Acked-by: Max Filippov <[email protected]> # For xtensa changes Acked-by: Will Deacon <[email protected]> # For the arm64 bits Reviewed-by: Thomas Gleixner <[email protected]> # for x86 Reviewed-by: Dmitry V. Levin <[email protected]> Reported-by: Andy Lutomirski <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'lib/syscall.c')
-rw-r--r--lib/syscall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/syscall.c b/lib/syscall.c
index e8467e17b9a2..fb328e7ccb08 100644
--- a/lib/syscall.c
+++ b/lib/syscall.c
@@ -27,7 +27,7 @@ static int collect_syscall(struct task_struct *target, struct syscall_info *info
info->data.nr = syscall_get_nr(target, regs);
if (info->data.nr != -1L)
- syscall_get_arguments(target, regs, 0, 6,
+ syscall_get_arguments(target, regs,
(unsigned long *)&info->data.args[0]);
put_task_stack(target);