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]
Message-ID: <202209290337.tNBExQZl-lkp@intel.com>
Date:   Thu, 29 Sep 2022 03:35:55 +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:vfio_iommufd 23/24] drivers/vfio/vfio.h:172:5: warning:
 no previous prototype for function 'vfio_container_pin_pages'

tree:   https://github.com/jgunthorpe/linux vfio_iommufd
head:   a97b7f88065ebfd42e065dd37f092fadf031b154
commit: ba8f921671cd4870b4cdbaf6d605faa57aee226d [23/24] vfio: Make vfio_container optionally compiled
config: arm-buildonly-randconfig-r002-20220925
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/jgunthorpe/linux/commit/ba8f921671cd4870b4cdbaf6d605faa57aee226d
        git remote add jgunthorpe https://github.com/jgunthorpe/linux
        git fetch --no-tags jgunthorpe vfio_iommufd
        git checkout ba8f921671cd4870b4cdbaf6d605faa57aee226d
        # 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=arm SHELL=/bin/bash drivers/iommu/ drivers/vfio/

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

All warnings (new ones prefixed by >>):

   In file included from drivers/vfio/vfio_main.c:39:
>> drivers/vfio/vfio.h:172:5: warning: no previous prototype for function 'vfio_container_pin_pages' [-Wmissing-prototypes]
   int vfio_container_pin_pages(struct vfio_container *container,
       ^
   drivers/vfio/vfio.h:172:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int vfio_container_pin_pages(struct vfio_container *container,
   ^
   static 
>> drivers/vfio/vfio.h:179:6: warning: no previous prototype for function 'vfio_container_unpin_pages' [-Wmissing-prototypes]
   void vfio_container_unpin_pages(struct vfio_container *container,
        ^
   drivers/vfio/vfio.h:179:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void vfio_container_unpin_pages(struct vfio_container *container,
   ^
   static 
>> drivers/vfio/vfio.h:184:5: warning: no previous prototype for function 'vfio_container_dma_rw' [-Wmissing-prototypes]
   int vfio_container_dma_rw(struct vfio_container *container, dma_addr_t iova,
       ^
   drivers/vfio/vfio.h:184:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int vfio_container_dma_rw(struct vfio_container *container, dma_addr_t iova,
   ^
   static 
   drivers/vfio/vfio_main.c:680:3: error: call to undeclared function 'vfio_group_detach_container'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   vfio_group_detach_container(group);
                   ^
   drivers/vfio/vfio_main.c:767:9: error: call to undeclared function 'vfio_group_use_container'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   ret = vfio_group_use_container(device->group);
                         ^
   drivers/vfio/vfio_main.c:767:9: note: did you mean 'vfio_group_ioctl_set_container'?
   drivers/vfio/vfio_main.c:692:12: note: 'vfio_group_ioctl_set_container' declared here
   static int vfio_group_ioctl_set_container(struct vfio_group *group,
              ^
   drivers/vfio/vfio_main.c:783:3: error: call to undeclared function 'vfio_device_container_register'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   vfio_device_container_register(device);
                   ^
   drivers/vfio/vfio_main.c:789:3: error: call to undeclared function 'vfio_group_unuse_container'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   vfio_group_unuse_container(device->group);
                   ^
   drivers/vfio/vfio_main.c:789:3: note: did you mean 'vfio_group_ioctl_set_container'?
   drivers/vfio/vfio_main.c:692:12: note: 'vfio_group_ioctl_set_container' declared here
   static int vfio_group_ioctl_set_container(struct vfio_group *group,
              ^
   drivers/vfio/vfio_main.c:804:3: error: call to undeclared function 'vfio_device_container_unregister'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   vfio_device_container_unregister(device);
                   ^
   drivers/vfio/vfio_main.c:809:3: error: call to undeclared function 'vfio_group_unuse_container'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   vfio_group_unuse_container(device->group);
                   ^
   drivers/vfio/vfio_main.c:1004:3: error: call to undeclared function 'vfio_group_detach_container'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   vfio_group_detach_container(group);
                   ^
   3 warnings and 7 errors generated.
--
   In file included from drivers/vfio/iommufd.c:8:
>> drivers/vfio/vfio.h:172:5: warning: no previous prototype for function 'vfio_container_pin_pages' [-Wmissing-prototypes]
   int vfio_container_pin_pages(struct vfio_container *container,
       ^
   drivers/vfio/vfio.h:172:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int vfio_container_pin_pages(struct vfio_container *container,
   ^
   static 
>> drivers/vfio/vfio.h:179:6: warning: no previous prototype for function 'vfio_container_unpin_pages' [-Wmissing-prototypes]
   void vfio_container_unpin_pages(struct vfio_container *container,
        ^
   drivers/vfio/vfio.h:179:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void vfio_container_unpin_pages(struct vfio_container *container,
   ^
   static 
>> drivers/vfio/vfio.h:184:5: warning: no previous prototype for function 'vfio_container_dma_rw' [-Wmissing-prototypes]
   int vfio_container_dma_rw(struct vfio_container *container, dma_addr_t iova,
       ^
   drivers/vfio/vfio.h:184:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int vfio_container_dma_rw(struct vfio_container *container, dma_addr_t iova,
   ^
   static 
   3 warnings generated.
--
   In file included from drivers/vfio/vfio_iommu_type1.c:42:
>> drivers/vfio/vfio.h:172:5: warning: no previous prototype for function 'vfio_container_pin_pages' [-Wmissing-prototypes]
   int vfio_container_pin_pages(struct vfio_container *container,
       ^
   drivers/vfio/vfio.h:172:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int vfio_container_pin_pages(struct vfio_container *container,
   ^
   static 
>> drivers/vfio/vfio.h:179:6: warning: no previous prototype for function 'vfio_container_unpin_pages' [-Wmissing-prototypes]
   void vfio_container_unpin_pages(struct vfio_container *container,
        ^
   drivers/vfio/vfio.h:179:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void vfio_container_unpin_pages(struct vfio_container *container,
   ^
   static 
>> drivers/vfio/vfio.h:184:5: warning: no previous prototype for function 'vfio_container_dma_rw' [-Wmissing-prototypes]
   int vfio_container_dma_rw(struct vfio_container *container, dma_addr_t iova,
       ^
   drivers/vfio/vfio.h:184:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int vfio_container_dma_rw(struct vfio_container *container, dma_addr_t iova,
   ^
   static 
>> drivers/vfio/vfio_iommu_type1.c:3168:14: warning: declaration of 'enum vfio_iommu_notify_type' will not be visible outside of this function [-Wvisibility]
                                       enum vfio_iommu_notify_type event)
                                            ^
   drivers/vfio/vfio_iommu_type1.c:3168:37: error: variable has incomplete type 'enum vfio_iommu_notify_type'
                                       enum vfio_iommu_notify_type event)
                                                                   ^
   drivers/vfio/vfio_iommu_type1.c:3168:14: note: forward declaration of 'enum vfio_iommu_notify_type'
                                       enum vfio_iommu_notify_type event)
                                            ^
   drivers/vfio/vfio_iommu_type1.c:3172:15: error: use of undeclared identifier 'VFIO_IOMMU_CONTAINER_CLOSE'
           if (event != VFIO_IOMMU_CONTAINER_CLOSE)
                        ^
   drivers/vfio/vfio_iommu_type1.c:3180:43: error: variable has incomplete type 'const struct vfio_iommu_driver_ops'
   static const struct vfio_iommu_driver_ops vfio_iommu_driver_ops_type1 = {
                                             ^
   drivers/vfio/vfio_iommu_type1.c:3180:21: note: forward declaration of 'struct vfio_iommu_driver_ops'
   static const struct vfio_iommu_driver_ops vfio_iommu_driver_ops_type1 = {
                       ^
   drivers/vfio/vfio_iommu_type1.c:3199:9: error: call to undeclared function 'vfio_register_iommu_driver'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           return vfio_register_iommu_driver(&vfio_iommu_driver_ops_type1);
                  ^
   drivers/vfio/vfio_iommu_type1.c:3204:2: error: call to undeclared function 'vfio_unregister_iommu_driver'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           vfio_unregister_iommu_driver(&vfio_iommu_driver_ops_type1);
           ^
   drivers/vfio/vfio_iommu_type1.c:3204:2: note: did you mean 'vfio_unregister_group_dev'?
   include/linux/vfio.h:228:6: note: 'vfio_unregister_group_dev' declared here
   void vfio_unregister_group_dev(struct vfio_device *device);
        ^
   4 warnings and 5 errors generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for TEGRA20_APB_DMA
   Depends on [n]: DMADEVICES [=n] && (ARCH_TEGRA [=y] || COMPILE_TEST [=y])
   Selected by [y]:
   - SOC_TEGRA_FUSE [=y] && ARCH_TEGRA [=y] && ARCH_TEGRA_2x_SOC [=y]
   WARNING: unmet direct dependencies detected for VFIO_IOMMU_TYPE1
   Depends on [n]: VFIO [=y] && VFIO_CONTAINER [=n]
   Selected by [y]:
   - VFIO [=y] && (IOMMUFD [=y] || !IOMMUFD [=y]) && MMU [=y] && (X86 || S390 || ARM [=y] || ARM64)


vim +/vfio_container_pin_pages +172 drivers/vfio/vfio.h

   171	
 > 172	int vfio_container_pin_pages(struct vfio_container *container,
   173				     struct iommu_group *iommu_group, dma_addr_t iova,
   174				     int npage, int prot, struct page **pages)
   175	{
   176		return -EOPNOTSUPP;
   177	}
   178	
 > 179	void vfio_container_unpin_pages(struct vfio_container *container,
   180					dma_addr_t iova, int npage)
   181	{
   182	}
   183	
 > 184	int vfio_container_dma_rw(struct vfio_container *container, dma_addr_t iova,
   185				  void *data, size_t len, bool write)
   186	{
   187		return -EOPNOTSUPP;
   188	}
   189	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (169676 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ