BPF List
 help / color / mirror / Atom feed
* [PATCH] bpf: fix warning for bpf_cpumask in verifier
@ 2024-02-08 10:01 Hari Bathini
  2024-02-08 19:56 ` Stanislav Fomichev
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Hari Bathini @ 2024-02-08 10:01 UTC (permalink / raw)
  To: bpf; +Cc: void, Alexei Starovoitov, Daniel Borkmann

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.

Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
---
 kernel/bpf/verifier.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 65f598694d55..b263f093ee76 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -5227,7 +5227,9 @@ BTF_ID(struct, prog_test_ref_kfunc)
 #ifdef CONFIG_CGROUPS
 BTF_ID(struct, cgroup)
 #endif
+#ifdef CONFIG_BPF_JIT
 BTF_ID(struct, bpf_cpumask)
+#endif
 BTF_ID(struct, task_struct)
 BTF_SET_END(rcu_protected_types)
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-13 19:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox