From: kernel test robot <lkp@intel.com>
To: Jorgen Hansen <jhansen@vmware.com>,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org
Cc: kbuild-all@lists.01.org, gregkh@linuxfoundation.org,
pv-drivers@vmware.com, Jorgen Hansen <jhansen@vmware.com>
Subject: Re: [PATCH] VMCI: Enforce queuepair max size for IOCTL_VMCI_QUEUEPAIR_ALLOC
Date: Mon, 11 Jan 2021 23:45:12 +0800 [thread overview]
Message-ID: <202101112319.WLZdcOAU-lkp@intel.com> (raw)
In-Reply-To: <1610367535-4463-1-git-send-email-jhansen@vmware.com>
[-- Attachment #1: Type: text/plain, Size: 3464 bytes --]
Hi Jorgen,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on char-misc/char-misc-testing linus/master v5.11-rc3 next-20210111]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jorgen-Hansen/VMCI-Enforce-queuepair-max-size-for-IOCTL_VMCI_QUEUEPAIR_ALLOC/20210111-204259
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 09162bc32c880a791c6c0668ce0745cf7958f576
config: i386-randconfig-s001-20210111 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# https://github.com/0day-ci/linux/commit/0923aeac7af9635dd6bf0141e8188f4815e573d2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jorgen-Hansen/VMCI-Enforce-queuepair-max-size-for-IOCTL_VMCI_QUEUEPAIR_ALLOC/20210111-204259
git checkout 0923aeac7af9635dd6bf0141e8188f4815e573d2
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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/misc/vmw_vmci/vmci_queue_pair.c:533:20: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> drivers/misc/vmw_vmci/vmci_queue_pair.c:533:20: sparse: unsigned int *
>> drivers/misc/vmw_vmci/vmci_queue_pair.c:533:20: sparse: unsigned long *
vim +533 drivers/misc/vmw_vmci/vmci_queue_pair.c
519
520 /*
521 * Allocates kernel VA space of specified size plus space for the queue
522 * and kernel interface. This is different from the guest queue allocator,
523 * because we do not allocate our own queue header/data pages here but
524 * share those of the guest.
525 */
526 static struct vmci_queue *qp_host_alloc_queue(u64 size)
527 {
528 struct vmci_queue *queue;
529 size_t queue_page_size;
530 u64 num_pages;
531 const size_t queue_size = sizeof(*queue) + sizeof(*(queue->kernel_if));
532
> 533 if (size > min(VMCI_MAX_GUEST_QP_MEMORY, SIZE_MAX - PAGE_SIZE))
534 return NULL;
535 num_pages = DIV_ROUND_UP(size, PAGE_SIZE) + 1;
536 if (num_pages > (SIZE_MAX - queue_size) /
537 sizeof(*queue->kernel_if->u.h.page))
538 return NULL;
539
540 queue_page_size = num_pages * sizeof(*queue->kernel_if->u.h.page);
541
542 queue = kzalloc(queue_size + queue_page_size, GFP_KERNEL);
543 if (queue) {
544 queue->q_header = NULL;
545 queue->saved_header = NULL;
546 queue->kernel_if = (struct vmci_queue_kern_if *)(queue + 1);
547 queue->kernel_if->host = true;
548 queue->kernel_if->mutex = NULL;
549 queue->kernel_if->num_pages = num_pages;
550 queue->kernel_if->u.h.header_page =
551 (struct page **)((u8 *)queue + queue_size);
552 queue->kernel_if->u.h.page =
553 &queue->kernel_if->u.h.header_page[1];
554 }
555
556 return queue;
557 }
558
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35562 bytes --]
next prev parent reply other threads:[~2021-01-11 15:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 12:18 [PATCH] VMCI: Enforce queuepair max size for IOCTL_VMCI_QUEUEPAIR_ALLOC Jorgen Hansen
2021-01-11 12:18 ` [PATCH] VMCI: Stop log spew when qp allocation isn't possible Jorgen Hansen
2021-01-11 12:18 ` [PATCH] VMCI: Use set_page_dirty_lock() when unregistering guest memory Jorgen Hansen
2021-01-11 12:46 ` [PATCH] VMCI: Enforce queuepair max size for IOCTL_VMCI_QUEUEPAIR_ALLOC Greg KH
2021-01-11 14:05 ` Jorgen Hansen
2021-01-11 14:16 ` Greg KH
2021-01-11 15:45 ` kernel test robot [this message]
2021-01-18 11:27 ` Stefano Garzarella
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=202101112319.WLZdcOAU-lkp@intel.com \
--to=lkp@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jhansen@vmware.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pv-drivers@vmware.com \
--cc=virtualization@lists.linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).