提交 024e8ac0 编写于 作者: R Roland McGrath

x86_64: fix ia32 AMD syscall audit fast-path

The new code in commit 5cbf1565
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: NRoland McGrath <roland@redhat.com>
上级 1ff84198
...@@ -201,7 +201,7 @@ sysexit_from_sys_call: ...@@ -201,7 +201,7 @@ sysexit_from_sys_call:
movl RDI-ARGOFFSET(%rsp),%r8d /* reload 5th syscall arg */ movl RDI-ARGOFFSET(%rsp),%r8d /* reload 5th syscall arg */
.endm .endm
.macro auditsys_exit exit .macro auditsys_exit exit,ebpsave=RBP
testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10) testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
jnz int_ret_from_sys_call jnz int_ret_from_sys_call
TRACE_IRQS_ON TRACE_IRQS_ON
...@@ -214,7 +214,7 @@ sysexit_from_sys_call: ...@@ -214,7 +214,7 @@ sysexit_from_sys_call:
call audit_syscall_exit call audit_syscall_exit
GET_THREAD_INFO(%r10) GET_THREAD_INFO(%r10)
movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall return value */ 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 movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi
cli cli
TRACE_IRQS_OFF TRACE_IRQS_OFF
...@@ -347,7 +347,7 @@ cstar_auditsys: ...@@ -347,7 +347,7 @@ cstar_auditsys:
jmp cstar_dispatch jmp cstar_dispatch
sysretl_audit: sysretl_audit:
auditsys_exit sysretl_from_sys_call auditsys_exit sysretl_from_sys_call, RCX /* user %ebp in RCX slot */
#endif #endif
cstar_tracesys: cstar_tracesys:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册