aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/kernel
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2010-10-22 01:12:34 -0400
committerGreg Ungerer <gerg@uclinux.org>2010-10-22 01:12:34 -0400
commit55f411de484a0136a77d050e877578a60bc2e094 (patch)
treeb40c2feb325eb7558e34f2cc5e4cd7393a1082ad /arch/m68knommu/kernel
parent41a2159b5b662e74a85b4824e3517f2397cc5867 (diff)
m68knommu: convert to using tracehook_report_syscall_*
Break up syscall_trace() into separate entry and exit routines that use tracehook_report_syscall_entry() and tracehook_report_syscall_exit(). Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68knommu/kernel')
-rw-r--r--arch/m68knommu/kernel/ptrace.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c
index a32e2de78295..6fe7c38cd556 100644
--- a/arch/m68knommu/kernel/ptrace.c
+++ b/arch/m68knommu/kernel/ptrace.c
@@ -18,6 +18,7 @@
18#include <linux/ptrace.h> 18#include <linux/ptrace.h>
19#include <linux/user.h> 19#include <linux/user.h>
20#include <linux/signal.h> 20#include <linux/signal.h>
21#include <linux/tracehook.h>
21 22
22#include <asm/uaccess.h> 23#include <asm/uaccess.h>
23#include <asm/page.h> 24#include <asm/page.h>
@@ -241,21 +242,17 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
241 return ret; 242 return ret;
242} 243}
243 244
244asmlinkage void syscall_trace(void) 245asmlinkage int syscall_trace_enter(void)
245{ 246{
246 if (!test_thread_flag(TIF_SYSCALL_TRACE)) 247 int ret = 0;
247 return; 248
248 if (!(current->ptrace & PT_PTRACED)) 249 if (test_thread_flag(TIF_SYSCALL_TRACE))
249 return; 250 ret = tracehook_report_syscall_entry(task_pt_regs(current));
250 ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) 251 return ret;
251 ? 0x80 : 0)); 252}
252 /* 253
253 * this isn't the same as continuing with a signal, but it will do 254asmlinkage void syscall_trace_leave(void)
254 * for normal use. strace only continues with a signal if the 255{
255 * stopping signal is not SIGTRAP. -brl 256 if (test_thread_flag(TIF_SYSCALL_TRACE))
256 */ 257 tracehook_report_syscall_exit(task_pt_regs(current), 0);
257 if (current->exit_code) {
258 send_sig(current->exit_code, current, 1);
259 current->exit_code = 0;
260 }
261} 258}