aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/ia32
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/ia32')
-rw-r--r--arch/x86/ia32/ia32entry.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index 30f492934f23..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