-
Notifications
You must be signed in to change notification settings - Fork 5
bpf, x86/unwind/orc: Support reliable unwinding through BPF stack frames #6461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpf, x86/unwind/orc: Support reliable unwinding through BPF stack frames #6461
Conversation
|
Upstream branch: ff34657 |
037d2fc to
8f722b4
Compare
|
Upstream branch: 8f7aa3d |
05d13cd to
e7b558e
Compare
8f722b4 to
03e2ed2
Compare
|
Upstream branch: 835a507 |
e7b558e to
8c2e60f
Compare
03e2ed2 to
3ea267d
Compare
|
Upstream branch: 835a507 |
8c2e60f to
07e689a
Compare
3ea267d to
6d4eb64
Compare
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 <[email protected]> Acked-and-tested-by: Andrey Grodzovsky<[email protected]> Signed-off-by: Josh Poimboeuf <[email protected]>
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: ee9f8fc ("x86/unwind: Add the ORC unwinder") Reported-by: Andrey Grodzovsky <[email protected]> Closes: https://lore.kernel.org/[email protected] Acked-by: Song Liu <[email protected]> Acked-and-tested-by: Andrey Grodzovsky<[email protected]> Signed-off-by: Josh Poimboeuf <[email protected]>
|
Upstream branch: 835a507 |
07e689a to
668f44b
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1030302 irrelevant now. Closing PR. |
Pull request for series with
subject: bpf, x86/unwind/orc: Support reliable unwinding through BPF stack frames
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1030302