Re: [PATCH bpf-next v6 2/2] bpf: Hold the perf callchain entry until used completely

From: Tao Chen

Date: Wed Nov 26 2025 - 04:29:36 EST


在 2025/11/14 00:01, Yonghong Song 写道:


On 11/12/25 8:31 AM, Tao Chen wrote:
As Alexei noted, get_perf_callchain() return values may be reused
if a task is preempted after the BPF program enters migrate disable
mode. The perf_callchain_entres has a small stack of entries, and
we can reuse it as follows:

1. get the perf callchain entry
2. BPF use...
3. put the perf callchain entry

And Peter suggested that get_recursion_context used with preemption
disabled, so we should disable preemption at BPF side.

Signed-off-by: Tao Chen <chen.dylane@xxxxxxxxx>

Acked-by: Yonghong Song <yonghong.song@xxxxxxxxx>


Hi eBPF maintainers,

This patch appears to have missed the eBPF maintainers on the list, please review it again, thanks.

--
Best Regards
Tao Chen