summaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/kernel
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2010-10-22 15:12:34 +1000
committerGreg Ungerer <gerg@uclinux.org>2010-10-22 15:12:34 +1000
commit55f411de484a0136a77d050e877578a60bc2e094 (patch)
treeb40c2feb325eb7558e34f2cc5e4cd7393a1082ad /arch/m68knommu/kernel
parent41a2159b5b662e74a85b4824e3517f2397cc5867 (diff)
downloadop-kernel-dev-55f411de484a0136a77d050e877578a60bc2e094.zip
op-kernel-dev-55f411de484a0136a77d050e877578a60bc2e094.tar.gz
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 a32e2de..6fe7c38 100644
--- a/arch/m68knommu/kernel/ptrace.c
+++ b/arch/m68knommu/kernel/ptrace.c
@@ -18,6 +18,7 @@
#include <linux/ptrace.h>
#include <linux/user.h>
#include <linux/signal.h>
+#include <linux/tracehook.h>
#include <asm/uaccess.h>
#include <asm/page.h>
@@ -241,21 +242,17 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
return ret;
}
-asmlinkage void syscall_trace(void)
+asmlinkage int syscall_trace_enter(void)
{
- 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))
+ ret = tracehook_report_syscall_entry(task_pt_regs(current));
+ return ret;
+}
+
+asmlinkage void syscall_trace_leave(void)
+{
+ if (test_thread_flag(TIF_SYSCALL_TRACE))
+ tracehook_report_syscall_exit(task_pt_regs(current), 0);
}
OpenPOWER on IntegriCloud