Re: [PATCH] BPF: replace low-entropy member with macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

kernel test robot noticed the following build errors:

[auto build test ERROR on 919e659ed12568b5b8ba6c2ffdd82d8d31fc28af]

url:    https://github.com/intel-lab-lkp/linux/commits/zhongjun-uniontech-com/BPF-replace-low-entropy-member-with-macro/20230407-113614
base:   919e659ed12568b5b8ba6c2ffdd82d8d31fc28af
patch link:    https://lore.kernel.org/r/20230407033418.2295-1-zhongjun%40uniontech.com
patch subject: [PATCH] BPF: replace low-entropy member with macro
config: x86_64-randconfig-a002-20230403 (https://download.01.org/0day-ci/archive/20230407/202304071944.aYRCuc4u-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/intel-lab-lkp/linux/commit/f8ee7d5ddcfe866f9b9b4f18dff368764ea854e5
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review zhongjun-uniontech-com/BPF-replace-low-entropy-member-with-macro/20230407-113614
        git checkout f8ee7d5ddcfe866f9b9b4f18dff368764ea854e5
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/ethernet/netronome/nfp/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202304071944.aYRCuc4u-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/net/ethernet/netronome/nfp/bpf/verifier.c:814:57: error: no member named 'orig_idx' in 'struct bpf_insn_aux_data'
           meta = nfp_bpf_goto_meta(nfp_prog, meta, aux_data[off].orig_idx);
                                                    ~~~~~~~~~~~~~ ^
   drivers/net/ethernet/netronome/nfp/bpf/verifier.c:827:52: error: no member named 'orig_idx' in 'struct bpf_insn_aux_data'
                   } else if (meta->jmp_dst->n != aux_data[tgt_off].orig_idx) {
                                                  ~~~~~~~~~~~~~~~~~ ^
   drivers/net/ethernet/netronome/nfp/bpf/verifier.c:830:23: error: no member named 'orig_idx' in 'struct bpf_insn_aux_data'
                                   aux_data[tgt_off].orig_idx);
                                   ~~~~~~~~~~~~~~~~~ ^
   drivers/net/ethernet/netronome/nfp/bpf/verifier.c:17:46: note: expanded from macro 'pr_vlog'
           bpf_verifier_log_write(env, "[nfp] " fmt, ##__VA_ARGS__)
                                                       ^~~~~~~~~~~
   drivers/net/ethernet/netronome/nfp/bpf/verifier.c:848:57: error: no member named 'orig_idx' in 'struct bpf_insn_aux_data'
           meta = nfp_bpf_goto_meta(nfp_prog, meta, aux_data[off].orig_idx);
                                                    ~~~~~~~~~~~~~ ^
   4 errors generated.


vim +814 drivers/net/ethernet/netronome/nfp/bpf/verifier.c

a32014b351662f Jakub Kicinski 2019-01-22  806  
a32014b351662f Jakub Kicinski 2019-01-22  807  int nfp_bpf_opt_replace_insn(struct bpf_verifier_env *env, u32 off,
a32014b351662f Jakub Kicinski 2019-01-22  808  			     struct bpf_insn *insn)
a32014b351662f Jakub Kicinski 2019-01-22  809  {
a32014b351662f Jakub Kicinski 2019-01-22  810  	struct nfp_prog *nfp_prog = env->prog->aux->offload->dev_priv;
a32014b351662f Jakub Kicinski 2019-01-22  811  	struct bpf_insn_aux_data *aux_data = env->insn_aux_data;
a32014b351662f Jakub Kicinski 2019-01-22  812  	struct nfp_insn_meta *meta = nfp_prog->verifier_meta;
a32014b351662f Jakub Kicinski 2019-01-22  813  
a32014b351662f Jakub Kicinski 2019-01-22 @814  	meta = nfp_bpf_goto_meta(nfp_prog, meta, aux_data[off].orig_idx);
a32014b351662f Jakub Kicinski 2019-01-22  815  	nfp_prog->verifier_meta = meta;
a32014b351662f Jakub Kicinski 2019-01-22  816  
a32014b351662f Jakub Kicinski 2019-01-22  817  	/* conditional jump to jump conversion */
a32014b351662f Jakub Kicinski 2019-01-22  818  	if (is_mbpf_cond_jump(meta) &&
a32014b351662f Jakub Kicinski 2019-01-22  819  	    insn->code == (BPF_JMP | BPF_JA | BPF_K)) {
a32014b351662f Jakub Kicinski 2019-01-22  820  		unsigned int tgt_off;
a32014b351662f Jakub Kicinski 2019-01-22  821  
a32014b351662f Jakub Kicinski 2019-01-22  822  		tgt_off = off + insn->off + 1;
a32014b351662f Jakub Kicinski 2019-01-22  823  
a32014b351662f Jakub Kicinski 2019-01-22  824  		if (!insn->off) {
a32014b351662f Jakub Kicinski 2019-01-22  825  			meta->jmp_dst = list_next_entry(meta, l);
a32014b351662f Jakub Kicinski 2019-01-22  826  			meta->jump_neg_op = false;
a32014b351662f Jakub Kicinski 2019-01-22  827  		} else if (meta->jmp_dst->n != aux_data[tgt_off].orig_idx) {
a32014b351662f Jakub Kicinski 2019-01-22  828  			pr_vlog(env, "branch hard wire at %d changes target %d -> %d\n",
a32014b351662f Jakub Kicinski 2019-01-22  829  				off, meta->jmp_dst->n,
a32014b351662f Jakub Kicinski 2019-01-22  830  				aux_data[tgt_off].orig_idx);
a32014b351662f Jakub Kicinski 2019-01-22  831  			return -EINVAL;
a32014b351662f Jakub Kicinski 2019-01-22  832  		}
a32014b351662f Jakub Kicinski 2019-01-22  833  		return 0;
a32014b351662f Jakub Kicinski 2019-01-22  834  	}
a32014b351662f Jakub Kicinski 2019-01-22  835  
a32014b351662f Jakub Kicinski 2019-01-22  836  	pr_vlog(env, "unsupported instruction replacement %hhx -> %hhx\n",
a32014b351662f Jakub Kicinski 2019-01-22  837  		meta->insn.code, insn->code);
a32014b351662f Jakub Kicinski 2019-01-22  838  	return -EINVAL;
a32014b351662f Jakub Kicinski 2019-01-22  839  }
9a06927e778bc4 Jakub Kicinski 2019-01-22  840  

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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux