Skip to content

Commit

Permalink
ARM: 7412/1: audit: use only AUDIT_ARCH_ARM regardless of endianness
Browse files Browse the repository at this point in the history
The machine endianness has no direct correspondence to the syscall ABI,
so use only AUDIT_ARCH_ARM when identifying the ABI to the audit tools
in userspace.

Cc: stable@vger.kernel.org
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Will Deacon authored and Russell King committed May 5, 2012
1 parent 6a68b6f commit 2f97836
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions arch/arm/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,20 +906,14 @@ long arch_ptrace(struct task_struct *child, long request,
return ret;
}

#ifdef __ARMEB__
#define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB
#else
#define AUDIT_ARCH_NR AUDIT_ARCH_ARM
#endif

asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
{
unsigned long ip;

if (why)
audit_syscall_exit(regs);
else
audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0,
audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0,
regs->ARM_r1, regs->ARM_r2, regs->ARM_r3);

if (!test_thread_flag(TIF_SYSCALL_TRACE))
Expand Down

0 comments on commit 2f97836

Please sign in to comment.