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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201812200118.MYJ2XO0B%fengguang.wu@intel.com>
Date:   Thu, 20 Dec 2018 01:29:56 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Jason Wang <jasowang@...hat.com>
Cc:     kbuild-all@...org, mst@...hat.com, jasowang@...hat.com,
        kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jintack Lim <jintack@...columbia.edu>
Subject: Re: [PATCH net 4/4] vhost: log dirty page correctly

Hi Jason,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    https://github.com/0day-ci/linux/commits/Jason-Wang/Fix-various-issue-of-vhost/20181210-223236
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   include/linux/slab.h:332:43: warning: dubious: x & !y
   include/linux/slab.h:332:43: warning: dubious: x & !y
   include/linux/slab.h:332:43: warning: dubious: x & !y
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   include/linux/slab.h:332:43: warning: dubious: x & !y
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
>> drivers/vhost/vhost.c:1771:35: warning: cast removes address space '<asn:1>' of expression
   drivers/vhost/vhost.c:1776:42: warning: cast removes address space '<asn:1>' of expression
   drivers/vhost/vhost.c:1788:48: warning: cast removes address space '<asn:1>' of expression
   drivers/vhost/vhost.c:1819:13: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:1819:13:    expected void *addr
   drivers/vhost/vhost.c:1819:13:    got restricted __virtio16 [noderef] <asn:1> *<noident>
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   drivers/vhost/vhost.c:851:42: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:851:42:    expected void [noderef] <asn:1> *addr
   drivers/vhost/vhost.c:851:42:    got void *addr
   drivers/vhost/vhost.c:1837:13: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:1837:13:    expected void *addr
   drivers/vhost/vhost.c:1837:13:    got restricted __virtio16 [noderef] [usertype] <asn:1> *<noident>
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   drivers/vhost/vhost.c:851:42: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:851:42:    expected void [noderef] <asn:1> *addr
   drivers/vhost/vhost.c:851:42:    got void *addr
   drivers/vhost/vhost.c:1874:13: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:1874:13:    expected void *addr
   drivers/vhost/vhost.c:1874:13:    got restricted __virtio16 [noderef] <asn:1> *<noident>
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   drivers/vhost/vhost.c:851:42: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:851:42:    expected void [noderef] <asn:1> *addr
   drivers/vhost/vhost.c:851:42:    got void *addr
   drivers/vhost/vhost.c:2073:21: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:2073:21:    expected void *addr
   drivers/vhost/vhost.c:2073:21:    got restricted __virtio16 [noderef] <asn:1> *<noident>
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   drivers/vhost/vhost.c:851:42: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:851:42:    expected void [noderef] <asn:1> *addr
   drivers/vhost/vhost.c:851:42:    got void *addr
   drivers/vhost/vhost.c:2100:13: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:2100:13:    expected void *addr
   drivers/vhost/vhost.c:2100:13:    got restricted __virtio16 [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   drivers/vhost/vhost.c:851:42: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:851:42:    expected void [noderef] <asn:1> *addr
   drivers/vhost/vhost.c:851:42:    got void *addr
   drivers/vhost/vhost.c:2231:21: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:2231:21:    expected void *addr
   drivers/vhost/vhost.c:2231:21:    got restricted __virtio32 [noderef] <asn:1> *<noident>
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   drivers/vhost/vhost.c:851:42: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:851:42:    expected void [noderef] <asn:1> *addr
   drivers/vhost/vhost.c:851:42:    got void *addr
   drivers/vhost/vhost.c:2235:21: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:2235:21:    expected void *addr
   drivers/vhost/vhost.c:2235:21:    got restricted __virtio32 [noderef] <asn:1> *<noident>
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   drivers/vhost/vhost.c:851:42: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:851:42:    expected void [noderef] <asn:1> *addr
   drivers/vhost/vhost.c:851:42:    got void *addr
   drivers/vhost/vhost.c:2281:13: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:2281:13:    expected void *addr
   drivers/vhost/vhost.c:2281:13:    got restricted __virtio16 [noderef] <asn:1> *<noident>
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   drivers/vhost/vhost.c:851:42: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:851:42:    expected void [noderef] <asn:1> *addr
   drivers/vhost/vhost.c:851:42:    got void *addr
   drivers/vhost/vhost.c:2315:21: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:2315:21:    expected void *addr
   drivers/vhost/vhost.c:2315:21:    got restricted __virtio16 [noderef] <asn:1> *<noident>
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   drivers/vhost/vhost.c:851:42: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:851:42:    expected void [noderef] <asn:1> *addr
   drivers/vhost/vhost.c:851:42:    got void *addr
   drivers/vhost/vhost.c:2329:13: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:2329:13:    expected void *addr
   drivers/vhost/vhost.c:2329:13:    got restricted __virtio16 [noderef] [usertype] <asn:1> *<noident>
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   drivers/vhost/vhost.c:851:42: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:851:42:    expected void [noderef] <asn:1> *addr
   drivers/vhost/vhost.c:851:42:    got void *addr
   drivers/vhost/vhost.c:2374:13: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:2374:13:    expected void *addr
   drivers/vhost/vhost.c:2374:13:    got restricted __virtio16 [noderef] <asn:1> *<noident>
   drivers/vhost/vhost.c:704:17: warning: incorrect type in return expression (different address spaces)
   drivers/vhost/vhost.c:704:17:    expected void [noderef] <asn:1> *
   drivers/vhost/vhost.c:704:17:    got void *<noident>
   drivers/vhost/vhost.c:851:42: warning: incorrect type in argument 2 (different address spaces)
   drivers/vhost/vhost.c:851:42:    expected void [noderef] <asn:1> *addr

vim +1771 drivers/vhost/vhost.c

  1760	
  1761	static void log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len)
  1762	{
  1763		struct iovec iov[64];
  1764		int i, ret;
  1765	
  1766		if (!vq->iotlb) {
  1767			log_write(vq->log_base, vq->log_addr + used_offset, len);
  1768			return;
  1769		}
  1770	
> 1771		ret = translate_desc(vq, (u64)vq->used + used_offset, len, iov, 64,
  1772				     VHOST_ACCESS_WO);
  1773		WARN_ON(ret < 0);
  1774	
  1775		for (i = 0; i < ret; i++) {
  1776			ret = log_write_hva(vq, (u64)iov[i].iov_base, iov[i].iov_len);
  1777			WARN_ON(ret);
  1778		}
  1779	}
  1780	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (66638 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ