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/powerpc | |
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/powerpc')
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 09d31c12a5e3..5b43325402bc 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -1724,22 +1724,20 @@ long do_syscall_trace_enter(struct pt_regs *regs) | |||
1724 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) | 1724 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) |
1725 | trace_sys_enter(regs, regs->gpr[0]); | 1725 | trace_sys_enter(regs, regs->gpr[0]); |
1726 | 1726 | ||
1727 | if (unlikely(current->audit_context)) { | ||
1728 | #ifdef CONFIG_PPC64 | 1727 | #ifdef CONFIG_PPC64 |
1729 | if (!is_32bit_task()) | 1728 | if (!is_32bit_task()) |
1730 | audit_syscall_entry(AUDIT_ARCH_PPC64, | 1729 | audit_syscall_entry(AUDIT_ARCH_PPC64, |
1731 | regs->gpr[0], | 1730 | regs->gpr[0], |
1732 | regs->gpr[3], regs->gpr[4], | 1731 | regs->gpr[3], regs->gpr[4], |
1733 | regs->gpr[5], regs->gpr[6]); | 1732 | regs->gpr[5], regs->gpr[6]); |
1734 | else | 1733 | else |
1735 | #endif | 1734 | #endif |
1736 | audit_syscall_entry(AUDIT_ARCH_PPC, | 1735 | audit_syscall_entry(AUDIT_ARCH_PPC, |
1737 | regs->gpr[0], | 1736 | regs->gpr[0], |
1738 | regs->gpr[3] & 0xffffffff, | 1737 | regs->gpr[3] & 0xffffffff, |
1739 | regs->gpr[4] & 0xffffffff, | 1738 | regs->gpr[4] & 0xffffffff, |
1740 | regs->gpr[5] & 0xffffffff, | 1739 | regs->gpr[5] & 0xffffffff, |
1741 | regs->gpr[6] & 0xffffffff); | 1740 | regs->gpr[6] & 0xffffffff); |
1742 | } | ||
1743 | 1741 | ||
1744 | return ret ?: regs->gpr[0]; | 1742 | return ret ?: regs->gpr[0]; |
1745 | } | 1743 | } |