]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/unwind/orc: Support reliable unwinding through BPF stack frames
authorJosh Poimboeuf <jpoimboe@kernel.org>
Thu, 4 Dec 2025 03:32:16 +0000 (19:32 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 10 Dec 2025 07:30:04 +0000 (23:30 -0800)
commit01bc3b6db18d6e0a2e93c37885996bf339bfe337
treef02df38dd46e62838ff4a59bac510defbd5e2a79
parentca45c84afb8c91a8d688b0012657099c24f59266
x86/unwind/orc: Support reliable unwinding through BPF stack frames

BPF JIT programs and trampolines use a frame pointer, so the current ORC
unwinder strategy of falling back to frame pointers (when an ORC entry
is missing) usually works in practice when unwinding through BPF JIT
stack frames.

However, that frame pointer fallback is just a guess, so the unwind gets
marked unreliable for live patching, which can cause livepatch
transition stalls.

Make the common case reliable by calling the bpf_has_frame_pointer()
helper to detect the valid frame pointer region of BPF JIT programs and
trampolines.

Fixes: ee9f8fce9964 ("x86/unwind: Add the ORC unwinder")
Reported-by: Andrey Grodzovsky <andrey.grodzovsky@crowdstrike.com>
Closes: https://lore.kernel.org/0e555733-c670-4e84-b2e6-abb8b84ade38@crowdstrike.com
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/a18505975662328c8ffb1090dded890c6f8c1004.1764818927.git.jpoimboe@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
arch/x86/kernel/unwind_orc.c