Re: [PATCH bpf] bpf: fix configuration-dependent BTF function references
From: Alexei Starovoitov
Date: Wed Dec 18 2024 - 16:18:32 EST
On Fri, Dec 13, 2024 at 3:10 PM <patchwork-bot+netdevbpf@xxxxxxxxxx> wrote:
>
> Hello:
>
> This patch was applied to bpf/bpf-next.git (master)
> by Andrii Nakryiko <andrii@xxxxxxxxxx>:
>
> On Fri, 13 Dec 2024 00:00:30 +0100 you wrote:
> > These BTF functions are not available unconditionally,
> > only reference them when they are available.
> >
> > Avoid the following build warnings:
> >
> > BTF .tmp_vmlinux1.btf.o
> > btf_encoder__tag_kfunc: failed to find kfunc 'bpf_send_signal_task' in BTF
> > btf_encoder__tag_kfuncs: failed to tag kfunc 'bpf_send_signal_task'
> > NM .tmp_vmlinux1.syms
> > KSYMS .tmp_vmlinux1.kallsyms.S
> > AS .tmp_vmlinux1.kallsyms.o
> > LD .tmp_vmlinux2
> > NM .tmp_vmlinux2.syms
> > KSYMS .tmp_vmlinux2.kallsyms.S
> > AS .tmp_vmlinux2.kallsyms.o
> > LD vmlinux
> > BTFIDS vmlinux
> > WARN: resolve_btfids: unresolved symbol prog_test_ref_kfunc
> > WARN: resolve_btfids: unresolved symbol bpf_crypto_ctx
> > WARN: resolve_btfids: unresolved symbol bpf_send_signal_task
> > WARN: resolve_btfids: unresolved symbol bpf_modify_return_test_tp
> > WARN: resolve_btfids: unresolved symbol bpf_dynptr_from_xdp
> > WARN: resolve_btfids: unresolved symbol bpf_dynptr_from_skb
> >
> > [...]
>
> Here is the summary with links:
> - [bpf] bpf: fix configuration-dependent BTF function references
> https://git.kernel.org/bpf/bpf-next/c/00a5acdbf398
Just noticed that this is broken.
The #ifdef CONFIG_NET part in special_kfunc_list()
needs to match positions in enum special_kfunc_type.
BTF_ID_UNUSED must be used when !CONFIG_NET.
Pls send the fix.