diff options
Diffstat (limited to 'arch/arm/kernel/ptrace.c')
-rw-r--r-- | arch/arm/kernel/ptrace.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 688a0a9..5700a7a 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c @@ -24,6 +24,7 @@ #include <linux/hw_breakpoint.h> #include <linux/regset.h> #include <linux/audit.h> +#include <linux/tracehook.h> #include <linux/unistd.h> #include <asm/pgtable.h> @@ -921,8 +922,6 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) scno = __NR_restart_syscall - __NR_SYSCALL_BASE; if (!test_thread_flag(TIF_SYSCALL_TRACE)) return scno; - if (!(current->ptrace & PT_PTRACED)) - return scno; current_thread_info()->syscall = scno; @@ -932,7 +931,12 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) */ ip = regs->ARM_ip; regs->ARM_ip = why; - ptrace_report_syscall(regs); + + if (why) + tracehook_report_syscall_exit(regs, 0); + else if (tracehook_report_syscall_entry(regs)) + current_thread_info()->syscall = -1; + regs->ARM_ip = ip; return current_thread_info()->syscall; |