Re: [PATCH] bpf: fix warning for bpf_cpumask in verifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux