2024-02-15 16:31:32

by kernel test robot

[permalink] [raw]
Subject: [gustavoars:testing/WFAMNAE-next20240215 1/1] include/linux/bpf-cgroup.h:191:15: warning: comparison of distinct pointer types ('struct bpf_prog_array *' and 'struct bpf_prog_array_tag *')

tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/WFAMNAE-next20240215
head: 34a5c90f36e0238bfc95cda9e2eccf7e610bff1a
commit: 34a5c90f36e0238bfc95cda9e2eccf7e610bff1a [1/1] treewide: Address -Wflexible-array-member-not-at-end warnings
config: arm-randconfig-001-20240215 (https://download.01.org/0day-ci/archive/20240216/[email protected]/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240216/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

In file included from security/device_cgroup.c:8:
>> include/linux/bpf-cgroup.h:191:15: warning: comparison of distinct pointer types ('struct bpf_prog_array *' and 'struct bpf_prog_array_tag *') [-Wcompare-distinct-pointer-types]
return array != &bpf_empty_prog_array.hdr;
~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.


vim +191 include/linux/bpf-cgroup.h

de9cbbaadba5ad Roman Gushchin 2018-08-02 178
b741f1630346de Roman Gushchin 2018-09-28 179 int bpf_percpu_cgroup_storage_copy(struct bpf_map *map, void *key, void *value);
b741f1630346de Roman Gushchin 2018-09-28 180 int bpf_percpu_cgroup_storage_update(struct bpf_map *map, void *key,
b741f1630346de Roman Gushchin 2018-09-28 181 void *value, u64 flags);
b741f1630346de Roman Gushchin 2018-09-28 182
46531a30364bd4 Pavel Begunkov 2022-01-27 183 /* Opportunistic check to see whether we have any BPF program attached*/
46531a30364bd4 Pavel Begunkov 2022-01-27 184 static inline bool cgroup_bpf_sock_enabled(struct sock *sk,
46531a30364bd4 Pavel Begunkov 2022-01-27 185 enum cgroup_bpf_attach_type type)
46531a30364bd4 Pavel Begunkov 2022-01-27 186 {
46531a30364bd4 Pavel Begunkov 2022-01-27 187 struct cgroup *cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data);
46531a30364bd4 Pavel Begunkov 2022-01-27 188 struct bpf_prog_array *array;
46531a30364bd4 Pavel Begunkov 2022-01-27 189
46531a30364bd4 Pavel Begunkov 2022-01-27 190 array = rcu_access_pointer(cgrp->bpf.effective[type]);
46531a30364bd4 Pavel Begunkov 2022-01-27 @191 return array != &bpf_empty_prog_array.hdr;
46531a30364bd4 Pavel Begunkov 2022-01-27 192 }
46531a30364bd4 Pavel Begunkov 2022-01-27 193

:::::: The code at line 191 was first introduced by commit
:::::: 46531a30364bd483bfa1b041c15d42a196e77e93 cgroup/bpf: fast path skb BPF filtering

:::::: TO: Pavel Begunkov <[email protected]>
:::::: CC: Alexei Starovoitov <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki