All of lore.kernel.org
 help / color / mirror / Atom feed
* How to handle kprobe bugs?
@ 2011-03-30 13:53 Tixy
  2011-03-30 14:10 ` Dave Martin
  0 siblings, 1 reply; 4+ messages in thread
From: Tixy @ 2011-03-30 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

Now that I'm writing some test code for kprobes I'm quickly finding
further bugs with the instruction emulation. E.g. ALU ops with an
immediate operand are broke. Shall I wait until I have completed writing
all test cases before submitting a single fix patch? (It could be a
couple of weeks.)

I also find that instruction emulation for some (all?) ARMv6K and newer
instructions are missing. E.g. hint instructions like NOP and WFI. Shall
I produce a second patch to add these?

At some point I will also get around to doing my original task of adding
Thumb support to kprobes. I'm assuming that fixing ARM code is higher
priority than adding Thumb support?

-- 
Tixy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* How to handle kprobe bugs?
  2011-03-30 13:53 How to handle kprobe bugs? Tixy
@ 2011-03-30 14:10 ` Dave Martin
  2011-03-30 18:34   ` Tixy
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Martin @ 2011-03-30 14:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 30, 2011 at 02:53:33PM +0100, Tixy wrote:
> Now that I'm writing some test code for kprobes I'm quickly finding
> further bugs with the instruction emulation. E.g. ALU ops with an
> immediate operand are broke. Shall I wait until I have completed writing

Good spot ... if so, this definitely needs fixing(!)

> all test cases before submitting a single fix patch? (It could be a
> couple of weeks.)

My view (others may differ):

If there are several independent fixes, that's probably best presented
as multiple patches; but it may be better to post them as a series when
you're done.

I expect this will be more digestible for people than a trickle of
patches over a longer period, unless the total changeset becomes
large.

> 
> I also find that instruction emulation for some (all?) ARMv6K and newer
> instructions are missing. E.g. hint instructions like NOP and WFI. Shall
> I produce a second patch to add these?

Sure.

Note that you should emulate all the hinted NOPs as actual NOPs,
since the event the hint waits for may happen in the meantime;
under some circumstances that would lead to stalls.

> 
> At some point I will also get around to doing my original task of adding
> Thumb support to kprobes. I'm assuming that fixing ARM code is higher
> priority than adding Thumb support?

I think that's reasonable, provided there is not too much work to do
to fix the ARM case -- it sounds like there isn't much to fix, but
please shout otherwise.

Cheers
---Dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

* How to handle kprobe bugs?
  2011-03-30 14:10 ` Dave Martin
@ 2011-03-30 18:34   ` Tixy
  2011-03-31  8:54     ` Dave Martin
  0 siblings, 1 reply; 4+ messages in thread
From: Tixy @ 2011-03-30 18:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 2011-03-30 at 15:10 +0100, Dave Martin wrote:
> On Wed, Mar 30, 2011 at 02:53:33PM +0100, Tixy wrote:
> > I also find that instruction emulation for some (all?) ARMv6K and newer
> > instructions are missing. E.g. hint instructions like NOP and WFI. Shall
> > I produce a second patch to add these?
> 
> Sure.
> 
> Note that you should emulate all the hinted NOPs as actual NOPs,
> since the event the hint waits for may happen in the meantime;
> under some circumstances that would lead to stalls.

Good point :-) Conversely, things like Send Event shouldn't be actual
NOPs.

-- 
Tixy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* How to handle kprobe bugs?
  2011-03-30 18:34   ` Tixy
@ 2011-03-31  8:54     ` Dave Martin
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Martin @ 2011-03-31  8:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 30, 2011 at 7:34 PM, Tixy <tixy@yxit.co.uk> wrote:
> On Wed, 2011-03-30 at 15:10 +0100, Dave Martin wrote:
>> On Wed, Mar 30, 2011 at 02:53:33PM +0100, Tixy wrote:
>> > I also find that instruction emulation for some (all?) ARMv6K and newer
>> > instructions are missing. E.g. hint instructions like NOP and WFI. Shall
>> > I produce a second patch to add these?
>>
>> Sure.
>>
>> Note that you should emulate all the hinted NOPs as actual NOPs,
>> since the event the hint waits for may happen in the meantime;
>> under some circumstances that would lead to stalls.
>
> Good point :-) Conversely, things like Send Event shouldn't be actual
> NOPs.

Also a good point!  For this one, I guess you'll need to take into
account what platform you're acutally running on, also.

Cheers
---Dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-31  8:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-30 13:53 How to handle kprobe bugs? Tixy
2011-03-30 14:10 ` Dave Martin
2011-03-30 18:34   ` Tixy
2011-03-31  8:54     ` Dave Martin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.