Re: [POC][RFC][PATCH 1/2] jump_function: Addition of new feature "jump_function"
From: Steven Rostedt
Date: Wed Oct 10 2018 - 14:56:15 EST
On Wed, 10 Oct 2018 13:33:30 -0500
Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
> Re-reading your suggestion, I may have misunderstood what you're
> suggesting here, but I'm thinking about doing something like what you
> proposed earlier:
>
> GLOBAL(tramp)
> jmp *current_func(%rip)
> ENDPROC(tramp)
>
> That is, doing an indirect jump instead of the above direct jump, so
> that any previous references to the trampoline would still work (and it
> would also work during early boot).
>
> Though it should probably be a retpoline instead of an indirect jump.
But do we care, as it only takes place during text_poke_bp() right?
I don't think we need to worry about training trampoline branch
prediction that can only be hit when something enables the jump.
-- Steve