tree:
https://android.googlesource.com/kernel/common android-4.14-stable
head: 620d928acca50c8ba013554fc798dcf8b8910918
commit: 9e61c87b1f47b4dc3d48de83d85e9f17c320f91e [16583/25375] UPSTREAM: bpf: multi
program support for cgroup+bpf
config: i386-randconfig-s001-20211101 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add android-common
https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.14-stable
git checkout 9e61c87b1f47b4dc3d48de83d85e9f17c320f91e
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
kernel/bpf/core.c:1095:43: sparse: sparse: arithmetics on pointers to functions
> kernel/bpf/core.c:1500:31: sparse: sparse: incorrect type in
return expression (different address spaces) @@ expected struct bpf_prog_array
[noderef] <asn:4> * @@ got void * @@
kernel/bpf/core.c:1500:31: sparse:
expected struct bpf_prog_array [noderef] <asn:4> *
kernel/bpf/core.c:1500:31: sparse: got void *
> kernel/bpf/core.c:1504:17: sparse: sparse: incorrect type in
return expression (different address spaces) @@ expected struct bpf_prog_array
[noderef] <asn:4> * @@ got struct bpf_prog_array * @@
kernel/bpf/core.c:1504:17: sparse: expected struct bpf_prog_array [noderef]
<asn:4> *
kernel/bpf/core.c:1504:17: sparse: got struct bpf_prog_array *
kernel/bpf/core.c:1512:9: sparse: sparse: incorrect type in argument 1 (different
address spaces) @@ expected struct callback_head *head @@ got struct callback_head
[noderef] <asn:4> * @@
kernel/bpf/core.c:1512:9: sparse: expected struct callback_head *head
kernel/bpf/core.c:1512:9: sparse: got struct callback_head [noderef] <asn:4>
*
kernel/bpf/core.c: note: in included file (through include/trace/trace_events.h,
include/trace/define_trace.h, include/trace/events/bpf.h, ...):
include/trace/events/bpf.h:56:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/bpf.h:92:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/bpf.h:117:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/bpf.h:188:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/bpf.h:228:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/bpf.h:282:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/bpf.h:312:1: sparse: sparse: Using plain integer as NULL pointer
kernel/bpf/core.c: note: in included file (through include/trace/trace_events.h,
include/trace/define_trace.h, include/trace/events/xdp.h, ...):
include/trace/events/xdp.h:28:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/xdp.h:53:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/xdp.h:111:1: sparse: sparse: Using plain integer as NULL pointer
include/trace/events/xdp.h:126:1: sparse: sparse: Using plain integer as NULL pointer
vim +1500 kernel/bpf/core.c
1496
1497 struct bpf_prog_array __rcu *bpf_prog_array_alloc(u32 prog_cnt, gfp_t flags)
1498 {
1499 if (prog_cnt)
1500 return kzalloc(sizeof(struct bpf_prog_array) +
1501 sizeof(struct bpf_prog *) * (prog_cnt + 1),
1502 flags);
1503
1504 return &empty_prog_array.hdr;
1505 }
1506
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org