lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202109181230.R05nxyO1-lkp@intel.com>
Date:   Sat, 18 Sep 2021 12:22:37 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alexei Starovoitov <ast@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [ast-bpf:relo_core 5/11] kernel/bpf/btf.c:6498:6: error: variable
 'err' set but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git relo_core
head:   35a0182c26565e1db43f99a764834bff8a2e4202
commit: 98beca424883749fbcf9f244bb26c96ed3102502 [5/11] bpf: Add bpf_core_add_cands() and wire it into bpf_core_apply_relo_insn().
config: i386-buildonly-randconfig-r001-20210916 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c8b3d7d6d6de37af68b2f379d0e37304f78e115f)
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://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git/commit/?id=98beca424883749fbcf9f244bb26c96ed3102502
        git remote add ast-bpf https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git
        git fetch --no-tags ast-bpf relo_core
        git checkout 98beca424883749fbcf9f244bb26c96ed3102502
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> kernel/bpf/btf.c:6498:6: error: variable 'err' set but not used [-Werror,-Wunused-but-set-variable]
           int err;
               ^
   1 error generated.


vim +/err +6498 kernel/bpf/btf.c

  6491	
  6492	BPF_CALL_5(bpf_core_apply_relo, int, btf_fd, struct bpf_core_relo_desc *, relo,
  6493		   int, relo_sz, void *, insn, int, flags)
  6494	{
  6495		struct bpf_core_cand_list *cands = NULL;
  6496		struct bpf_core_relo core_relo = {};
  6497		struct btf *btf;
> 6498		int err;
  6499	
  6500		if (flags)
  6501			return -EINVAL;
  6502	
  6503		if (sizeof(*relo) != relo_sz)
  6504			return -EINVAL;
  6505		btf = btf_get_by_fd(btf_fd);
  6506		if (IS_ERR(btf))
  6507			return PTR_ERR(btf);
  6508		if (btf_is_kernel(btf)) {
  6509			btf_put(btf);
  6510			return -EACCES;
  6511		}
  6512		if (relo->kind != BPF_CORE_TYPE_ID_LOCAL) {
  6513			cands = bpf_core_find_cands(btf, relo->type_id);
  6514			if (IS_ERR(cands)) {
  6515				btf_put(btf);
  6516				printk("target candidate search failed for %d\n",
  6517				       relo->type_id);
  6518	                        return PTR_ERR(cands);
  6519	                }
  6520		}
  6521		core_relo.type_id = relo->type_id;
  6522		core_relo.access_str_off = relo->access_str_off;
  6523		core_relo.kind = relo->kind;
  6524		err = bpf_core_apply_relo_insn("prog_name", insn, 0, &core_relo, 0, btf, cands);
  6525		btf_put(btf);
  6526		return 0;
  6527	}
  6528	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (38968 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ