Skip to content

Conversation

@olsajiri
Copy link
Contributor

No description provided.

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot force-pushed the bpf-next_base branch 2 times, most recently from ed703de to d4664e4 Compare October 22, 2025 23:20
@olsajiri olsajiri force-pushed the stacktrace_test_ci branch 2 times, most recently from d5460b1 to cb7e0e8 Compare October 23, 2025 13:12
@olsajiri olsajiri force-pushed the stacktrace_test_ci branch 3 times, most recently from 89e19ac to fa9a9b8 Compare October 24, 2025 08:26
This reverts commit 83f44ae.

When perf_callchain_kernel calls unwind_start with first_frame, AFAICS
we do not skip regs->ip, but it's added as part of the unwind process.
Hence reverting the extra perf_callchain_store for non-hw regs leg.

Acked-by: Song Liu <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Currently we don't get stack trace via ORC unwinder on top of fgraph exit
handler. We can see that when generating stacktrace from kretprobe_multi
bpf program which is based on fprobe/fgraph.

The reason is that the ORC unwind code won't get pass the return_to_handler
callback installed by fgraph return probe machinery.

Solving this by creating stack frame in return_to_handler expected by
ftrace_graph_ret_addr function to recover original return address and
continue with the unwind.

Also updating the pt_regs data with cs/flags/rsp which are needed for
successful stack retrieval from ebpf bpf_get_stackid helper.

Signed-off-by: Jiri Olsa <[email protected]>
Adding test that attaches kprobe/kretprobe multi and verifies the
stacktrace matches expected functions.

Signed-off-by: Jiri Olsa <[email protected]>
@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot force-pushed the bpf-next_base branch 7 times, most recently from 6d6792d to 4481a85 Compare October 28, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant