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:
@@ -167,17 +167,15 @@ void syscall_trace(struct uml_pt_regs *regs, int entryexit)
|
||||
int is_singlestep = (current->ptrace & PT_DTRACE) && entryexit;
|
||||
int tracesysgood;
|
||||
|
||||
if (unlikely(current->audit_context)) {
|
||||
if (!entryexit)
|
||||
audit_syscall_entry(HOST_AUDIT_ARCH,
|
||||
UPT_SYSCALL_NR(regs),
|
||||
UPT_SYSCALL_ARG1(regs),
|
||||
UPT_SYSCALL_ARG2(regs),
|
||||
UPT_SYSCALL_ARG3(regs),
|
||||
UPT_SYSCALL_ARG4(regs));
|
||||
else
|
||||
audit_syscall_exit(regs);
|
||||
}
|
||||
if (!entryexit)
|
||||
audit_syscall_entry(HOST_AUDIT_ARCH,
|
||||
UPT_SYSCALL_NR(regs),
|
||||
UPT_SYSCALL_ARG1(regs),
|
||||
UPT_SYSCALL_ARG2(regs),
|
||||
UPT_SYSCALL_ARG3(regs),
|
||||
UPT_SYSCALL_ARG4(regs));
|
||||
else
|
||||
audit_syscall_exit(regs);
|
||||
|
||||
/* Fake a debug trap */
|
||||
if (is_singlestep)
|
||||
|
Reference in New Issue
Block a user