tree:
https://github.com/rgushchin/linux.git bpf_memcg.7
head: d2ca788c20f96de607dc8d3dae47b4a7c6cc3ab5
commit: 7521b59a5c7a4976d908665c1700783564344979 [7/35] bpf: prepare for memcg-based
memory accounting for bpf maps
config: c6x-randconfig-r005-20201119 (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/rgushchin/linux/commit/7521b59a5c7a4976d908665c1700783...
git remote add rgushchin
https://github.com/rgushchin/linux.git
git fetch --no-tags rgushchin bpf_memcg.7
git checkout 7521b59a5c7a4976d908665c1700783564344979
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from kernel/bpf/syscall.c:4:
include/linux/bpf.h: In function 'bpf_map_kmalloc_node':
include/linux/bpf.h:1257:9: error: implicit declaration of function
'kmalloc_node'; did you mean 'kvmalloc_node'?
[-Werror=implicit-function-declaration]
1257 | return kmalloc_node(size, flags, node);
| ^~~~~~~~~~~~
| kvmalloc_node
> include/linux/bpf.h:1257:9: warning: returning 'int' from
a function with return type 'void *' makes pointer from integer without a cast
[-Wint-conversion]
1257 | return kmalloc_node(size, flags, node);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/sockptr.h:11,
from include/linux/net.h:25,
from include/linux/skbuff.h:26,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:37,
from include/trace/events/xdp.h:8,
from include/linux/bpf_trace.h:5,
from kernel/bpf/syscall.c:5:
include/linux/slab.h: At top level:
include/linux/slab.h:560:30: error: conflicting types for 'kmalloc_node'
560 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
| ^~~~~~~~~~~~
In file included from kernel/bpf/syscall.c:4:
include/linux/bpf.h:1257:9: note: previous implicit declaration of
'kmalloc_node' was here
1257 | return kmalloc_node(size, flags, node);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from kernel/bpf/hashtab.c:5:
include/linux/bpf.h: In function 'bpf_map_kmalloc_node':
include/linux/bpf.h:1257:9: error: implicit declaration of function
'kmalloc_node'; did you mean 'kvmalloc_node'?
[-Werror=implicit-function-declaration]
1257 | return kmalloc_node(size, flags, node);
| ^~~~~~~~~~~~
| kvmalloc_node
> include/linux/bpf.h:1257:9: warning: returning 'int' from
a function with return type 'void *' makes pointer from integer without a cast
[-Wint-conversion]
1257 | return kmalloc_node(size, flags, node);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/sockptr.h:11,
from include/linux/net.h:25,
from include/linux/skbuff.h:26,
from include/linux/filter.h:13,
from kernel/bpf/hashtab.c:8:
include/linux/slab.h: At top level:
include/linux/slab.h:560:30: error: conflicting types for 'kmalloc_node'
560 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
| ^~~~~~~~~~~~
In file included from kernel/bpf/hashtab.c:5:
include/linux/bpf.h:1257:9: note: previous implicit declaration of
'kmalloc_node' was here
1257 | return kmalloc_node(size, flags, node);
| ^~~~~~~~~~~~
In file included from kernel/bpf/hashtab.c:8:
kernel/bpf/hashtab.c: In function 'htab_map_gen_lookup':
include/linux/filter.h:345:4: warning: cast between incompatible function types from
'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64,
u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned
int, long long unsigned int, long long unsigned int, long long unsigned int)'}
[-Wcast-function-type]
345 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
include/linux/filter.h:353:14: note: in definition of macro 'BPF_EMIT_CALL'
353 | .imm = ((FUNC) - __bpf_call_base) })
| ^~~~
kernel/bpf/hashtab.c:653:26: note: in expansion of macro 'BPF_CAST_CALL'
653 | *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem));
| ^~~~~~~~~~~~~
kernel/bpf/hashtab.c: In function 'htab_lru_map_gen_lookup':
include/linux/filter.h:345:4: warning: cast between incompatible function types from
'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64,
u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned
int, long long unsigned int, long long unsigned int, long long unsigned int)'}
[-Wcast-function-type]
345 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
include/linux/filter.h:353:14: note: in definition of macro 'BPF_EMIT_CALL'
353 | .imm = ((FUNC) - __bpf_call_base) })
| ^~~~
kernel/bpf/hashtab.c:694:26: note: in expansion of macro 'BPF_CAST_CALL'
694 | *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem));
| ^~~~~~~~~~~~~
kernel/bpf/hashtab.c: In function 'htab_of_map_gen_lookup':
include/linux/filter.h:345:4: warning: cast between incompatible function types from
'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64,
u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned
int, long long unsigned int, long long unsigned int, long long unsigned int)'}
[-Wcast-function-type]
345 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
include/linux/filter.h:353:14: note: in definition of macro 'BPF_EMIT_CALL'
353 | .imm = ((FUNC) - __bpf_call_base) })
| ^~~~
kernel/bpf/hashtab.c:2161:26: note: in expansion of macro 'BPF_CAST_CALL'
2161 | *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem));
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from kernel/bpf/disasm.c:6:
include/linux/bpf.h: In function 'bpf_map_kmalloc_node':
include/linux/bpf.h:1257:9: error: implicit declaration of function
'kmalloc_node'; did you mean 'kvmalloc_node'?
[-Werror=implicit-function-declaration]
1257 | return kmalloc_node(size, flags, node);
| ^~~~~~~~~~~~
| kvmalloc_node
> include/linux/bpf.h:1257:9: warning: returning 'int' from
a function with return type 'void *' makes pointer from integer without a cast
[-Wint-conversion]
1257 | return kmalloc_node(size, flags, node);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +1257 include/linux/bpf.h
1246
1247 #ifdef CONFIG_MEMCG_KMEM
1248 void *bpf_map_kmalloc_node(const struct bpf_map *map, size_t size, gfp_t flags,
1249 int node);
1250 void __percpu *bpf_map_alloc_percpu(const struct bpf_map *map, size_t size,
1251 size_t align, gfp_t gfp);
1252 #else
1253 static inline void *
1254 bpf_map_kmalloc_node(const struct bpf_map *map, size_t size, gfp_t flags,
1255 int node)
1256 {
1257 return kmalloc_node(size, flags, node);
1258 }
1259
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org