From: Hari Bathini <hbathini@linux.ibm.com>
To: Stanislav Fomichev <sdf@google.com>
Cc: bpf@vger.kernel.org, void@manifault.com,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH] bpf: fix warning for bpf_cpumask in verifier
Date: Mon, 12 Feb 2024 15:26:05 +0530 [thread overview]
Message-ID: <7efb192b-4eb5-4e25-a52f-54add200de1a@linux.ibm.com> (raw)
In-Reply-To: <ZcUx0QdwW4FEDjTl@google.com>
On 09/02/24 1:26 am, Stanislav Fomichev wrote:
> On 02/08, Hari Bathini wrote:
>> Compiling with CONFIG_BPF_SYSCALL & !CONFIG_BPF_JIT throws the below
>> warning:
>>
>> "WARN: resolve_btfids: unresolved symbol bpf_cpumask"
>>
>> Fix it by adding the appropriate #ifdef.
>
> Can you explain a bit more on why CONFIG_BPF_JIT is appropriate here?
> kernel/bpf/cpumask.c seems to be gated by CONFIG_BPF_SYSCALL.
> So presumably all those symbols should be still compiled in with !CONFIG_BPF_JIT?
Actually, CONFIG_BPF_JIT is the precondition for cpumask.c
where bpf_cpumask structure is defined.
ifeq ($(CONFIG_BPF_JIT),y)
obj-$(CONFIG_BPF_SYSCALL) += bpf_struct_ops.o
obj-$(CONFIG_BPF_SYSCALL) += cpumask.o
obj-${CONFIG_BPF_LSM} += bpf_lsm.o
endif
Thanks
Hari
next prev parent reply other threads:[~2024-02-12 9:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 10:01 [PATCH] bpf: fix warning for bpf_cpumask in verifier Hari Bathini
2024-02-08 19:56 ` Stanislav Fomichev
2024-02-12 9:56 ` Hari Bathini [this message]
2024-02-12 16:46 ` Stanislav Fomichev
2024-02-12 11:58 ` Jiri Olsa
2024-02-12 16:53 ` David Vernet
2024-02-13 19:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7efb192b-4eb5-4e25-a52f-54add200de1a@linux.ibm.com \
--to=hbathini@linux.ibm.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=sdf@google.com \
--cc=void@manifault.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox