Content-Type: multipart/mixed; boundary="===============5188957761002572910==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH RFC v2 22/25] kmsan: unpoisoning buffers from devices etc. Date: Mon, 04 Nov 2019 02:16:34 +0800 Message-ID: <201911040220.JnRew84K%lkp@intel.com> In-Reply-To: <20191030142237.249532-23-glider@google.com> List-Id: --===============5188957761002572910== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on linus/master] [also build test WARNING on v5.4-rc5] [cannot apply to next-20191031] [if your patch is applied to the wrong git tree, please drop us a note to h= elp improve the system. BTW, we also suggest to use '--base' option to specify = the base tree in git format-patch, please see https://stackoverflow.com/a/37406= 982] url: https://github.com/0day-ci/linux/commits/glider-google-com/Add-Kern= elMemorySanitizer-infrastructure/20191102-050032 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = 0dbe6cb8f7e05bc9611602ef45980a6c57b245a3 reproduce: # apt-get install sparse # sparse version: v0.6.1-6-g57f8611-dirty make ARCH=3Dx86_64 allmodconfig make C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) >> drivers/virtio/virtio_ring.c:396:40: sparse: sparse: cast from restricte= d __virtio64 >> drivers/virtio/virtio_ring.c:396:69: sparse: sparse: incorrect type in a= rgument 2 (different base types) @@ expected unsigned long [usertype] si= ze @@ got restrictunsigned long [usertype] size @@ >> drivers/virtio/virtio_ring.c:396:69: sparse: expected unsigned long [= usertype] size >> drivers/virtio/virtio_ring.c:396:69: sparse: got restricted __virtio3= 2 [usertype] len drivers/virtio/virtio_ring.c:1414:50: sparse: sparse: incorrect type in = argument 2 (different base types) @@ expected restricted __virtio16 [use= rtype] *p @@ got rtio16 [usertype] *p @@ drivers/virtio/virtio_ring.c:1414:50: sparse: expected restricted __v= irtio16 [usertype] *p drivers/virtio/virtio_ring.c:1414:50: sparse: got restricted __le16 * drivers/virtio/virtio_ring.c:1415:33: sparse: sparse: incorrect type in = argument 3 (different base types) @@ expected restricted __virtio16 [use= rtype] v @@ got ricted __virtio16 [usertype] v @@ drivers/virtio/virtio_ring.c:1415:33: sparse: expected restricted __v= irtio16 [usertype] v drivers/virtio/virtio_ring.c:1415:33: sparse: got restricted __le16 [= usertype] vim +396 drivers/virtio/virtio_ring.c 362 = 363 = 364 /* 365 * Split ring specific functions - *_split(). 366 */ 367 = 368 static void vring_unmap_one_split(const struct vring_virtqueue *vq, 369 struct vring_desc *desc) 370 { 371 u16 flags; 372 = 373 if (!vq->use_dma_api) 374 return; 375 = 376 flags =3D virtio16_to_cpu(vq->vq.vdev, desc->flags); 377 = 378 if (flags & VRING_DESC_F_INDIRECT) { 379 dma_unmap_single(vring_dma_dev(vq), 380 virtio64_to_cpu(vq->vq.vdev, desc->addr), 381 virtio32_to_cpu(vq->vq.vdev, desc->len), 382 (flags & VRING_DESC_F_WRITE) ? 383 DMA_FROM_DEVICE : DMA_TO_DEVICE); 384 } else { 385 dma_unmap_page(vring_dma_dev(vq), 386 virtio64_to_cpu(vq->vq.vdev, desc->addr), 387 virtio32_to_cpu(vq->vq.vdev, desc->len), 388 (flags & VRING_DESC_F_WRITE) ? 389 DMA_FROM_DEVICE : DMA_TO_DEVICE); 390 } 391 /* 392 * Unmapping DMA memory after a transfer from device requires this 393 * memory to be unpoisoned. 394 */ 395 if (flags & VRING_DESC_F_WRITE) > 396 kmsan_unpoison_shadow((const void *)desc->addr, desc->len); 397 } 398 = --- 0-DAY kernel test infrastructure Open Source Technology Cent= er https://lists.01.org/pipermail/kbuild-all Intel Corporati= on --===============5188957761002572910==--