lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1476182576-15247-5-git-send-email-marcin.nowakowski@imgtec.com>
Date:   Tue, 11 Oct 2016 12:42:49 +0200
From:   Marcin Nowakowski <marcin.nowakowski@...tec.com>
To:     <linux-kernel@...r.kernel.org>
CC:     <linux-api@...r.kernel.org>, <luto@...capital.net>,
        <rostedt@...dmis.org>,
        Marcin Nowakowski <marcin.nowakowski@...tec.com>,
        Ingo Molnar <mingo@...hat.com>
Subject: [PATCH v3 04/11] syscall/tracing: allow arch to override syscall_get_nr for ftrace

Some architectures modify syscall numbers to indicate ABI used
and as a result syscall number as returned by syscall_get_nr
does not correspond to the syscall number used inside the kernel.
Allow an arch to provide a separate implementation for ftrace
that returns the 'real' syscall number from the regs provided.

This will be used by x86 in a follow-up change.

Signed-off-by: Marcin Nowakowski <marcin.nowakowski@...tec.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Ingo Molnar <mingo@...hat.com>
---
 kernel/trace/trace_syscalls.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index 409f83e..0ab9b90 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -74,7 +74,11 @@ static inline bool trace_is_compat_syscall(struct pt_regs *regs)
 static inline int
 trace_get_syscall_nr(struct task_struct *task, struct pt_regs *regs)
 {
+#ifdef arch_trace_syscall_get_nr
+	return arch_trace_syscall_get_nr(task, regs);
+#else
 	return syscall_get_nr(task, regs);
+#endif
 }
 
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ