]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Don't use SYSGOOD for ptrace singlestep
authorDavide Libenzi <davidel@xmailserver.org>
Mon, 23 Aug 2004 05:40:02 +0000 (22:40 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 05:40:02 +0000 (22:40 -0700)
The ptrace single step mode should not use the SYSGOOD bit and should not
report SIGTRAP|0x80 to the ptrace parent.  The following patch add an
explicit check and to not add 0x80 in this is a singlestep trap.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/ptrace.c

index 08019db07ffb600356e33e304cc92cce2e308ab8..e0c9a03739a8086289933220f559dad4c45e7170 100644 (file)
@@ -546,8 +546,8 @@ void do_syscall_trace(struct pt_regs *regs, int entryexit)
                return;
        /* the 0x80 provides a way for the tracing parent to distinguish
           between a syscall stop and SIGTRAP delivery */
-       ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
-                                ? 0x80 : 0));
+       ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) &&
+                                !test_thread_flag(TIF_SINGLESTEP) ? 0x80 : 0));
 
        /*
         * this isn't the same as continuing with a signal, but it will do