diff options
Diffstat (limited to 'arch/s390/kernel/ptrace.c')
-rw-r--r-- | arch/s390/kernel/ptrace.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 647233c02fc8..2d546c67f7c3 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -711,18 +711,13 @@ out: | |||
711 | asmlinkage void | 711 | asmlinkage void |
712 | syscall_trace(struct pt_regs *regs, int entryexit) | 712 | syscall_trace(struct pt_regs *regs, int entryexit) |
713 | { | 713 | { |
714 | if (unlikely(current->audit_context)) { | 714 | if (unlikely(current->audit_context) && entryexit) |
715 | if (!entryexit) | 715 | audit_syscall_exit(current, AUDITSC_RESULT(regs->gprs[2]), regs->gprs[2]); |
716 | audit_syscall_entry(current, regs->gprs[2], | 716 | |
717 | regs->orig_gpr2, regs->gprs[3], | ||
718 | regs->gprs[4], regs->gprs[5]); | ||
719 | else | ||
720 | audit_syscall_exit(current, regs->gprs[2]); | ||
721 | } | ||
722 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 717 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) |
723 | return; | 718 | goto out; |
724 | if (!(current->ptrace & PT_PTRACED)) | 719 | if (!(current->ptrace & PT_PTRACED)) |
725 | return; | 720 | goto out; |
726 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | 721 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) |
727 | ? 0x80 : 0)); | 722 | ? 0x80 : 0)); |
728 | 723 | ||
@@ -735,4 +730,10 @@ syscall_trace(struct pt_regs *regs, int entryexit) | |||
735 | send_sig(current->exit_code, current, 1); | 730 | send_sig(current->exit_code, current, 1); |
736 | current->exit_code = 0; | 731 | current->exit_code = 0; |
737 | } | 732 | } |
733 | out: | ||
734 | if (unlikely(current->audit_context) && !entryexit) | ||
735 | audit_syscall_entry(current, | ||
736 | test_thread_flag(TIF_31BIT)?AUDIT_ARCH_S390:AUDIT_ARCH_S390X, | ||
737 | regs->gprs[2], regs->orig_gpr2, regs->gprs[3], | ||
738 | regs->gprs[4], regs->gprs[5]); | ||
738 | } | 739 | } |