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:   Tue, 12 Apr 2022 04:24:13 +0800
From:   kernel test robot <lkp@...el.com>
To:     Zhu Lingshan <lingshan.zhu@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [ls-zhu:get_dev_config_submit 5/5] drivers/vdpa/vdpa.c:823:20:
 sparse: sparse: incorrect type in assignment (different base types)

tree:   https://github.com/ls-zhu/linux get_dev_config_submit
head:   c4a67f3ac1a9cc5a7bdc0121a9076c67a4f20af9
commit: c4a67f3ac1a9cc5a7bdc0121a9076c67a4f20af9 [5/5] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0
config: m68k-randconfig-s031-20220411 (https://download.01.org/0day-ci/archive/20220412/202204120428.0TpzQuA8-lkp@intel.com/config)
compiler: m68k-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://github.com/ls-zhu/linux/commit/c4a67f3ac1a9cc5a7bdc0121a9076c67a4f20af9
        git remote add ls-zhu https://github.com/ls-zhu/linux
        git fetch --no-tags ls-zhu get_dev_config_submit
        git checkout c4a67f3ac1a9cc5a7bdc0121a9076c67a4f20af9
        # 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=m68k SHELL=/bin/bash drivers/vdpa/

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 >>)
>> drivers/vdpa/vdpa.c:823:20: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [assigned] [usertype] mq @@     got restricted __virtio16 const [usertype] max_virtqueue_pairs @@
   drivers/vdpa/vdpa.c:823:20: sparse:     expected unsigned short [assigned] [usertype] mq
   drivers/vdpa/vdpa.c:823:20: sparse:     got restricted __virtio16 const [usertype] max_virtqueue_pairs
   drivers/vdpa/vdpa.c:825:19: sparse: sparse: cast to restricted __le16
   drivers/vdpa/vdpa.c:825:19: sparse: sparse: cast to restricted __le16
   drivers/vdpa/vdpa.c:825:19: sparse: sparse: cast to restricted __le16
   drivers/vdpa/vdpa.c:825:19: sparse: sparse: cast to restricted __le16
   drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast to restricted __le16
   drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast from restricted __virtio16
   drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast to restricted __le16
   drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast from restricted __virtio16
   drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast to restricted __le16
   drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast from restricted __virtio16
   drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast to restricted __le16
   drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast from restricted __virtio16
   drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast to restricted __le16
   drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast from restricted __virtio16
   drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast to restricted __le16
   drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast from restricted __virtio16
   drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast to restricted __le16
   drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast from restricted __virtio16
   drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast to restricted __le16
   drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast from restricted __virtio16

vim +823 drivers/vdpa/vdpa.c

   813	
   814	static int vdpa_dev_net_mq_config_fill(struct vdpa_device *vdev,
   815					       struct sk_buff *msg, u64 features,
   816					       const struct virtio_net_config *config)
   817	{
   818		u16 val_u16, mq;
   819	
   820		if ((features & BIT_ULL(VIRTIO_NET_F_MQ)) == 0) {
   821			mq = 1;
   822		} else
 > 823			mq = config->max_virtqueue_pairs;
   824	
   825		val_u16 = le16_to_cpu(mq);
   826	
   827		return nla_put_u16(msg, VDPA_ATTR_DEV_NET_CFG_MAX_VQP, val_u16);
   828	}
   829	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ