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: <202210171930.aFLXgvx3-lkp@intel.com>
Date:   Mon, 17 Oct 2022 19:17:27 +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 1/20] drivers/iommu/iommufd/pages.c:275:5:
 warning: no previous prototype for function 'batch_iommu_map_small'

tree:   https://github.com/jgunthorpe/linux vfio_iommufd
head:   f44b706a4413f17e50f20999964b38d11ef84d98
commit: 7bdc8312d65ca5d0f189c073ab1d5a48a2a7bfbc [1/20] iommufd: PFN handling for iopt_pages
config: arm64-allyesconfig
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/jgunthorpe/linux/commit/7bdc8312d65ca5d0f189c073ab1d5a48a2a7bfbc
        git remote add jgunthorpe https://github.com/jgunthorpe/linux
        git fetch --no-tags jgunthorpe vfio_iommufd
        git checkout 7bdc8312d65ca5d0f189c073ab1d5a48a2a7bfbc
        # 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=arm64 SHELL=/bin/bash drivers/iommu/iommufd/

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 >>):

>> drivers/iommu/iommufd/pages.c:275:5: warning: no previous prototype for function 'batch_iommu_map_small' [-Wmissing-prototypes]
   int batch_iommu_map_small(struct iommu_domain *domain, unsigned long iova,
       ^
   drivers/iommu/iommufd/pages.c:275:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int batch_iommu_map_small(struct iommu_domain *domain, unsigned long iova,
   ^
   static 
   drivers/iommu/iommufd/pages.c:121:22: warning: unused function 'iopt_area_index_to_iova_last' [-Wunused-function]
   static unsigned long iopt_area_index_to_iova_last(struct iopt_area *area,
                        ^
   drivers/iommu/iommufd/pages.c:203:13: warning: unused function 'batch_init_backup' [-Wunused-function]
   static void batch_init_backup(struct pfn_batch *batch, size_t max_pages,
               ^
   drivers/iommu/iommufd/pages.c:297:12: warning: unused function 'batch_to_domain' [-Wunused-function]
   static int batch_to_domain(struct pfn_batch *batch, struct iommu_domain *domain,
              ^
   drivers/iommu/iommufd/pages.c:373:12: warning: unused function 'batch_to_xarray' [-Wunused-function]
   static int batch_to_xarray(struct pfn_batch *batch, struct xarray *xa,
              ^
   drivers/iommu/iommufd/pages.c:408:13: warning: unused function 'batch_to_pages' [-Wunused-function]
   static void batch_to_pages(struct pfn_batch *batch, struct page **pages)
               ^
   drivers/iommu/iommufd/pages.c:474:22: warning: unused function 'batch_rw' [-Wunused-function]
   static unsigned long batch_rw(struct pfn_batch *batch, void *data,
                        ^
   drivers/iommu/iommufd/pages.c:553:12: warning: unused function 'update_pinned' [-Wunused-function]
   static int update_pinned(struct iopt_pages *pages)
              ^
   drivers/iommu/iommufd/pages.c:722:13: warning: unused function 'pfn_reader_done' [-Wunused-function]
   static bool pfn_reader_done(struct pfn_reader *pfns)
               ^
   drivers/iommu/iommufd/pages.c:750:12: warning: unused function 'pfn_reader_seek_hole' [-Wunused-function]
   static int pfn_reader_seek_hole(struct pfn_reader *pfns,
              ^
   drivers/iommu/iommufd/pages.c:816:12: warning: unused function 'pfn_reader_first' [-Wunused-function]
   static int pfn_reader_first(struct pfn_reader *pfns, struct iopt_pages *pages,
              ^
   11 warnings generated.


vim +/batch_iommu_map_small +275 drivers/iommu/iommufd/pages.c

   267	
   268	/*
   269	 * This is part of the VFIO compatability support for VFIO_TYPE1_IOMMU. That
   270	 * mode permits splitting a mapped area up, and then one of the splits is
   271	 * unmapped. Doing this normally would cause us to violate our invariant of
   272	 * pairing map/unmap. Thus, to support old VFIO compatability disable support
   273	 * for batching consecutive PFNs.
   274	 */
 > 275	int batch_iommu_map_small(struct iommu_domain *domain, unsigned long iova,
   276				  phys_addr_t paddr, size_t size, int prot)
   277	{
   278		unsigned long start_iova = iova;
   279		int rc;
   280	
   281		while (size) {
   282			rc = iommu_map(domain, iova, paddr, PAGE_SIZE, prot);
   283			if (rc)
   284				goto err_unmap;
   285			iova += PAGE_SIZE;
   286			paddr += PAGE_SIZE;
   287			size -= PAGE_SIZE;
   288		}
   289		return 0;
   290	
   291	err_unmap:
   292		if (start_iova != iova)
   293			iommu_unmap_nofail(domain, start_iova, iova - start_iova);
   294		return rc;
   295	}
   296	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ