]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bpf: Add bpf_has_frame_pointer()
authorJosh Poimboeuf <jpoimboe@kernel.org>
Thu, 4 Dec 2025 03:32:15 +0000 (19:32 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 10 Dec 2025 07:29:42 +0000 (23:29 -0800)
commitca45c84afb8c91a8d688b0012657099c24f59266
treed3bfcd2da4d3737dae929e93b420c70ac4b2eebd
parent189e5deb944a6f9c7992355d60bffd8ec2e54a9c
bpf: Add bpf_has_frame_pointer()

Introduce a bpf_has_frame_pointer() helper that unwinders can call to
determine whether a given instruction pointer is within the valid frame
pointer region of a BPF JIT program or trampoline (i.e., after the
prologue, before the epilogue).

This will enable livepatch (with the ORC unwinder) to reliably unwind
through BPF JIT frames.

Acked-by: Song Liu <song@kernel.org>
Acked-and-tested-by: Andrey Grodzovsky <andrey.grodzovsky@crowdstrike.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Link: https://lore.kernel.org/r/fd2bc5b4e261a680774b28f6100509fd5ebad2f0.1764818927.git.jpoimboe@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
arch/x86/net/bpf_jit_comp.c
include/linux/bpf.h
kernel/bpf/core.c