diff options
| -rw-r--r-- | arch/m68knommu/kernel/ptrace.c | 29 | ||||
| -rw-r--r-- | arch/m68knommu/platform/68328/entry.S | 4 | ||||
| -rw-r--r-- | arch/m68knommu/platform/68360/entry.S | 4 | ||||
| -rw-r--r-- | arch/m68knommu/platform/coldfire/entry.S | 4 |
4 files changed, 19 insertions, 22 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 | ||
| 244 | asmlinkage void syscall_trace(void) | 245 | asmlinkage 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 | 254 | asmlinkage 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 | } |
diff --git a/arch/m68knommu/platform/68328/entry.S b/arch/m68knommu/platform/68328/entry.S index b3d8d7367481..27241e16a526 100644 --- a/arch/m68knommu/platform/68328/entry.S +++ b/arch/m68knommu/platform/68328/entry.S | |||
| @@ -46,7 +46,7 @@ do_trace: | |||
| 46 | movel #-ENOSYS,%sp@(PT_OFF_D0) /* needed for strace*/ | 46 | movel #-ENOSYS,%sp@(PT_OFF_D0) /* needed for strace*/ |
| 47 | subql #4,%sp | 47 | subql #4,%sp |
| 48 | SAVE_SWITCH_STACK | 48 | SAVE_SWITCH_STACK |
| 49 | jbsr syscall_trace | 49 | jbsr syscall_trace_enter |
| 50 | RESTORE_SWITCH_STACK | 50 | RESTORE_SWITCH_STACK |
| 51 | addql #4,%sp | 51 | addql #4,%sp |
| 52 | movel %sp@(PT_OFF_ORIG_D0),%d1 | 52 | movel %sp@(PT_OFF_ORIG_D0),%d1 |
| @@ -60,7 +60,7 @@ do_trace: | |||
| 60 | 1: movel %d0,%sp@(PT_OFF_D0) /* save the return value */ | 60 | 1: movel %d0,%sp@(PT_OFF_D0) /* save the return value */ |
| 61 | subql #4,%sp /* dummy return address */ | 61 | subql #4,%sp /* dummy return address */ |
| 62 | SAVE_SWITCH_STACK | 62 | SAVE_SWITCH_STACK |
| 63 | jbsr syscall_trace | 63 | jbsr syscall_trace_leave |
| 64 | 64 | ||
| 65 | ret_from_signal: | 65 | ret_from_signal: |
| 66 | RESTORE_SWITCH_STACK | 66 | RESTORE_SWITCH_STACK |
diff --git a/arch/m68knommu/platform/68360/entry.S b/arch/m68knommu/platform/68360/entry.S index 5c5047337f0b..c131c6e1d92d 100644 --- a/arch/m68knommu/platform/68360/entry.S +++ b/arch/m68knommu/platform/68360/entry.S | |||
| @@ -42,7 +42,7 @@ do_trace: | |||
| 42 | movel #-ENOSYS,%sp@(PT_OFF_D0) /* needed for strace*/ | 42 | movel #-ENOSYS,%sp@(PT_OFF_D0) /* needed for strace*/ |
| 43 | subql #4,%sp | 43 | subql #4,%sp |
| 44 | SAVE_SWITCH_STACK | 44 | SAVE_SWITCH_STACK |
| 45 | jbsr syscall_trace | 45 | jbsr syscall_trace_enter |
| 46 | RESTORE_SWITCH_STACK | 46 | RESTORE_SWITCH_STACK |
| 47 | addql #4,%sp | 47 | addql #4,%sp |
| 48 | movel %sp@(PT_OFF_ORIG_D0),%d1 | 48 | movel %sp@(PT_OFF_ORIG_D0),%d1 |
| @@ -56,7 +56,7 @@ do_trace: | |||
| 56 | 1: movel %d0,%sp@(PT_OFF_D0) /* save the return value */ | 56 | 1: movel %d0,%sp@(PT_OFF_D0) /* save the return value */ |
| 57 | subql #4,%sp /* dummy return address */ | 57 | subql #4,%sp /* dummy return address */ |
| 58 | SAVE_SWITCH_STACK | 58 | SAVE_SWITCH_STACK |
| 59 | jbsr syscall_trace | 59 | jbsr syscall_trace_leave |
| 60 | 60 | ||
| 61 | ret_from_signal: | 61 | ret_from_signal: |
| 62 | RESTORE_SWITCH_STACK | 62 | RESTORE_SWITCH_STACK |
diff --git a/arch/m68knommu/platform/coldfire/entry.S b/arch/m68knommu/platform/coldfire/entry.S index dd7d591f70ea..c8eb0e01e2ec 100644 --- a/arch/m68knommu/platform/coldfire/entry.S +++ b/arch/m68knommu/platform/coldfire/entry.S | |||
| @@ -88,7 +88,7 @@ ENTRY(system_call) | |||
| 88 | movel %d2,PT_OFF_D0(%sp) /* on syscall entry */ | 88 | movel %d2,PT_OFF_D0(%sp) /* on syscall entry */ |
| 89 | subql #4,%sp | 89 | subql #4,%sp |
| 90 | SAVE_SWITCH_STACK | 90 | SAVE_SWITCH_STACK |
| 91 | jbsr syscall_trace | 91 | jbsr syscall_trace_enter |
| 92 | RESTORE_SWITCH_STACK | 92 | RESTORE_SWITCH_STACK |
| 93 | addql #4,%sp | 93 | addql #4,%sp |
| 94 | movel %d3,%a0 | 94 | movel %d3,%a0 |
| @@ -96,7 +96,7 @@ ENTRY(system_call) | |||
| 96 | movel %d0,%sp@(PT_OFF_D0) /* save the return value */ | 96 | movel %d0,%sp@(PT_OFF_D0) /* save the return value */ |
| 97 | subql #4,%sp /* dummy return address */ | 97 | subql #4,%sp /* dummy return address */ |
| 98 | SAVE_SWITCH_STACK | 98 | SAVE_SWITCH_STACK |
| 99 | jbsr syscall_trace | 99 | jbsr syscall_trace_leave |
| 100 | 100 | ||
| 101 | ret_from_signal: | 101 | ret_from_signal: |
| 102 | RESTORE_SWITCH_STACK | 102 | RESTORE_SWITCH_STACK |
