[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202301051620.ldjieGz1-lkp@intel.com>
Date: Thu, 5 Jan 2023 16:50:37 +0800
From: kernel test robot <lkp@...el.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Christoph Hellwig <hch@....de>
Subject: drivers/vhost/vringh.c:586:18: sparse: sparse: restricted __virtio16
degrades to integer
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 41c03ba9beea760bd2d2ac9250b09a2e192da2dc
commit: a97b693c3712f040c5802f32b2d685352e08cefa uaccess: fix nios2 and microblaze get_user_8()
date: 10 months ago
config: microblaze-randconfig-s051-20230105
compiler: microblaze-linux-gcc (GCC) 12.1.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-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a97b693c3712f040c5802f32b2d685352e08cefa
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a97b693c3712f040c5802f32b2d685352e08cefa
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=microblaze olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=microblaze SHELL=/bin/bash drivers/vhost/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/vhost/vringh.c:586:18: sparse: sparse: restricted __virtio16 degrades to integer
>> drivers/vhost/vringh.c:586:18: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vringh.c:586:18: sparse: sparse: cast to restricted __virtio16
vim +586 drivers/vhost/vringh.c
f87d0fbb579818 Rusty Russell 2013-03-20 581
f87d0fbb579818 Rusty Russell 2013-03-20 582 /* Userspace access helpers: in this case, addresses are really userspace. */
b9f7ac8c72894c Michael S. Tsirkin 2014-12-12 583 static inline int getu16_user(const struct vringh *vrh, u16 *val, const __virtio16 *p)
f87d0fbb579818 Rusty Russell 2013-03-20 584 {
b9f7ac8c72894c Michael S. Tsirkin 2014-12-12 585 __virtio16 v = 0;
b9f7ac8c72894c Michael S. Tsirkin 2014-12-12 @586 int rc = get_user(v, (__force __virtio16 __user *)p);
b9f7ac8c72894c Michael S. Tsirkin 2014-12-12 587 *val = vringh16_to_cpu(vrh, v);
b9f7ac8c72894c Michael S. Tsirkin 2014-12-12 588 return rc;
f87d0fbb579818 Rusty Russell 2013-03-20 589 }
f87d0fbb579818 Rusty Russell 2013-03-20 590
:::::: The code at line 586 was first introduced by commit
:::::: b9f7ac8c72894c19bf258a54ecaa708df4ffbe80 vringh: update for virtio 1.0 APIs
:::::: TO: Michael S. Tsirkin <mst@...hat.com>
:::::: CC: Michael S. Tsirkin <mst@...hat.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
View attachment "config" of type "text/plain" (115648 bytes)
Powered by blists - more mailing lists