tree:
https://github.com/multipath-tcp/mptcp_net-next.git export
head: 630f1178e1faac796df4befc319c19c3fede6b7b
commit: 0da79c831507209d7bb2ed905aa738545d0bbe7c [489/515] bpf: add
'bpf_mptcp_sock' structure and helper
config: arm64-randconfig-r032-20201113 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
9a85643cd357e412cff69067bb5c4840e228c2ab)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
#
https://github.com/multipath-tcp/mptcp_net-next/commit/0da79c831507209d7b...
git remote add mptcp
https://github.com/multipath-tcp/mptcp_net-next.git
git fetch --no-tags mptcp export
git checkout 0da79c831507209d7bb2ed905aa738545d0bbe7c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from kernel/bpf/verifier.c:12:
In file included from include/linux/bpf_verifier.h:8:
In file included from include/linux/filter.h:13:
include/linux/skbuff.h:4622:26: error: implicit declaration of function
'skb_ext_add' [-Werror,-Wimplicit-function-declaration]
u64 *kcov_handle_ptr = skb_ext_add(skb, SKB_EXT_KCOV_HANDLE);
^
include/linux/skbuff.h:4622:43: error: use of undeclared identifier
'SKB_EXT_KCOV_HANDLE'
u64 *kcov_handle_ptr = skb_ext_add(skb, SKB_EXT_KCOV_HANDLE);
^
include/linux/skbuff.h:4631:21: error: implicit declaration of function
'skb_ext_find' [-Werror,-Wimplicit-function-declaration]
u64 *kcov_handle = skb_ext_find(skb, SKB_EXT_KCOV_HANDLE);
^
include/linux/skbuff.h:4631:39: error: use of undeclared identifier
'SKB_EXT_KCOV_HANDLE'
u64 *kcov_handle = skb_ext_find(skb, SKB_EXT_KCOV_HANDLE);
^
> kernel/bpf/verifier.c:2844:11: error: implicit declaration of
function 'bpf_mptcp_sock_is_valid_access'
[-Werror,-Wimplicit-function-declaration]
valid =
bpf_mptcp_sock_is_valid_access(off, size, t, &info);
^
kernel/bpf/verifier.c:2844:11: note: did you mean
'bpf_tcp_sock_is_valid_access'?
include/linux/bpf.h:1944:20: note: 'bpf_tcp_sock_is_valid_access' declared
here
static inline bool bpf_tcp_sock_is_valid_access(int off, int size,
^
> kernel/bpf/verifier.c:10496:25: error: use of undeclared
identifier 'bpf_mptcp_sock_convert_ctx_access'; did you mean
'bpf_tcp_sock_convert_ctx_access'?
convert_ctx_access = bpf_mptcp_sock_convert_ctx_access;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bpf_tcp_sock_convert_ctx_access
include/linux/bpf.h:1951:19: note: 'bpf_tcp_sock_convert_ctx_access' declared
here
static inline u32 bpf_tcp_sock_convert_ctx_access(enum bpf_access_type type,
^
6 errors generated.
vim +/bpf_mptcp_sock_is_valid_access +2844 kernel/bpf/verifier.c
2817
2818 static int check_sock_access(struct bpf_verifier_env *env, int insn_idx,
2819 u32 regno, int off, int size,
2820 enum bpf_access_type t)
2821 {
2822 struct bpf_reg_state *regs = cur_regs(env);
2823 struct bpf_reg_state *reg = ®s[regno];
2824 struct bpf_insn_access_aux info = {};
2825 bool valid;
2826
2827 if (reg->smin_value < 0) {
2828 verbose(env, "R%d min value is negative, either use unsigned index or do a
if (index >=0) check.\n",
2829 regno);
2830 return -EACCES;
2831 }
2832
2833 switch (reg->type) {
2834 case PTR_TO_SOCK_COMMON:
2835 valid = bpf_sock_common_is_valid_access(off, size, t, &info);
2836 break;
2837 case PTR_TO_SOCKET:
2838 valid = bpf_sock_is_valid_access(off, size, t, &info);
2839 break;
2840 case PTR_TO_TCP_SOCK:
2841 valid = bpf_tcp_sock_is_valid_access(off, size, t, &info);
2842 break;
2843 case PTR_TO_MPTCP_SOCK:
2844 valid = bpf_mptcp_sock_is_valid_access(off, size, t,
&info);
2845 break;
2846 case PTR_TO_XDP_SOCK:
2847 valid = bpf_xdp_sock_is_valid_access(off, size, t, &info);
2848 break;
2849 default:
2850 valid = false;
2851 }
2852
2853
2854 if (valid) {
2855 env->insn_aux_data[insn_idx].ctx_field_size =
2856 info.ctx_field_size;
2857 return 0;
2858 }
2859
2860 verbose(env, "R%d invalid %s access off=%d size=%d\n",
2861 regno, reg_type_str[reg->type], off, size);
2862
2863 return -EACCES;
2864 }
2865
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org