How to handle kprobe bugs?
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?
Signature · 1 line
Tixy
Quoted 3 lines · Tixy
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(!)
Quoted 2 lines
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.
Quoted 4 lines
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.
Quoted 4 lines
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
Quoted 10 lines · Dave Martin
Quoted 3 lines · Tixy
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.
Signature · 1 line
Tixy
Quoted 6 lines · Tixy
Quoted 5 lines · Dave Martin
Quoted 3 lines · Tixy
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?
Quoted 8 lines
Quoted 5 lines
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