ARM: 7455/1: audit: move syscall auditing until after ptrace SIGTRAP handling
authorWill Deacon <will.deacon@arm.com>
Fri, 6 Jul 2012 14:49:27 +0000 (15:49 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 9 Jul 2012 16:44:14 +0000 (17:44 +0100)
commit5125430cccc41f67bfe024394a302901034f6d39
treeab32981e81ef874428a8c5765271404a3132cc35
parent64284a9f8a91b2f1af577f78fabe05d8072cb6e6
ARM: 7455/1: audit: move syscall auditing until after ptrace SIGTRAP handling

When auditing system calls on ARM, the audit code is called before
notifying the parent process in the case that the current task is being
ptraced. At this point, the parent (debugger) may choose to change the
system call being issued via the SET_SYSCALL ptrace request, causing
the wrong system call to be reported to the audit tools.

This patch moves the audit calls after the ptrace SIGTRAP handling code
in the syscall tracing implementation.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/ptrace.c