diff options
| author | Roland McGrath <roland@redhat.com> | 2008-07-25 23:00:10 -0400 |
|---|---|---|
| committer | Roland McGrath <roland@redhat.com> | 2008-07-25 23:02:41 -0400 |
| commit | 024e8ac04453b3525448c31ef39848cf675ba6db (patch) | |
| tree | bc4d59f57ce315bcb16dad5491ab9983ab122d8a | |
| parent | 1ff8419871ea757ae0298aa296bcff9b2ca48561 (diff) | |
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>
| -rw-r--r-- | arch/x86/ia32/ia32entry.S | 6 |
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: | |||
| 201 | movl RDI-ARGOFFSET(%rsp),%r8d /* reload 5th syscall arg */ | 201 | movl RDI-ARGOFFSET(%rsp),%r8d /* reload 5th syscall arg */ |
| 202 | .endm | 202 | .endm |
| 203 | 203 | ||
| 204 | .macro auditsys_exit exit | 204 | .macro auditsys_exit exit,ebpsave=RBP |
| 205 | testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10) | 205 | testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10) |
| 206 | jnz int_ret_from_sys_call | 206 | jnz int_ret_from_sys_call |
| 207 | TRACE_IRQS_ON | 207 | TRACE_IRQS_ON |
| @@ -214,7 +214,7 @@ sysexit_from_sys_call: | |||
| 214 | call audit_syscall_exit | 214 | call audit_syscall_exit |
| 215 | GET_THREAD_INFO(%r10) | 215 | GET_THREAD_INFO(%r10) |
| 216 | movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall return value */ | 216 | movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall return value */ |
| 217 | movl RBP-ARGOFFSET(%rsp),%ebp /* reload user register value */ | 217 | movl \ebpsave-ARGOFFSET(%rsp),%ebp /* reload user register value */ |
| 218 | movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi | 218 | movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi |
| 219 | cli | 219 | cli |
| 220 | TRACE_IRQS_OFF | 220 | TRACE_IRQS_OFF |
| @@ -347,7 +347,7 @@ cstar_auditsys: | |||
| 347 | jmp cstar_dispatch | 347 | jmp cstar_dispatch |
| 348 | 348 | ||
| 349 | sysretl_audit: | 349 | sysretl_audit: |
| 350 | auditsys_exit sysretl_from_sys_call | 350 | auditsys_exit sysretl_from_sys_call, RCX /* user %ebp in RCX slot */ |
| 351 | #endif | 351 | #endif |
| 352 | 352 | ||
| 353 | cstar_tracesys: | 353 | cstar_tracesys: |
