2004-11-18 15:42:49

by Tom Rini

[permalink] [raw]
Subject: [PATCH 2.6.10-rc2] x86_64: only single-step into signal handlers if the tracer asked for it

On Mon, Nov 15, 2004 at 08:56:31AM +0000, [email protected] wrote:

> ChangeSet 1.2159, 2004/11/15 00:56:31-08:00, [email protected]
>
> x86: only single-step into signal handlers if the tracer
> asked for it.

x86_64 looks to have the same issue. But I deferr to the experts (and
hope this isn't a dupe).

Signed-off-by: Tom Rini <[email protected]>

--- 1.28/arch/x86_64/kernel/signal.c 2004-09-08 11:52:55 -07:00
+++ edited/arch/x86_64/kernel/signal.c 2004-11-18 08:27:59 -07:00
@@ -325,7 +325,7 @@

set_fs(USER_DS);
if (regs->eflags & TF_MASK) {
- if (current->ptrace & PT_PTRACED) {
+ if ((current->ptrace & (PT_PTRACED | PT_DTRACE)) == (PT_PTRACED | PT_DTRACE)) {
ptrace_notify(SIGTRAP);
} else {
regs->eflags &= ~TF_MASK;

--
Tom Rini
http://gate.crashing.org/~trini/


2004-11-18 21:23:29

by Andi Kleen

[permalink] [raw]
Subject: Re: [discuss] [PATCH 2.6.10-rc2] x86_64: only single-step into signal handlers if the tracer asked for it

On Thu, Nov 18, 2004 at 08:42:19AM -0700, Tom Rini wrote:
> On Mon, Nov 15, 2004 at 08:56:31AM +0000, [email protected] wrote:
>
> > ChangeSet 1.2159, 2004/11/15 00:56:31-08:00, [email protected]
> >
> > x86: only single-step into signal handlers if the tracer
> > asked for it.
>
> x86_64 looks to have the same issue. But I deferr to the experts (and
> hope this isn't a dupe).

Looks good, thanks.

-Andi