lkml.org 
[lkml]   [2021]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH -tip v8 11/13] x86/unwind: Recover kretprobe trampoline entry
    On Wed, Jul 07, 2021 at 10:20:41AM +0200, Peter Zijlstra wrote:

    > > > 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.

    \
     
     \ /
      Last update: 2021-07-07 10:37    [W:2.091 / U:0.368 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site