diff options
Diffstat (limited to 'arch/parisc/kernel/ptrace.c')
-rw-r--r-- | arch/parisc/kernel/ptrace.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index 2118ed02e886..08f6d2cbf0e0 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c | |||
@@ -264,20 +264,19 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
264 | } | 264 | } |
265 | #endif | 265 | #endif |
266 | 266 | ||
267 | long do_syscall_trace_enter(struct pt_regs *regs) | ||
268 | { | ||
269 | if (test_thread_flag(TIF_SYSCALL_TRACE) && | ||
270 | tracehook_report_syscall_entry(regs)) | ||
271 | return -1L; | ||
272 | |||
273 | return regs->gr[20]; | ||
274 | } | ||
267 | 275 | ||
268 | void syscall_trace(int why) | 276 | void do_syscall_trace_exit(struct pt_regs *regs) |
269 | { | 277 | { |
270 | struct pt_regs *regs = ¤t->thread.regs; | 278 | int stepping = !!(current->ptrace & (PT_SINGLESTEP|PT_BLOCKSTEP)); |
271 | 279 | ||
272 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 280 | if (stepping || test_thread_flag(TIF_SYSCALL_TRACE)) |
273 | return; | 281 | tracehook_report_syscall_exit(regs, stepping); |
274 | /* | ||
275 | * Report the system call for tracing. Entry tracing can | ||
276 | * decide to abort the call. We handle that by setting an | ||
277 | * invalid syscall number (-1) to force an ENOSYS error. | ||
278 | */ | ||
279 | if (why) | ||
280 | tracehook_report_syscall_exit(regs, 0); | ||
281 | else if (tracehook_report_syscall_entry(regs)) | ||
282 | regs->gr[20] = -1; /* force ENOSYS */ | ||
283 | } | 282 | } |