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>] [day] [month] [year] [list]
Date:   Thu, 27 Jan 2022 18:46:06 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jason Gunthorpe <jgg@...dia.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [jgunthorpe:for-yishai 9/19]
 drivers/vfio/pci/vfio_pci_core.c:1129:10: error: use of undeclared
 identifier 'feature'; did you mean 'return'?

tree:   https://github.com/jgunthorpe/linux for-yishai
head:   4425468e2b7ec3b986f1ef6aa34a208bb661b2d8
commit: a77cf53b1c02bdee0ee8bf06dc3bd92d55591c13 [9/19] vfio: Have the core code decode VFIO_DEVICE_FEATURE
config: riscv-randconfig-r042-20220126 (https://download.01.org/0day-ci/archive/20220127/202201271821.gWpB1Xrq-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f400a6012c668dfaa73462caf067ceb074e66c47)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/jgunthorpe/linux/commit/a77cf53b1c02bdee0ee8bf06dc3bd92d55591c13
        git remote add jgunthorpe https://github.com/jgunthorpe/linux
        git fetch --no-tags jgunthorpe for-yishai
        git checkout a77cf53b1c02bdee0ee8bf06dc3bd92d55591c13
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/vfio/pci/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> drivers/vfio/pci/vfio_pci_core.c:1129:10: error: use of undeclared identifier 'feature'; did you mean 'return'?
           switch (feature.flags & VFIO_DEVICE_FEATURE_MASK) {
                   ^~~~~~~
                   return
>> drivers/vfio/pci/vfio_pci_core.c:1129:10: error: expected expression
   2 errors generated.


vim +1129 drivers/vfio/pci/vfio_pci_core.c

43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1121  
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1122  int vfio_pci_core_ioctl_feature(struct vfio_device *device, u32 flags,
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1123  				void __user *arg, size_t argsz)
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1124  {
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1125  	struct vfio_pci_core_device *vdev =
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1126  		container_of(device, struct vfio_pci_core_device, vdev);
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1127  	uuid_t uuid;
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1128  
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24 @1129  	switch (feature.flags & VFIO_DEVICE_FEATURE_MASK) {
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1130  	case VFIO_DEVICE_FEATURE_PCI_VF_TOKEN:
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1131  		if (!vdev->vf_token)
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1132  			return -ENOTTY;
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1133  
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1134  		/*
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1135  		 * We do not support GET of the VF Token UUID as this could
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1136  		 * expose the token of the previous device user.
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1137  		 */
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1138  		if (flags & VFIO_DEVICE_FEATURE_GET)
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1139  			return -EINVAL;
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1140  
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1141  		if (flags & VFIO_DEVICE_FEATURE_PROBE)
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1142  			return 0;
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1143  
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1144  		/* Don't SET unless told to do so */
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1145  		if (!(flags & VFIO_DEVICE_FEATURE_SET))
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1146  			return -EINVAL;
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1147  
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1148  		if (argsz < sizeof(uuid))
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1149  			return -EINVAL;
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1150  
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1151  		if (copy_from_user(&uuid, arg, sizeof(uuid)))
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1152  			return -EFAULT;
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1153  
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1154  		mutex_lock(&vdev->vf_token->lock);
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1155  		uuid_copy(&vdev->vf_token->uuid, &uuid);
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1156  		mutex_unlock(&vdev->vf_token->lock);
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1157  		return 0;
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1158  	default:
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1159  		return -ENOTTY;
43eeeecc8ed5fa drivers/vfio/pci/vfio_pci.c      Alex Williamson 2020-03-24  1160  	}
8b27ee60bfd6bb drivers/vfio/pci/vfio_pci.c      Alex Williamson 2013-09-04  1161  }
a77cf53b1c02bd drivers/vfio/pci/vfio_pci_core.c Jason Gunthorpe 2022-01-26  1162  EXPORT_SYMBOL_GPL(vfio_pci_core_ioctl_feature);
89e1f7d4c66d85 drivers/vfio/pci/vfio_pci.c      Alex Williamson 2012-07-31  1163  

:::::: The code at line 1129 was first introduced by commit
:::::: 43eeeecc8ed5fa05652d68032a8bfb1308ee9baa vfio: Introduce VFIO_DEVICE_FEATURE ioctl and first user

:::::: TO: Alex Williamson <alex.williamson@...hat.com>
:::::: CC: Alex Williamson <alex.williamson@...hat.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ