diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-27 03:13:13 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-27 17:33:14 -0700 |
commit | 1c133b4b3d58bf88293eeea0d9d090777333bf48 (patch) | |
tree | b26171abee538e13443ba4470aecc18433afd08a /arch/sparc/kernel/ptrace.c | |
parent | 768225868c16d882f7a38a11027945284dc9f49e (diff) |
sparc: Use tracehook routines in syscall_trace().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/ptrace.c')
-rw-r--r-- | arch/sparc/kernel/ptrace.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index 81f3b929743f..20699c701412 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c @@ -21,6 +21,7 @@ #include <linux/signal.h> #include <linux/regset.h> #include <linux/elf.h> +#include <linux/tracehook.h> #include <asm/pgtable.h> #include <asm/system.h> @@ -450,21 +451,16 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) return ret; } -asmlinkage void syscall_trace(void) +asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p) { - if (!test_thread_flag(TIF_SYSCALL_TRACE)) - return; - if (!(current->ptrace & PT_PTRACED)) - return; - ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) - ? 0x80 : 0)); - /* - * this isn't the same as continuing with a signal, but it will do - * for normal use. strace only continues with a signal if the - * stopping signal is not SIGTRAP. -brl - */ - if (current->exit_code) { - send_sig (current->exit_code, current, 1); - current->exit_code = 0; + int ret = 0; + + if (test_thread_flag(TIF_SYSCALL_TRACE)) { + if (syscall_exit_p) + tracehook_report_syscall_exit(regs, 0); + else + ret = tracehook_report_syscall_entry(regs); } + + return ret; } |