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/um | |
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/um')
-rw-r--r-- | arch/um/kernel/ptrace.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c index 2ccf25c42feb..06b190390505 100644 --- a/arch/um/kernel/ptrace.c +++ b/arch/um/kernel/ptrace.c | |||
@@ -167,17 +167,15 @@ void syscall_trace(struct uml_pt_regs *regs, int entryexit) | |||
167 | int is_singlestep = (current->ptrace & PT_DTRACE) && entryexit; | 167 | int is_singlestep = (current->ptrace & PT_DTRACE) && entryexit; |
168 | int tracesysgood; | 168 | int tracesysgood; |
169 | 169 | ||
170 | if (unlikely(current->audit_context)) { | 170 | if (!entryexit) |
171 | if (!entryexit) | 171 | audit_syscall_entry(HOST_AUDIT_ARCH, |
172 | audit_syscall_entry(HOST_AUDIT_ARCH, | 172 | UPT_SYSCALL_NR(regs), |
173 | UPT_SYSCALL_NR(regs), | 173 | UPT_SYSCALL_ARG1(regs), |
174 | UPT_SYSCALL_ARG1(regs), | 174 | UPT_SYSCALL_ARG2(regs), |
175 | UPT_SYSCALL_ARG2(regs), | 175 | UPT_SYSCALL_ARG3(regs), |
176 | UPT_SYSCALL_ARG3(regs), | 176 | UPT_SYSCALL_ARG4(regs)); |
177 | UPT_SYSCALL_ARG4(regs)); | 177 | else |
178 | else | 178 | audit_syscall_exit(regs); |
179 | audit_syscall_exit(regs); | ||
180 | } | ||
181 | 179 | ||
182 | /* Fake a debug trap */ | 180 | /* Fake a debug trap */ |
183 | if (is_singlestep) | 181 | if (is_singlestep) |