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