mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
bpf: Disable exceptions when CONFIG_UNWINDER_FRAME_POINTER=y
The build with CONFIG_UNWINDER_FRAME_POINTER=y is broken for
current exceptions feature as it assumes ORC unwinder specific fields in
the unwind_state. Disable exceptions when frame_pointer unwinder is
enabled for now.
Fixes: fd5d27b701
("arch/x86: Implement arch_bpf_stack_walk")
Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20230918155233.297024-4-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
7d3460632d
commit
5bfdb4fbf3
@ -3003,16 +3003,15 @@ void bpf_jit_free(struct bpf_prog *prog)
|
||||
bool bpf_jit_supports_exceptions(void)
|
||||
{
|
||||
/* We unwind through both kernel frames (starting from within bpf_throw
|
||||
* call) and BPF frames. Therefore we require one of ORC or FP unwinder
|
||||
* to be enabled to walk kernel frames and reach BPF frames in the stack
|
||||
* trace.
|
||||
* call) and BPF frames. Therefore we require ORC unwinder to be enabled
|
||||
* to walk kernel frames and reach BPF frames in the stack trace.
|
||||
*/
|
||||
return IS_ENABLED(CONFIG_UNWINDER_ORC) || IS_ENABLED(CONFIG_UNWINDER_FRAME_POINTER);
|
||||
return IS_ENABLED(CONFIG_UNWINDER_ORC);
|
||||
}
|
||||
|
||||
void arch_bpf_stack_walk(bool (*consume_fn)(void *cookie, u64 ip, u64 sp, u64 bp), void *cookie)
|
||||
{
|
||||
#if defined(CONFIG_UNWINDER_ORC) || defined(CONFIG_UNWINDER_FRAME_POINTER)
|
||||
#if defined(CONFIG_UNWINDER_ORC)
|
||||
struct unwind_state state;
|
||||
unsigned long addr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user