diff options
Diffstat (limited to 'arch/sh/kernel/ptrace_32.c')
-rw-r--r-- | arch/sh/kernel/ptrace_32.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index 3392e835a37..c198eceaee9 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c | |||
@@ -34,6 +34,8 @@ | |||
34 | #include <asm/syscalls.h> | 34 | #include <asm/syscalls.h> |
35 | #include <asm/fpu.h> | 35 | #include <asm/fpu.h> |
36 | 36 | ||
37 | #include <trace/syscall.h> | ||
38 | |||
37 | /* | 39 | /* |
38 | * This routine will get a word off of the process kernel stack. | 40 | * This routine will get a word off of the process kernel stack. |
39 | */ | 41 | */ |
@@ -459,6 +461,9 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
459 | */ | 461 | */ |
460 | ret = -1L; | 462 | ret = -1L; |
461 | 463 | ||
464 | if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE))) | ||
465 | ftrace_syscall_enter(regs); | ||
466 | |||
462 | if (unlikely(current->audit_context)) | 467 | if (unlikely(current->audit_context)) |
463 | audit_syscall_entry(audit_arch(), regs->regs[3], | 468 | audit_syscall_entry(audit_arch(), regs->regs[3], |
464 | regs->regs[4], regs->regs[5], | 469 | regs->regs[4], regs->regs[5], |
@@ -475,6 +480,9 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) | |||
475 | audit_syscall_exit(AUDITSC_RESULT(regs->regs[0]), | 480 | audit_syscall_exit(AUDITSC_RESULT(regs->regs[0]), |
476 | regs->regs[0]); | 481 | regs->regs[0]); |
477 | 482 | ||
483 | if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE))) | ||
484 | ftrace_syscall_exit(regs); | ||
485 | |||
478 | step = test_thread_flag(TIF_SINGLESTEP); | 486 | step = test_thread_flag(TIF_SINGLESTEP); |
479 | if (step || test_thread_flag(TIF_SYSCALL_TRACE)) | 487 | if (step || test_thread_flag(TIF_SYSCALL_TRACE)) |
480 | tracehook_report_syscall_exit(regs, step); | 488 | tracehook_report_syscall_exit(regs, step); |