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: <202108110150.CRsXvNJd-lkp@intel.com>
Date:   Wed, 11 Aug 2021 01:13:58 +0800
From:   kernel test robot <lkp@...el.com>
To:     Stafford Horne <shorne@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Subject: drivers/vhost/vhost.c:1035:16: sparse: sparse: restricted __virtio16
 degrades to integer

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9a73fa375d58fee5262dd16473c8e7522bdf44de
commit: d877322bc1adcab9850732275670409e8bcca4c4 openrisc: Fix issue with get_user for 64-bit values
date:   11 months ago
config: openrisc-randconfig-s031-20210810 (attached as .config)
compiler: or1k-linux-gcc (GCC) 10.3.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.3-348-gf0e6938b-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d877322bc1adcab9850732275670409e8bcca4c4
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d877322bc1adcab9850732275670409e8bcca4c4
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=openrisc SHELL=/bin/bash drivers/vhost/

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/vhost/vhost.c:1035:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1035:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1035:16: sparse: sparse: cast to restricted __virtio16
>> drivers/vhost/vhost.c:1035:16: sparse: sparse: restricted __virtio16 degrades to integer
>> drivers/vhost/vhost.c:1035:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1035:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1035:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1035:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1035:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1035:16: sparse: sparse: cast to restricted __virtio16
>> drivers/vhost/vhost.c:1035:16: sparse: sparse: restricted __virtio16 degrades to integer
>> drivers/vhost/vhost.c:1035:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1035:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1035:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1010:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1010:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1016:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1016:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1016:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1016:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1016:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1016:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1016:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1016:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1016:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1016:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1016:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1016:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1016:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1016:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1023:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1023:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1023:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1023:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1023:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1023:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1023:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1023:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1023:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1023:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1023:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1023:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1023:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1023:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1029:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1029:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1029:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1029:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1029:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1029:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1029:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1029:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1029:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1029:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1029:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1029:16: sparse: sparse: restricted __virtio16 degrades to integer
   drivers/vhost/vhost.c:1029:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1029:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16
   drivers/vhost/vhost.c:1010:16: sparse: sparse: cast to restricted __virtio16

vim +1035 drivers/vhost/vhost.c

7b5d753ebc22c5 Jason Wang 2019-05-24  1031  
7b5d753ebc22c5 Jason Wang 2019-05-24  1032  static inline int vhost_get_used_idx(struct vhost_virtqueue *vq,
7b5d753ebc22c5 Jason Wang 2019-05-24  1033  				     __virtio16 *idx)
7b5d753ebc22c5 Jason Wang 2019-05-24  1034  {
7b5d753ebc22c5 Jason Wang 2019-05-24 @1035  	return vhost_get_used(vq, *idx, &vq->used->idx);
7b5d753ebc22c5 Jason Wang 2019-05-24  1036  }
7b5d753ebc22c5 Jason Wang 2019-05-24  1037  

:::::: The code at line 1035 was first introduced by commit
:::::: 7b5d753ebc22c5b6935a70ce9a857dc6220784f8 vhost: fine grain userspace memory accessors

:::::: TO: Jason Wang <jasowang@...hat.com>
:::::: CC: Michael S. Tsirkin <mst@...hat.com>

---
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" (27466 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ