summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 19:11:26 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 19:11:26 +0200
commitd19110baaf20d5183689287bdbcf91e26e40cb79 (patch)
treee4beb421c2bd9e0cd6e9bb75480c1c705c7db102
parentMerge git://git.infradead.org/battery-2.6 (diff)
parentx86: ptrace: sysret path should reach syscall_trace_leave (diff)
downloadlinux-d19110baaf20d5183689287bdbcf91e26e40cb79.tar.xz
linux-d19110baaf20d5183689287bdbcf91e26e40cb79.zip
Merge branch 'x86/ptrace-syscall-exit' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland
* 'x86/ptrace-syscall-exit' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland: x86: ptrace: sysret path should reach syscall_trace_leave
-rw-r--r--arch/x86/kernel/entry_64.S22
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 681c3fda7391..b5c061f8f358 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -536,20 +536,13 @@ sysret_signal:
bt $TIF_SYSCALL_AUDIT,%edx
jc sysret_audit
#endif
- /* edx: work flags (arg3) */
- leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1
- xorl %esi,%esi # oldset -> arg2
- SAVE_REST
- FIXUP_TOP_OF_STACK %r11
- call do_notify_resume
- RESTORE_TOP_OF_STACK %r11
- RESTORE_REST
- movl $_TIF_WORK_MASK,%edi
- /* Use IRET because user could have changed frame. This
- works because ptregscall_common has called FIXUP_TOP_OF_STACK. */
- DISABLE_INTERRUPTS(CLBR_NONE)
- TRACE_IRQS_OFF
- jmp int_with_check
+ /*
+ * We have a signal, or exit tracing or single-step.
+ * These all wind up with the iret return path anyway,
+ * so just join that path right now.
+ */
+ FIXUP_TOP_OF_STACK %r11, -ARGOFFSET
+ jmp int_check_syscall_exit_work
badsys:
movq $-ENOSYS,RAX-ARGOFFSET(%rsp)
@@ -654,6 +647,7 @@ int_careful:
int_very_careful:
TRACE_IRQS_ON
ENABLE_INTERRUPTS(CLBR_NONE)
+int_check_syscall_exit_work:
SAVE_REST
/* Check for syscall exit trace */
testl $_TIF_WORK_SYSCALL_EXIT,%edx