aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/ia32/ia32entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/ia32/ia32entry.S')
-rw-r--r--arch/x86/ia32/ia32entry.S12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index 8022d3c695c0..ae7158bce4d6 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -162,12 +162,14 @@ sysenter_tracesys:
162 SAVE_REST 162 SAVE_REST
163 CLEAR_RREGS 163 CLEAR_RREGS
164 movq %r9,R9(%rsp) 164 movq %r9,R9(%rsp)
165 movq $-ENOSYS,RAX(%rsp) /* really needed? */ 165 movq $-ENOSYS,RAX(%rsp)/* ptrace can change this for a bad syscall */
166 movq %rsp,%rdi /* &pt_regs -> arg1 */ 166 movq %rsp,%rdi /* &pt_regs -> arg1 */
167 call syscall_trace_enter 167 call syscall_trace_enter
168 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */ 168 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
169 RESTORE_REST 169 RESTORE_REST
170 xchgl %ebp,%r9d 170 xchgl %ebp,%r9d
171 cmpl $(IA32_NR_syscalls-1),%eax
172 ja int_ret_from_sys_call /* sysenter_tracesys has set RAX(%rsp) */
171 jmp sysenter_do_call 173 jmp sysenter_do_call
172 CFI_ENDPROC 174 CFI_ENDPROC
173ENDPROC(ia32_sysenter_target) 175ENDPROC(ia32_sysenter_target)
@@ -261,13 +263,15 @@ cstar_tracesys:
261 SAVE_REST 263 SAVE_REST
262 CLEAR_RREGS 264 CLEAR_RREGS
263 movq %r9,R9(%rsp) 265 movq %r9,R9(%rsp)
264 movq $-ENOSYS,RAX(%rsp) /* really needed? */ 266 movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */
265 movq %rsp,%rdi /* &pt_regs -> arg1 */ 267 movq %rsp,%rdi /* &pt_regs -> arg1 */
266 call syscall_trace_enter 268 call syscall_trace_enter
267 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */ 269 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
268 RESTORE_REST 270 RESTORE_REST
269 xchgl %ebp,%r9d 271 xchgl %ebp,%r9d
270 movl RSP-ARGOFFSET(%rsp), %r8d 272 movl RSP-ARGOFFSET(%rsp), %r8d
273 cmpl $(IA32_NR_syscalls-1),%eax
274 ja int_ret_from_sys_call /* cstar_tracesys has set RAX(%rsp) */
271 jmp cstar_do_call 275 jmp cstar_do_call
272END(ia32_cstar_target) 276END(ia32_cstar_target)
273 277
@@ -325,7 +329,7 @@ ENTRY(ia32_syscall)
325 jnz ia32_tracesys 329 jnz ia32_tracesys
326ia32_do_syscall: 330ia32_do_syscall:
327 cmpl $(IA32_NR_syscalls-1),%eax 331 cmpl $(IA32_NR_syscalls-1),%eax
328 ja ia32_badsys 332 ja int_ret_from_sys_call /* ia32_tracesys has set RAX(%rsp) */
329 IA32_ARG_FIXUP 333 IA32_ARG_FIXUP
330 call *ia32_sys_call_table(,%rax,8) # xxx: rip relative 334 call *ia32_sys_call_table(,%rax,8) # xxx: rip relative
331ia32_sysret: 335ia32_sysret:
@@ -335,7 +339,7 @@ ia32_sysret:
335ia32_tracesys: 339ia32_tracesys:
336 SAVE_REST 340 SAVE_REST
337 CLEAR_RREGS 341 CLEAR_RREGS
338 movq $-ENOSYS,RAX(%rsp) /* really needed? */ 342 movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */
339 movq %rsp,%rdi /* &pt_regs -> arg1 */ 343 movq %rsp,%rdi /* &pt_regs -> arg1 */
340 call syscall_trace_enter 344 call syscall_trace_enter
341 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */ 345 LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */