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>
This commit is contained in:
@@ -1071,15 +1071,14 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
|
||||
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
|
||||
trace_sys_enter(regs, regs->u_regs[UREG_G1]);
|
||||
|
||||
if (unlikely(current->audit_context) && !ret)
|
||||
audit_syscall_entry((test_thread_flag(TIF_32BIT) ?
|
||||
AUDIT_ARCH_SPARC :
|
||||
AUDIT_ARCH_SPARC64),
|
||||
regs->u_regs[UREG_G1],
|
||||
regs->u_regs[UREG_I0],
|
||||
regs->u_regs[UREG_I1],
|
||||
regs->u_regs[UREG_I2],
|
||||
regs->u_regs[UREG_I3]);
|
||||
audit_syscall_entry((test_thread_flag(TIF_32BIT) ?
|
||||
AUDIT_ARCH_SPARC :
|
||||
AUDIT_ARCH_SPARC64),
|
||||
regs->u_regs[UREG_G1],
|
||||
regs->u_regs[UREG_I0],
|
||||
regs->u_regs[UREG_I1],
|
||||
regs->u_regs[UREG_I2],
|
||||
regs->u_regs[UREG_I3]);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user