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/sparc | |
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/sparc')
-rw-r--r-- | arch/sparc/kernel/ptrace_64.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c index c73c8c50f117..9388844cd88c 100644 --- a/arch/sparc/kernel/ptrace_64.c +++ b/arch/sparc/kernel/ptrace_64.c | |||
@@ -1071,15 +1071,14 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs) | |||
1071 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) | 1071 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) |
1072 | trace_sys_enter(regs, regs->u_regs[UREG_G1]); | 1072 | trace_sys_enter(regs, regs->u_regs[UREG_G1]); |
1073 | 1073 | ||
1074 | if (unlikely(current->audit_context) && !ret) | 1074 | audit_syscall_entry((test_thread_flag(TIF_32BIT) ? |
1075 | audit_syscall_entry((test_thread_flag(TIF_32BIT) ? | 1075 | AUDIT_ARCH_SPARC : |
1076 | AUDIT_ARCH_SPARC : | 1076 | AUDIT_ARCH_SPARC64), |
1077 | AUDIT_ARCH_SPARC64), | 1077 | regs->u_regs[UREG_G1], |
1078 | regs->u_regs[UREG_G1], | 1078 | regs->u_regs[UREG_I0], |
1079 | regs->u_regs[UREG_I0], | 1079 | regs->u_regs[UREG_I1], |
1080 | regs->u_regs[UREG_I1], | 1080 | regs->u_regs[UREG_I2], |
1081 | regs->u_regs[UREG_I2], | 1081 | regs->u_regs[UREG_I3]); |
1082 | regs->u_regs[UREG_I3]); | ||
1083 | 1082 | ||
1084 | return ret; | 1083 | return ret; |
1085 | } | 1084 | } |