aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavide Libenzi <davidel@xmailserver.org>2004-08-22 22:40:02 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 22:40:02 -0700
commit1326cafc397cd609888edc8776a6e0572e16c67f (patch)
tree0141da9ec2db0440970269cbfd5708377e6dd507 /arch
parentaf583a5b116ee78d8f2b5c5aec18346af0f924b3 (diff)
downloadhistory-1326cafc397cd609888edc8776a6e0572e16c67f.tar.gz
[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: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/ptrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c
index 08019db07ffb60..e0c9a03739a808 100644
--- a/arch/i386/kernel/ptrace.c
+++ b/arch/i386/kernel/ptrace.c
@@ -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