aboutsummaryrefslogtreecommitdiff
path: root/arch/i386/kernel/entry.S
diff options
context:
space:
mode:
authorBodo Stroesser <bstroesser@fujitsu-siemens.com>2005-09-03 15:57:19 -0700
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 00:06:20 -0700
commitc8c86cecd1d1a2722acb28a01d1babf7b6993697 (patch)
treee51097940d245b298278ffaac27d2992b0ac257b /arch/i386/kernel/entry.S
parented75e8d58010fdc06e2c3a81bfbebae92314c7e3 (diff)
[PATCH] Uml support: reorganize PTRACE_SYSEMU support
With this patch, we change the way we handle switching from PTRACE_SYSEMU to PTRACE_{SINGLESTEP,SYSCALL}, to free TIF_SYSCALL_EMU from double use as a preparation for PTRACE_SYSEMU_SINGLESTEP extension, without changing the behavior of the host kernel. Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/entry.S')
-rw-r--r--arch/i386/kernel/entry.S8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index b389e5f3bde..9a47723469c 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -339,12 +339,18 @@ syscall_trace_entry:
xorl %edx,%edx
call do_syscall_trace
cmpl $0, %eax
- jne syscall_exit # ret != 0 -> running under PTRACE_SYSEMU,
+ jne syscall_skip # ret != 0 -> running under PTRACE_SYSEMU,
# so must skip actual syscall
movl ORIG_EAX(%esp), %eax
cmpl $(nr_syscalls), %eax
jnae syscall_call
jmp syscall_exit
+syscall_skip:
+ cli # make sure we don't miss an interrupt
+ # setting need_resched or sigpending
+ # between sampling and the iret
+ movl TI_flags(%ebp), %ecx
+ jmp work_pending
# perform syscall exit tracing
ALIGN