Thread (57 messages) 57 messages, 7 authors, 2021-07-29

Re: [PATCH -tip v8 11/13] x86/unwind: Recover kretprobe trampoline entry

From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-07-07 08:36:56
Also in: lkml

On Wed, Jul 07, 2021 at 10:20:41AM +0200, Peter Zijlstra wrote:
quoted
quoted
Steve, can you clarify the ftrace side here? Afaict return_to_handler()
is similarly affected.
I'm not exactly sure what the issue is. As Masami stated, kretprobe
uses a ret to return to the calling function, but ftrace uses a jmp.
I'll have to re-read the ftrace bits, but from the top of my head you
cannot do an indirect jump and preserve all registers at the same time,
so a return stub must use jump from stack aka. ret.
Hmm... there's callee clobbered regs ofcourse, which don't need to be
preserved. And that's exactly what ftrace seems to be doing, and I don't
think there's any reason why kretprobe cannot do the same. Lemme try.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help