aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/ia32
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-03-18 21:23:50 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:13 -0400
commit48ee679a02406c65ced67c3951ad19744eb21083 (patch)
tree99d2c19468a41e1c3694c7ed0e524c0ada424f47 /arch/x86/ia32
parenta31f8dd7ee3b2f5645c220406b1e21f82971f32b (diff)
x86: ia32 ptrace vs -ENOSYS sysenter/syscall
The previous "x86_64 ia32 ptrace vs -ENOSYS" fix only covered the int $0x80 system call entries. This does the same fix for the sysenter and syscall instruction paths. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
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