On Mon, 26 Jan 2026 22:18:32 +0100
Jiri Olsa <[email protected]> wrote:

> The previous change (Fixes commit) messed up the rsp register value,
> which is wrong because it's already adjusted with FRAME_SIZE, we need
> the original rsp value.
> 
> This change does not affect fprobe current kernel unwind, the !perf_hw_regs
> path perf_callchain_kernel:
> 
>         if (perf_hw_regs(regs)) {
>                 if (perf_callchain_store(entry, regs->ip))
>                         return;
>                 unwind_start(&state, current, regs, NULL);
>         } else {
>                 unwind_start(&state, current, NULL, (void *)regs->sp);
>         }
> 
> which uses pt_regs.sp as first_frame boundary (FRAME_SIZE shift makes
> no difference, unwind stil stops at the right frame).
> 
> This change fixes the other path when we want to unwind directly from
> pt_regs sp/fp/ip state, which is coming in following change.
> 
> Fixes: 20a0bc10272f ("x86/fgraph,bpf: Fix stack ORC unwind from kprobe_multi 
> return probe")
> Signed-off-by: Jiri Olsa <[email protected]>

Reviewed-by: Steven Rostedt (Google) <[email protected]>

(it passed all my tests too)

-- Steve

Reply via email to