From: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
To: <linux-kernel@vger.kernel.org>
Cc: <linux-api@vger.kernel.org>, <luto@amacapital.net>,
<rostedt@goodmis.org>,
Marcin Nowakowski <marcin.nowakowski@imgtec.com>,
Ingo Molnar <mingo@redhat.com>
Subject: [PATCH v3 04/11] syscall/tracing: allow arch to override syscall_get_nr for ftrace
Date: Tue, 11 Oct 2016 12:42:49 +0200 [thread overview]
Message-ID: <1476182576-15247-5-git-send-email-marcin.nowakowski@imgtec.com> (raw)
In-Reply-To: <1476182576-15247-1-git-send-email-marcin.nowakowski@imgtec.com>
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@imgtec.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.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
next prev parent reply other threads:[~2016-10-11 10:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-11 10:42 [PATCH v3 00/11] syscall/tracing: compat syscall support Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 01/11] tracing/syscalls: remove syscall_nr from syscall metadata Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 02/11] tracing/syscalls: add handling for compat tasks Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 03/11] tracing/syscalls: add compat syscall metadata Marcin Nowakowski
2016-10-12 8:50 ` Michael Ellerman
2016-10-12 13:09 ` Marcin Nowakowski
2016-10-13 9:33 ` Michael Ellerman
2016-10-11 10:42 ` Marcin Nowakowski [this message]
2016-10-11 10:42 ` [PATCH v3 05/11] x86/tracing: fix compat syscall handling Marcin Nowakowski
2016-10-12 13:53 ` Thomas Gleixner
2016-10-13 6:32 ` Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 06/11] s390/tracing: " Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 07/11] arm64/tracing: " Marcin Nowakowski
2016-10-11 13:36 ` Will Deacon
2016-10-12 7:07 ` Marcin Nowakowski
2016-10-12 10:04 ` Will Deacon
2016-10-11 10:42 ` [PATCH v3 08/11] powerpc/tracing: " Marcin Nowakowski
2016-10-12 9:59 ` Michael Ellerman
2016-10-12 13:10 ` Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 09/11] tile/tracing: " Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 10/11] sparc/tracing: " Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 11/11] parisc/tracing: " Marcin Nowakowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1476182576-15247-5-git-send-email-marcin.nowakowski@imgtec.com \
--to=marcin.nowakowski@imgtec.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®