Re: [RFC][PATCH 1/2] x86: Allow breakpoints to emulate call functions

From: Linus Torvalds
Date: Tue May 07 2019 - 10:58:35 EST


On Tue, May 7, 2019 at 7:48 AM Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote:
>
> IOW I think your trick only works if the old and new states are CALL, but we donât know that until weâve looked up the record, at which point we can just use the result of the lookup.

It would indeed only work for call instructions. I was thinking we'd
know that because we only ever batch up call instructions, though.

But it doesn't matter. I was looking at the ftrace code because I
thought there was some subtle timing bug or race or similar. But it
turned out my "memmove()" was the problem. See the patch I just sent
out.

Linus