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]
Date:   Mon, 14 Mar 2022 08:16:16 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kumar Kartikeya Dwivedi <memxor@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Toke Høiland-Jørgensen <toke@...hat.com>
Subject: [toke:xdp-queueing-03 7/9] kernel/bpf/verifier.c:1580:39: sparse:
 sparse: mixing different enum types:

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git xdp-queueing-03
head:   3e7f25d58b1bfd5ad623678bf9e11f27c98a8094
commit: 28d9ca982b9ae96bcad2bee81647ba18ae049a69 [7/9] bpf: Enable direct packet access for dequeue packets
config: s390-randconfig-s031-20220313 (https://download.01.org/0day-ci/archive/20220314/202203140808.WyoqkliI-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git/commit/?id=28d9ca982b9ae96bcad2bee81647ba18ae049a69
        git remote add toke https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git
        git fetch --no-tags toke xdp-queueing-03
        git checkout 28d9ca982b9ae96bcad2bee81647ba18ae049a69
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> kernel/bpf/verifier.c:1580:39: sparse: sparse: mixing different enum types:
>> kernel/bpf/verifier.c:1580:39: sparse:    unsigned int enum bpf_reg_type
>> kernel/bpf/verifier.c:1580:39: sparse:    unsigned int enum bpf_type_flag
   kernel/bpf/verifier.c:13799:38: sparse: sparse: subtraction of functions? Share your drugs
   kernel/bpf/verifier.c: note: in included file (through include/linux/bpf.h, include/linux/bpf-cgroup.h):
   include/linux/bpfptr.h:52:47: sparse: sparse: cast to non-scalar
   include/linux/bpfptr.h:52:47: sparse: sparse: cast from non-scalar
   include/linux/bpfptr.h:63:40: sparse: sparse: cast to non-scalar
   include/linux/bpfptr.h:63:40: sparse: sparse: cast from non-scalar
   include/linux/bpfptr.h:52:47: sparse: sparse: cast to non-scalar
   include/linux/bpfptr.h:52:47: sparse: sparse: cast from non-scalar
   include/linux/bpfptr.h:63:40: sparse: sparse: cast to non-scalar
   include/linux/bpfptr.h:63:40: sparse: sparse: cast from non-scalar
   include/linux/bpfptr.h:52:47: sparse: sparse: cast to non-scalar
   include/linux/bpfptr.h:52:47: sparse: sparse: cast from non-scalar
   include/linux/bpfptr.h:63:40: sparse: sparse: cast to non-scalar
   include/linux/bpfptr.h:63:40: sparse: sparse: cast from non-scalar
   include/linux/bpfptr.h:52:47: sparse: sparse: cast to non-scalar
   include/linux/bpfptr.h:52:47: sparse: sparse: cast from non-scalar
   include/linux/bpfptr.h:52:47: sparse: sparse: cast to non-scalar
   include/linux/bpfptr.h:52:47: sparse: sparse: cast from non-scalar

vim +1580 kernel/bpf/verifier.c

  1568	
  1569	static void mark_btf_ld_reg(struct bpf_verifier_env *env,
  1570				    struct bpf_reg_state *regs, u32 regno,
  1571				    enum bpf_reg_type reg_type,
  1572				    struct btf *btf, u32 reg_id,
  1573				    enum bpf_type_flag flag)
  1574	{
  1575		if (reg_type == SCALAR_VALUE) {
  1576			mark_reg_unknown(env, regs, regno);
  1577			return;
  1578		}
  1579		mark_reg_known_zero(env, regs, regno);
> 1580		regs[regno].type = reg_type | flag;
  1581		/* If not PTR_TO_BTF_ID, it is a pkt pointer */
  1582		if (reg_type != PTR_TO_BTF_ID) {
  1583			regs[regno].pkt_uid = reg_id;
  1584			return;
  1585		}
  1586		regs[regno].btf = btf;
  1587		regs[regno].btf_id = reg_id;
  1588	}
  1589	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ