summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tags/2.6.18-12/30074_x86-clear-df-before-calling-signal-handler.patch')
-rw-r--r--tags/2.6.18-12/30074_x86-clear-df-before-calling-signal-handler.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/tags/2.6.18-12/30074_x86-clear-df-before-calling-signal-handler.patch b/tags/2.6.18-12/30074_x86-clear-df-before-calling-signal-handler.patch
new file mode 100644
index 0000000..76481fb
--- /dev/null
+++ b/tags/2.6.18-12/30074_x86-clear-df-before-calling-signal-handler.patch
@@ -0,0 +1,57 @@
+Index: linux-2.6.18.8/arch/i386/kernel/signal.c
+===================================================================
+--- linux-2.6.18.8.orig/arch/i386/kernel/signal.c
++++ linux-2.6.18.8/arch/i386/kernel/signal.c
+@@ -391,7 +391,7 @@ static int setup_frame(int sig, struct k
+ * The tracer may want to single-step inside the
+ * handler too.
+ */
+- regs->eflags &= ~TF_MASK;
++ regs->eflags &= ~(TF_MASK | X86_EFLAGS_DF);
+ if (test_thread_flag(TIF_SINGLESTEP))
+ ptrace_notify(SIGTRAP);
+
+@@ -485,7 +485,7 @@ static int setup_rt_frame(int sig, struc
+ * The tracer may want to single-step inside the
+ * handler too.
+ */
+- regs->eflags &= ~TF_MASK;
++ regs->eflags &= ~(TF_MASK | X86_EFLAGS_DF);
+ if (test_thread_flag(TIF_SINGLESTEP))
+ ptrace_notify(SIGTRAP);
+
+Index: linux-2.6.18.8/arch/x86_64/ia32/ia32_signal.c
+===================================================================
+--- linux-2.6.18.8.orig/arch/x86_64/ia32/ia32_signal.c
++++ linux-2.6.18.8/arch/x86_64/ia32/ia32_signal.c
+@@ -493,7 +493,7 @@ int ia32_setup_frame(int sig, struct k_s
+ regs->ss = __USER32_DS;
+
+ set_fs(USER_DS);
+- regs->eflags &= ~TF_MASK;
++ regs->eflags &= ~(TF_MASK | X86_EFLAGS_DF);
+ if (test_thread_flag(TIF_SINGLESTEP))
+ ptrace_notify(SIGTRAP);
+
+@@ -589,7 +589,7 @@ int ia32_setup_rt_frame(int sig, struct
+ regs->ss = __USER32_DS;
+
+ set_fs(USER_DS);
+- regs->eflags &= ~TF_MASK;
++ regs->eflags &= ~(TF_MASK | X86_EFLAGS_DF);
+ if (test_thread_flag(TIF_SINGLESTEP))
+ ptrace_notify(SIGTRAP);
+
+Index: linux-2.6.18.8/arch/x86_64/kernel/signal.c
+===================================================================
+--- linux-2.6.18.8.orig/arch/x86_64/kernel/signal.c
++++ linux-2.6.18.8/arch/x86_64/kernel/signal.c
+@@ -302,7 +302,7 @@ static int setup_rt_frame(int sig, struc
+ see include/asm-x86_64/uaccess.h for details. */
+ set_fs(USER_DS);
+
+- regs->eflags &= ~TF_MASK;
++ regs->eflags &= ~(TF_MASK | X86_EFLAGS_DF);
+ if (test_thread_flag(TIF_SINGLESTEP))
+ ptrace_notify(SIGTRAP);
+ #ifdef DEBUG_SIG