[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] vfio/pci: Verify each MSI vector to avoid invalid MSI vec
From: |
kernel test robot |
Subject: |
Re: [PATCH v2] vfio/pci: Verify each MSI vector to avoid invalid MSI vectors |
Date: |
Sat, 26 Nov 2022 09:21:16 +0800 |
Hi chenxiang,
I love your patch! Yet something to improve:
[auto build test ERROR on kvmarm/next]
[also build test ERROR on awilliam-vfio/next awilliam-vfio/for-linus kvm/queue
linus/master v6.1-rc6 next-20221125]
[cannot apply to kvm/linux-next]
[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#_base_tree_information]
url:
https://github.com/intel-lab-lkp/linux/commits/chenxiang/vfio-pci-Verify-each-MSI-vector-to-avoid-invalid-MSI-vectors/20221123-091502
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next
patch link:
https://lore.kernel.org/r/1669167756-196788-1-git-send-email-chenxiang66%40hisilicon.com
patch subject: [PATCH v2] vfio/pci: Verify each MSI vector to avoid invalid MSI
vectors
config: i386-randconfig-a015
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project
f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/intel-lab-lkp/linux/commit/c6c1cf8daf3f86b7d4761bfca5bc9d55981191ea
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review
chenxiang/vfio-pci-Verify-each-MSI-vector-to-avoid-invalid-MSI-vectors/20221123-091502
git checkout c6c1cf8daf3f86b7d4761bfca5bc9d55981191ea
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1
O=build_dir ARCH=i386 SHELL=/bin/bash drivers/vfio/pci/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/vfio/pci/vfio_pci_intrs.c:327:22: error: no member named 'irqfds' in
>> 'struct kvm'
spin_lock_irq(&kvm->irqfds.lock);
~~~ ^
drivers/vfio/pci/vfio_pci_intrs.c:328:33: error: no member named 'irqfds' in
'struct kvm'
list_for_each_entry(tmp, &kvm->irqfds.items, list) {
~~~ ^
include/linux/list.h:674:30: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^~~~
include/linux/list.h:531:14: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^~~
include/linux/list.h:520:15: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^~~
include/linux/container_of.h:18:26: note: expanded from macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
drivers/vfio/pci/vfio_pci_intrs.c:328:33: error: no member named 'irqfds' in
'struct kvm'
list_for_each_entry(tmp, &kvm->irqfds.items, list) {
~~~ ^
include/linux/list.h:674:30: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^~~~
include/linux/list.h:531:14: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^~~
include/linux/list.h:520:15: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to
see all)
include/linux/compiler_types.h:298:63: note: expanded from macro
'__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~
include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^~~~
drivers/vfio/pci/vfio_pci_intrs.c:328:33: error: no member named 'irqfds' in
'struct kvm'
list_for_each_entry(tmp, &kvm->irqfds.items, list) {
~~~ ^
include/linux/list.h:674:30: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^~~~
include/linux/list.h:531:14: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^~~
include/linux/list.h:520:15: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to
see all)
include/linux/compiler_types.h:298:63: note: expanded from macro
'__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~
include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^~~~
drivers/vfio/pci/vfio_pci_intrs.c:328:33: error: no member named 'irqfds' in
'struct kvm'
list_for_each_entry(tmp, &kvm->irqfds.items, list) {
~~~ ^
include/linux/list.h:675:32: note: expanded from macro 'list_for_each_entry'
!list_entry_is_head(pos, head, member); \
^~~~
include/linux/list.h:665:20: note: expanded from macro 'list_entry_is_head'
(&pos->member == (head))
^~~~
drivers/vfio/pci/vfio_pci_intrs.c:334:24: error: no member named 'irqfds' in
'struct kvm'
spin_unlock_irq(&kvm->irqfds.lock);
~~~ ^
6 errors generated.
vim +327 drivers/vfio/pci/vfio_pci_intrs.c
318
319 static int vfio_pci_verify_msi_entry(struct vfio_pci_core_device *vdev,
320 struct eventfd_ctx *trigger)
321 {
322 struct kvm *kvm = vdev->vdev.kvm;
323 struct kvm_kernel_irqfd *tmp;
324 struct kvm_kernel_irq_routing_entry irq_entry;
325 int ret = -ENODEV;
326
> 327 spin_lock_irq(&kvm->irqfds.lock);
328 list_for_each_entry(tmp, &kvm->irqfds.items, list) {
329 if (trigger == tmp->eventfd) {
330 ret = 0;
331 break;
332 }
333 }
334 spin_unlock_irq(&kvm->irqfds.lock);
335 if (ret)
336 return ret;
337 irq_entry = tmp->irq_entry;
338 return kvm_verify_msi(kvm, &irq_entry);
339 }
340
--
0-DAY CI Kernel Test Service
https://01.org/lkp
config
Description: Text document