summaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/ptrace.c
diff options
context:
space:
mode:
authorHelge Deller2016-04-13 22:44:54 +0200
committerHelge Deller2016-05-22 21:38:47 +0200
commitfc79168a7c75423047d60a033dc4844955ccae0b (patch)
tree2a2cc2008024f4025965abd54799004176c3dc58 /arch/parisc/kernel/ptrace.c
parentMerge tag 'for-f2fs-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jae... (diff)
downloadkernel-qcow2-linux-fc79168a7c75423047d60a033dc4844955ccae0b.tar.gz
kernel-qcow2-linux-fc79168a7c75423047d60a033dc4844955ccae0b.tar.xz
kernel-qcow2-linux-fc79168a7c75423047d60a033dc4844955ccae0b.zip
parisc: Add syscall tracepoint support
This patch adds support for the TIF_SYSCALL_TRACEPOINT on the parisc architecture. Basically, it calls the appropriate tracepoints on syscall entry and exit. Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel/ptrace.c')
-rw-r--r--arch/parisc/kernel/ptrace.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
index 8fb81a391599..4863761bdbbb 100644
--- a/arch/parisc/kernel/ptrace.c
+++ b/arch/parisc/kernel/ptrace.c
@@ -30,6 +30,9 @@
/* PSW bits we allow the debugger to modify */
#define USER_PSW_BITS (PSW_N | PSW_B | PSW_V | PSW_CB)
+#define CREATE_TRACE_POINTS
+#include <trace/events/syscalls.h>
+
/*
* Called by kernel/ptrace.c when detaching..
*
@@ -283,6 +286,10 @@ long do_syscall_trace_enter(struct pt_regs *regs)
regs->gr[20] = -1UL;
goto out;
}
+#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
+ if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
+ trace_sys_enter(regs, regs->gr[20]);
+#endif
#ifdef CONFIG_64BIT
if (!is_compat_task())
@@ -311,6 +318,11 @@ void do_syscall_trace_exit(struct pt_regs *regs)
audit_syscall_exit(regs);
+#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
+ if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
+ trace_sys_exit(regs, regs->gr[20]);
+#endif
+
if (stepping || test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(regs, stepping);
}