From: kernel test robot <lkp@intel.com>
To: Eli Cohen <elic@nvidia.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: drivers/vhost/vringh.c:586:18: sparse: sparse: restricted __virtio16 degrades to integer
Date: Wed, 1 Dec 2021 12:33:23 +0800 [thread overview]
Message-ID: <202112011211.B9QiemfX-lkp@intel.com> (raw)
Hi Eli,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 58e1100fdc5990b0cc0d4beaf2562a92e621ac7d
commit: 5262912ef3cfc5e518892c3d67fb36412cb813e2 vdpa/mlx5: Add support for control VQ and MAC setting
date: 3 months ago
config: riscv-randconfig-s031-20211201 (https://download.01.org/0day-ci/archive/20211201/202112011211.B9QiemfX-lkp@intel.com/config)
compiler: riscv32-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/torvalds/linux.git/commit/?id=5262912ef3cfc5e518892c3d67fb36412cb813e2
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5262912ef3cfc5e518892c3d67fb36412cb813e2
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash drivers/vhost/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.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
drivers/vhost/vringh.c:594:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vringh.c:594:16: sparse: sparse: restricted __virtio16 degrades to integer
>> drivers/vhost/vringh.c:594:16: sparse: sparse: cast from 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
b9f7ac8c72894c Michael S. Tsirkin 2014-12-12 591 static inline int putu16_user(const struct vringh *vrh, __virtio16 *p, u16 val)
f87d0fbb579818 Rusty Russell 2013-03-20 592 {
b9f7ac8c72894c Michael S. Tsirkin 2014-12-12 593 __virtio16 v = cpu_to_vringh16(vrh, val);
b9f7ac8c72894c Michael S. Tsirkin 2014-12-12 @594 return put_user(v, (__force __virtio16 __user *)p);
f87d0fbb579818 Rusty Russell 2013-03-20 595 }
f87d0fbb579818 Rusty Russell 2013-03-20 596
:::::: The code at line 586 was first introduced by commit
:::::: b9f7ac8c72894c19bf258a54ecaa708df4ffbe80 vringh: update for virtio 1.0 APIs
:::::: TO: Michael S. Tsirkin <mst@redhat.com>
:::::: CC: Michael S. Tsirkin <mst@redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next reply other threads:[~2021-12-01 4:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 4:33 kernel test robot [this message]
2022-06-04 9:09 kernel test robot
2023-01-05 8:50 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202112011211.B9QiemfX-lkp@intel.com \
--to=lkp@intel.com \
--cc=elic@nvidia.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®