* Re: [PATCH] parisc: fix tracing of signals [not found] <20100212155306.GI24051@bombadil.infradead.org> @ 2010-02-12 16:21 ` Linus Torvalds 2010-02-12 17:10 ` Kyle McMartin ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Linus Torvalds @ 2010-02-12 16:21 UTC (permalink / raw) To: Kyle McMartin Cc: vapier, linux-parisc, roland, David S. Miller, Paul Mundt, linux-arch On Fri, 12 Feb 2010, Kyle McMartin wrote: > > Mike Frysinger pointed out that calling tracehook_signal_handler with > stepping=0 missed testing the thread flags, resulting in not calling > ptrace_notify. Fix this by testing if we're single stepping or branch > stepping and setting the flag accordingly. > > Tested, seems to work. Hmm. All other architectures either pass in zero, or test TIF_SINGLESTEP. I guess TIF_BLOCKSTEP is a parisc addition, so now parisc matches x86 and power etc, but it still makes me wonder about all those other architectures that pass in zero. For the curious, that seems to be at least sparc and 64-bit (but not 32-bit) sh. David? Paul? Linus --- > Reported-by: Mike Frysinger <vapier@gentoo.org> > Signed-off-by: Kyle McMartin <kyle@mcmartin.ca> > --- > arch/parisc/kernel/signal.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c > index e8467e4..07b3dac 100644 > --- a/arch/parisc/kernel/signal.c > +++ b/arch/parisc/kernel/signal.c > @@ -469,7 +469,9 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, > recalc_sigpending(); > spin_unlock_irq(¤t->sighand->siglock); > > - tracehook_signal_handler(sig, info, ka, regs, 0); > + tracehook_signal_handler(sig, info, ka, regs, > + test_thread_flag(TIF_SINGLESTEP) || > + test_thread_flag(TIF_BLOCKSTEP)); > > return 1; > } > -- > 1.6.6 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] parisc: fix tracing of signals 2010-02-12 16:21 ` [PATCH] parisc: fix tracing of signals Linus Torvalds @ 2010-02-12 17:10 ` Kyle McMartin 2010-02-12 17:10 ` Kyle McMartin 2010-02-12 23:58 ` Mike Frysinger 2010-02-13 11:03 ` Paul Mundt 2 siblings, 1 reply; 5+ messages in thread From: Kyle McMartin @ 2010-02-12 17:10 UTC (permalink / raw) To: Linus Torvalds Cc: Kyle McMartin, vapier, linux-parisc, roland, David S. Miller, Paul Mundt, linux-arch On Fri, Feb 12, 2010 at 08:21:33AM -0800, Linus Torvalds wrote: > Hmm. All other architectures either pass in zero, or test TIF_SINGLESTEP. > > I guess TIF_BLOCKSTEP is a parisc addition, so now parisc matches x86 and > power etc, but it still makes me wonder about all those other > architectures that pass in zero. > Yeah, BLOCKSTEP is the branch tracing bit (traps on a taken branch.) > For the curious, that seems to be at least sparc and 64-bit (but not > 32-bit) sh. > Mike sent an email to them reporting this as well, David points out that sparc has no hw singlestepping, so 0 is appropriate there. SH does seem to have a legitimate bug. regards, Kyle ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] parisc: fix tracing of signals 2010-02-12 17:10 ` Kyle McMartin @ 2010-02-12 17:10 ` Kyle McMartin 0 siblings, 0 replies; 5+ messages in thread From: Kyle McMartin @ 2010-02-12 17:10 UTC (permalink / raw) To: Linus Torvalds Cc: Kyle McMartin, vapier, linux-parisc, roland, David S. Miller, Paul Mundt, linux-arch On Fri, Feb 12, 2010 at 08:21:33AM -0800, Linus Torvalds wrote: > Hmm. All other architectures either pass in zero, or test TIF_SINGLESTEP. > > I guess TIF_BLOCKSTEP is a parisc addition, so now parisc matches x86 and > power etc, but it still makes me wonder about all those other > architectures that pass in zero. > Yeah, BLOCKSTEP is the branch tracing bit (traps on a taken branch.) > For the curious, that seems to be at least sparc and 64-bit (but not > 32-bit) sh. > Mike sent an email to them reporting this as well, David points out that sparc has no hw singlestepping, so 0 is appropriate there. SH does seem to have a legitimate bug. regards, Kyle ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] parisc: fix tracing of signals 2010-02-12 16:21 ` [PATCH] parisc: fix tracing of signals Linus Torvalds 2010-02-12 17:10 ` Kyle McMartin @ 2010-02-12 23:58 ` Mike Frysinger 2010-02-13 11:03 ` Paul Mundt 2 siblings, 0 replies; 5+ messages in thread From: Mike Frysinger @ 2010-02-12 23:58 UTC (permalink / raw) To: Linus Torvalds Cc: Kyle McMartin, linux-parisc, roland, David S. Miller, Paul Mundt, linux-arch [-- Attachment #1: Type: Text/Plain, Size: 929 bytes --] On Friday 12 February 2010 11:21:33 Linus Torvalds wrote: > On Fri, 12 Feb 2010, Kyle McMartin wrote: > > Mike Frysinger pointed out that calling tracehook_signal_handler with > > stepping=0 missed testing the thread flags, resulting in not calling > > ptrace_notify. Fix this by testing if we're single stepping or branch > > stepping and setting the flag accordingly. > > > > Tested, seems to work. > > Hmm. All other architectures either pass in zero, or test TIF_SINGLESTEP. > > I guess TIF_BLOCKSTEP is a parisc addition, so now parisc matches x86 and > power etc, but it still makes me wonder about all those other > architectures that pass in zero. > > For the curious, that seems to be at least sparc and 64-bit (but not > 32-bit) sh. > > David? Paul? David said that the sparc code is currently correct as hardware single stepping is not supported: http://lkml.org/lkml/2010/2/11/385 -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] parisc: fix tracing of signals 2010-02-12 16:21 ` [PATCH] parisc: fix tracing of signals Linus Torvalds 2010-02-12 17:10 ` Kyle McMartin 2010-02-12 23:58 ` Mike Frysinger @ 2010-02-13 11:03 ` Paul Mundt 2 siblings, 0 replies; 5+ messages in thread From: Paul Mundt @ 2010-02-13 11:03 UTC (permalink / raw) To: Linus Torvalds Cc: Kyle McMartin, vapier, linux-parisc, roland, David S. Miller, linux-arch On Fri, Feb 12, 2010 at 08:21:33AM -0800, Linus Torvalds wrote: > On Fri, 12 Feb 2010, Kyle McMartin wrote: > > Mike Frysinger pointed out that calling tracehook_signal_handler with > > stepping=0 missed testing the thread flags, resulting in not calling > > ptrace_notify. Fix this by testing if we're single stepping or branch > > stepping and setting the flag accordingly. > > > > Tested, seems to work. > > Hmm. All other architectures either pass in zero, or test TIF_SINGLESTEP. > > I guess TIF_BLOCKSTEP is a parisc addition, so now parisc matches x86 and > power etc, but it still makes me wonder about all those other > architectures that pass in zero. > > For the curious, that seems to be at least sparc and 64-bit (but not > 32-bit) sh. > > David? Paul? > It's a legitimate bug on sh64. We support hardware single stepping there but never tied in the thread flags when the code was merged with 32-bit, so this behaviour has existed for some time. I'll fix it up and send out patches as soon as I get a chance to test it. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-13 11:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20100212155306.GI24051@bombadil.infradead.org>
2010-02-12 16:21 ` [PATCH] parisc: fix tracing of signals Linus Torvalds
2010-02-12 17:10 ` Kyle McMartin
2010-02-12 17:10 ` Kyle McMartin
2010-02-12 23:58 ` Mike Frysinger
2010-02-13 11:03 ` Paul Mundt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).