aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc64/kernel/ptrace.c')
-rw-r--r--arch/ppc64/kernel/ptrace.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/ppc64/kernel/ptrace.c b/arch/ppc64/kernel/ptrace.c
index 5a846324ca8c..9f8c6087ae56 100644
--- a/arch/ppc64/kernel/ptrace.c
+++ b/arch/ppc64/kernel/ptrace.c
@@ -305,14 +305,17 @@ static void do_syscall_trace(void)
305 305
306void do_syscall_trace_enter(struct pt_regs *regs) 306void do_syscall_trace_enter(struct pt_regs *regs)
307{ 307{
308 if (test_thread_flag(TIF_SYSCALL_TRACE)
309 && (current->ptrace & PT_PTRACED))
310 do_syscall_trace();
311
308 if (unlikely(current->audit_context)) 312 if (unlikely(current->audit_context))
309 audit_syscall_entry(current, regs->gpr[0], 313 audit_syscall_entry(current,
314 test_thread_flag(TIF_32BIT)?AUDIT_ARCH_PPC:AUDIT_ARCH_PPC64,
315 regs->gpr[0],
310 regs->gpr[3], regs->gpr[4], 316 regs->gpr[3], regs->gpr[4],
311 regs->gpr[5], regs->gpr[6]); 317 regs->gpr[5], regs->gpr[6]);
312 318
313 if (test_thread_flag(TIF_SYSCALL_TRACE)
314 && (current->ptrace & PT_PTRACED))
315 do_syscall_trace();
316} 319}
317 320
318void do_syscall_trace_leave(struct pt_regs *regs) 321void do_syscall_trace_leave(struct pt_regs *regs)
@@ -320,7 +323,9 @@ void do_syscall_trace_leave(struct pt_regs *regs)
320 secure_computing(regs->gpr[0]); 323 secure_computing(regs->gpr[0]);
321 324
322 if (unlikely(current->audit_context)) 325 if (unlikely(current->audit_context))
323 audit_syscall_exit(current, regs->result); 326 audit_syscall_exit(current,
327 (regs->ccr&0x1000)?AUDITSC_FAILURE:AUDITSC_SUCCESS,
328 regs->result);
324 329
325 if ((test_thread_flag(TIF_SYSCALL_TRACE) 330 if ((test_thread_flag(TIF_SYSCALL_TRACE)
326 || test_thread_flag(TIF_SINGLESTEP)) 331 || test_thread_flag(TIF_SINGLESTEP))