Re: [PATCH bpf-next] bpf: Fix bpf_arena_handle_page_fault() redefinition without CONFIG_BPF_SYSCALL

From: Song Liu

Date: Wed May 27 2026 - 16:02:09 EST


On Wed, May 27, 2026 at 12:26 PM Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> On configs with CONFIG_BPF=y but CONFIG_BPF_SYSCALL=n (e.g. arm
> multi_v7_defconfig), kernel/bpf/core.c defines a __weak
> bpf_arena_handle_page_fault() while bpf_defs.h already supplies a static
> inline stub for it, causing a redefinition error. Build the __weak
> definition only under CONFIG_BPF_SYSCALL, matching the bpf_defs.h
> declaration and the CONFIG_BPF_SYSCALL-gated strong definition in arena.c.
>
> Fixes: dc11a4dba246 ("bpf: Recover arena kernel faults with scratch page")
> Reported-by: Mark Brown <broonie@xxxxxxxxxx>
> Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>

Acked-by: Song Liu <song@xxxxxxxxxx>