tree:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
head: 63098555cfe09a633b74a3c9963769c6d4df8432
commit: a23740ec43ba022dbfd139d0fe3eff193216272b [52/54] bpf: Track contents of read-only
maps as scalars
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.4.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout a23740ec43ba022dbfd139d0fe3eff193216272b
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/bpf/verifier.c: In function 'bpf_map_direct_read':
> kernel/bpf/verifier.c:2756:8: warning: cast to pointer from
integer of different size [-Wint-to-pointer-cast]
ptr = (void *)addr + off;
^
vim +2756 kernel/bpf/verifier.c
2746
2747 static int bpf_map_direct_read(struct bpf_map *map, int off, int size, u64 *val)
2748 {
2749 void *ptr;
2750 u64 addr;
2751 int err;
2752
2753 err = map->ops->map_direct_value_addr(map, &addr, off);
2754 if (err)
2755 return err;
2756 ptr = (void *)addr + off;
2757
2758 switch (size) {
2759 case sizeof(u8):
2760 *val = (u64)*(u8 *)ptr;
2761 break;
2762 case sizeof(u16):
2763 *val = (u64)*(u16 *)ptr;
2764 break;
2765 case sizeof(u32):
2766 *val = (u64)*(u32 *)ptr;
2767 break;
2768 case sizeof(u64):
2769 *val = *(u64 *)ptr;
2770 break;
2771 default:
2772 return -EINVAL;
2773 }
2774 return 0;
2775 }
2776
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation