summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-07-26 05:00:10 +0200
committerRoland McGrath <roland@redhat.com>2008-07-26 05:02:41 +0200
commit024e8ac04453b3525448c31ef39848cf675ba6db (patch)
treebc4d59f57ce315bcb16dad5491ab9983ab122d8a /arch
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 (diff)
downloadlinux-024e8ac04453b3525448c31ef39848cf675ba6db.tar.xz
linux-024e8ac04453b3525448c31ef39848cf675ba6db.zip
x86_64: fix ia32 AMD syscall audit fast-path
The new code in commit 5cbf1565f29eb57a86a305b08836613508e294d7 has a bug in the version supporting the AMD 'syscall' instruction. It clobbers the user's %ecx register value (with the %ebp value). This change fixes it. Signed-off-by: Roland McGrath <roland@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/ia32/ia32entry.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index e4bd1793a5e4..ffc1bb4fed7d 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -201,7 +201,7 @@ sysexit_from_sys_call:
movl RDI-ARGOFFSET(%rsp),%r8d /* reload 5th syscall arg */
.endm
- .macro auditsys_exit exit
+ .macro auditsys_exit exit,ebpsave=RBP
testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
jnz int_ret_from_sys_call
TRACE_IRQS_ON
@@ -214,7 +214,7 @@ sysexit_from_sys_call:
call audit_syscall_exit
GET_THREAD_INFO(%r10)
movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall return value */
- movl RBP-ARGOFFSET(%rsp),%ebp /* reload user register value */
+ movl \ebpsave-ARGOFFSET(%rsp),%ebp /* reload user register value */
movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi
cli
TRACE_IRQS_OFF
@@ -347,7 +347,7 @@ cstar_auditsys:
jmp cstar_dispatch
sysretl_audit:
- auditsys_exit sysretl_from_sys_call
+ auditsys_exit sysretl_from_sys_call, RCX /* user %ebp in RCX slot */
#endif
cstar_tracesys: