Commit 1326cafc authored by Davide Libenzi's avatar Davide Libenzi Committed by Linus Torvalds

[PATCH] Don't use SYSGOOD for ptrace singlestep

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: default avatarDavide Libenzi <davidel@xmailserver.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent af583a5b
...@@ -546,8 +546,8 @@ void do_syscall_trace(struct pt_regs *regs, int entryexit) ...@@ -546,8 +546,8 @@ void do_syscall_trace(struct pt_regs *regs, int entryexit)
return; return;
/* the 0x80 provides a way for the tracing parent to distinguish /* the 0x80 provides a way for the tracing parent to distinguish
between a syscall stop and SIGTRAP delivery */ between a syscall stop and SIGTRAP delivery */
ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) &&
? 0x80 : 0)); !test_thread_flag(TIF_SINGLESTEP) ? 0x80 : 0));
/* /*
* this isn't the same as continuing with a signal, but it will do * this isn't the same as continuing with a signal, but it will do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment