summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/ptrace.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-26 12:11:17 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-26 12:11:17 -0700
commit6ddb4518c7af7b03fa322552d794f759cd5c26fa (patch)
tree4560d1425733243520c97aade1d69c6739b13b11 /arch/powerpc/kernel/ptrace.c
parentbe93d8cfbae1996052e91b2883d306a5d9d0fe18 (diff)
parent3fb7933850faf1017c59a675e895ed8f27fef4be (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/4xx: Adding PCIe MSI support powerpc: Fix irq_free_virt by adjusting bounds before loop powerpc/irq: Protect irq_radix_revmap_lookup against irq_free_virt powerpc/irq: Check desc in handle_one_irq and expand generic_handle_irq powerpc/irq: Always free duplicate IRQ_LEGACY hosts powerpc/irq: Remove stale and misleading comment powerpc/cell: Rename ipi functions to match current abstractions powerpc/cell: Use common smp ipi actions Remove unused MSG_ flags in linux/smp.h powerpc/pseries: Update MAX_HCALL_OPCODE to reflect page coalescing powerpc/oprofile: Handle events that raise an exception without overflowing powerpc/ftrace: Implement raw syscall tracepoints on PowerPC
Diffstat (limited to 'arch/powerpc/kernel/ptrace.c')
-rw-r--r--arch/powerpc/kernel/ptrace.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index a6ae1cfad86..cb22024f2b4 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -29,6 +29,7 @@
#include <linux/signal.h>
#include <linux/seccomp.h>
#include <linux/audit.h>
+#include <trace/syscall.h>
#ifdef CONFIG_PPC32
#include <linux/module.h>
#endif
@@ -40,6 +41,9 @@
#include <asm/pgtable.h>
#include <asm/system.h>
+#define CREATE_TRACE_POINTS
+#include <trace/events/syscalls.h>
+
/*
* The parameter save area on the stack is used to store arguments being passed
* to callee function and is located at fixed offset from stack pointer.
@@ -1710,6 +1714,9 @@ long do_syscall_trace_enter(struct pt_regs *regs)
*/
ret = -1L;
+ if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
+ trace_sys_enter(regs, regs->gpr[0]);
+
if (unlikely(current->audit_context)) {
#ifdef CONFIG_PPC64
if (!is_32bit_task())
@@ -1738,6 +1745,9 @@ void do_syscall_trace_leave(struct pt_regs *regs)
audit_syscall_exit((regs->ccr&0x10000000)?AUDITSC_FAILURE:AUDITSC_SUCCESS,
regs->result);
+ if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
+ trace_sys_exit(regs, regs->result);
+
step = test_thread_flag(TIF_SINGLESTEP);
if (step || test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(regs, step);