diff options
author | Eric Paris <eparis@redhat.com> | 2012-01-03 14:23:06 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-17 16:16:56 -0500 |
commit | b05d8447e7821695bc2fa3359431f7a664232743 (patch) | |
tree | da90e558279c6407aa2e08d36bea5d9a21cd959c /arch/s390/kernel | |
parent | f031cd25568a390dc2c9c3a4015054183753449a (diff) |
audit: inline audit_syscall_entry to reduce burden on archs
Every arch calls:
if (unlikely(current->audit_context))
audit_syscall_entry()
which requires knowledge about audit (the existance of audit_context) in
the arch code. Just do it all in static inline in audit.h so that arch's
can remain blissfully ignorant.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/ptrace.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index f52758600980..9d82ed4bcb27 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -740,12 +740,11 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
740 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) | 740 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) |
741 | trace_sys_enter(regs, regs->gprs[2]); | 741 | trace_sys_enter(regs, regs->gprs[2]); |
742 | 742 | ||
743 | if (unlikely(current->audit_context)) | 743 | audit_syscall_entry(is_compat_task() ? |
744 | audit_syscall_entry(is_compat_task() ? | 744 | AUDIT_ARCH_S390 : AUDIT_ARCH_S390X, |
745 | AUDIT_ARCH_S390 : AUDIT_ARCH_S390X, | 745 | regs->gprs[2], regs->orig_gpr2, |
746 | regs->gprs[2], regs->orig_gpr2, | 746 | regs->gprs[3], regs->gprs[4], |
747 | regs->gprs[3], regs->gprs[4], | 747 | regs->gprs[5]); |
748 | regs->gprs[5]); | ||
749 | return ret ?: regs->gprs[2]; | 748 | return ret ?: regs->gprs[2]; |
750 | } | 749 | } |
751 | 750 | ||