diff options
Diffstat (limited to 'arch/x86/ia32/ia32entry.S')
-rw-r--r-- | arch/x86/ia32/ia32entry.S | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index 20371d0635e4..8796d1905255 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S | |||
@@ -37,6 +37,11 @@ | |||
37 | movq %rax,R8(%rsp) | 37 | movq %rax,R8(%rsp) |
38 | .endm | 38 | .endm |
39 | 39 | ||
40 | /* | ||
41 | * Reload arg registers from stack in case ptrace changed them. | ||
42 | * We don't reload %eax because syscall_trace_enter() returned | ||
43 | * the value it wants us to use in the table lookup. | ||
44 | */ | ||
40 | .macro LOAD_ARGS32 offset | 45 | .macro LOAD_ARGS32 offset |
41 | movl \offset(%rsp),%r11d | 46 | movl \offset(%rsp),%r11d |
42 | movl \offset+8(%rsp),%r10d | 47 | movl \offset+8(%rsp),%r10d |
@@ -46,7 +51,6 @@ | |||
46 | movl \offset+48(%rsp),%edx | 51 | movl \offset+48(%rsp),%edx |
47 | movl \offset+56(%rsp),%esi | 52 | movl \offset+56(%rsp),%esi |
48 | movl \offset+64(%rsp),%edi | 53 | movl \offset+64(%rsp),%edi |
49 | movl \offset+72(%rsp),%eax | ||
50 | .endm | 54 | .endm |
51 | 55 | ||
52 | .macro CFI_STARTPROC32 simple | 56 | .macro CFI_STARTPROC32 simple |
@@ -137,13 +141,12 @@ ENTRY(ia32_sysenter_target) | |||
137 | .previous | 141 | .previous |
138 | GET_THREAD_INFO(%r10) | 142 | GET_THREAD_INFO(%r10) |
139 | orl $TS_COMPAT,TI_status(%r10) | 143 | orl $TS_COMPAT,TI_status(%r10) |
140 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP), \ | 144 | testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) |
141 | TI_flags(%r10) | ||
142 | CFI_REMEMBER_STATE | 145 | CFI_REMEMBER_STATE |
143 | jnz sysenter_tracesys | 146 | jnz sysenter_tracesys |
144 | sysenter_do_call: | ||
145 | cmpl $(IA32_NR_syscalls-1),%eax | 147 | cmpl $(IA32_NR_syscalls-1),%eax |
146 | ja ia32_badsys | 148 | ja ia32_badsys |
149 | sysenter_do_call: | ||
147 | IA32_ARG_FIXUP 1 | 150 | IA32_ARG_FIXUP 1 |
148 | call *ia32_sys_call_table(,%rax,8) | 151 | call *ia32_sys_call_table(,%rax,8) |
149 | movq %rax,RAX-ARGOFFSET(%rsp) | 152 | movq %rax,RAX-ARGOFFSET(%rsp) |
@@ -242,8 +245,7 @@ ENTRY(ia32_cstar_target) | |||
242 | .previous | 245 | .previous |
243 | GET_THREAD_INFO(%r10) | 246 | GET_THREAD_INFO(%r10) |
244 | orl $TS_COMPAT,TI_status(%r10) | 247 | orl $TS_COMPAT,TI_status(%r10) |
245 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP), \ | 248 | testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) |
246 | TI_flags(%r10) | ||
247 | CFI_REMEMBER_STATE | 249 | CFI_REMEMBER_STATE |
248 | jnz cstar_tracesys | 250 | jnz cstar_tracesys |
249 | cstar_do_call: | 251 | cstar_do_call: |
@@ -336,8 +338,7 @@ ENTRY(ia32_syscall) | |||
336 | SAVE_ARGS 0,0,1 | 338 | SAVE_ARGS 0,0,1 |
337 | GET_THREAD_INFO(%r10) | 339 | GET_THREAD_INFO(%r10) |
338 | orl $TS_COMPAT,TI_status(%r10) | 340 | orl $TS_COMPAT,TI_status(%r10) |
339 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP), \ | 341 | testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) |
340 | TI_flags(%r10) | ||
341 | jnz ia32_tracesys | 342 | jnz ia32_tracesys |
342 | ia32_do_syscall: | 343 | ia32_do_syscall: |
343 | cmpl $(IA32_NR_syscalls-1),%eax | 344 | cmpl $(IA32_NR_syscalls-1),%eax |