Message ID | 20230918143914.292526-4-memxor@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | BPF |
Headers | show |
Series | Fixes for Exceptions | expand |
On Mon, Sep 18, 2023 at 7:39 AM Kumar Kartikeya Dwivedi <memxor@gmail.com> wrote: > > 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: fd5d27b70188 ("arch/x86: Implement arch_bpf_stack_walk") > Reported-by: Eric Dumazet <edumazet@google.com> > Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Very weird that only this patch reached patchwork. Could you resend and trim cc list significantly?
On Mon, 18 Sept 2023 at 17:48, Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote: > > On Mon, Sep 18, 2023 at 7:39 AM Kumar Kartikeya Dwivedi > <memxor@gmail.com> wrote: > > > > 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: fd5d27b70188 ("arch/x86: Implement arch_bpf_stack_walk") > > Reported-by: Eric Dumazet <edumazet@google.com> > > Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> > > Very weird that only this patch reached patchwork. > Could you resend and trim cc list significantly? I have resent it with just BPF and you in To:. But I think it's not with this patch, a lot of emails are not appearing on the list.
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index 84005f2114e0..8c10d9abc239 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c @@ -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;
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: fd5d27b70188 ("arch/x86: Implement arch_bpf_stack_walk") Reported-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> --- arch/x86/net/bpf_jit_comp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)