diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-07 19:05:24 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-03 23:10:17 -0500 |
commit | 2fbd73810f5655e7832be7de4c7a2a3b6c7d43de (patch) | |
tree | dc40b3449f8a1b7537846d4f894d8bc07155bf25 | |
parent | b5c243b323b727f55ef376aee6b06928ccee5552 (diff) | |
download | signal-2fbd73810f5655e7832be7de4c7a2a3b6c7d43de.tar.gz |
cris: don't open-code ptrace_report_syscall()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/cris/arch-v10/kernel/ptrace.c | 19 | ||||
-rw-r--r-- | arch/cris/arch-v32/kernel/ptrace.c | 19 |
2 files changed, 4 insertions, 34 deletions
diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c index bfddfb99401f96..1c130c5042899e 100644 --- a/arch/cris/arch-v10/kernel/ptrace.c +++ b/arch/cris/arch-v10/kernel/ptrace.c @@ -7,7 +7,7 @@ #include <linux/mm.h> #include <linux/smp.h> #include <linux/errno.h> -#include <linux/ptrace.h> +#include <linux/tracehook.h> #include <linux/user.h> #include <linux/signal.h> #include <linux/security.h> @@ -183,20 +183,5 @@ void do_syscall_trace(void) if (!test_thread_flag(TIF_SYSCALL_TRACE)) return; - if (!(current->ptrace & PT_PTRACED)) - return; - - /* the 0x80 provides a way for the tracing parent to distinguish - between a syscall stop and SIGTRAP delivery */ - 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. - */ - if (current->exit_code) { - send_sig(current->exit_code, current, 1); - current->exit_code = 0; - } + ptrace_report_syscall(current_pt_regs()); } diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c index f085229cf870bc..20a5821f1c3211 100644 --- a/arch/cris/arch-v32/kernel/ptrace.c +++ b/arch/cris/arch-v32/kernel/ptrace.c @@ -7,7 +7,7 @@ #include <linux/mm.h> #include <linux/smp.h> #include <linux/errno.h> -#include <linux/ptrace.h> +#include <linux/tracehook.h> #include <linux/user.h> #include <linux/signal.h> #include <linux/security.h> @@ -252,22 +252,7 @@ void do_syscall_trace(void) if (!test_thread_flag(TIF_SYSCALL_TRACE)) return; - if (!(current->ptrace & PT_PTRACED)) - return; - - /* the 0x80 provides a way for the tracing parent to distinguish - between a syscall stop and SIGTRAP delivery */ - 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. - */ - if (current->exit_code) { - send_sig(current->exit_code, current, 1); - current->exit_code = 0; - } + ptrace_report_syscall(current_pt_regs()); } /* Returns the size of an instruction that has a delay slot. */ |