From: Will Deacon Date: Fri, 7 Dec 2012 16:34:37 +0000 (+0100) Subject: ARM: 7595/1: syscall: rework ordering in syscall_trace_exit X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~53^2~1^4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b10bca0bc699af201770989a88fa293155e9d8de;p=pandora-kernel.git ARM: 7595/1: syscall: rework ordering in syscall_trace_exit syscall_trace_exit is currently doing things back-to-front; invoking the audit hook *after* signalling the debugger, which presents an opportunity for the registers to be re-written by userspace in order to bypass auditing constaints. This patch fixes the ordering by moving the audit code first and the tracehook code last. On the face of it, it looks like current_thread_info()->syscall may be incorrect for the sys_exit tracepoint, but that's actually not an issue because it will have been set during syscall entry and cannot have changed since then. Reported-by: Andrew Gabbasov Tested-by: Mark Rutland Signed-off-by: Will Deacon Signed-off-by: Russell King --- Reading git-diff-tree failed