Messages in this thread | | | Date | Thu, 29 Aug 2019 13:46:02 +0200 | From | Peter Zijlstra <> | Subject | Re: Tracing text poke / kernel self-modifying code (Was: Re: [RFC v2 0/6] x86: dynamic indirect branch promotion) |
| |
On Thu, Aug 29, 2019 at 12:40:56PM +0300, Adrian Hunter wrote: > Can you expand on "and ensure the poke_handler preserves the existing > control flow"? Whatever the INT3-handler does will be traced normally so > long as it does not itself execute self-modified code.
My thinking was that the code shouldn't change semantics before emitting the RECORD_TEXT_POKE; but you're right in that that doesn't seem to matter much.
Either we run the old code or INT3 does 'something'. Then we get RECORD_TEXT_POKE and finish the poke. Which tells that the moment INT3 stops the new text is in place.
I suppose that works too, and requires less changes.
| |