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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 7 Aug 2021 01:28:55 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Stevens <stevensd@...omium.org>,
        Robin Murphy <robin.murphy@....com>
Cc:     kbuild-all@...ts.01.org, Christoph Hellwig <hch@....de>,
        Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        Lu Baolu <baolu.lu@...ux.intel.com>,
        iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
        David Stevens <stevensd@...omium.org>
Subject: Re: [PATCH v2 2/9] dma-iommu: expose a few helper functions to module

Hi David,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on drm-intel/for-linux-next hch-configfs/for-next linus/master v5.14-rc4]
[cannot apply to next-20210805]
[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/David-Stevens/Add-dynamic-iommu-backed-bounce-buffers/20210806-183631
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: i386-randconfig-a011-20210804 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/385dff3d789a97ef650912616e9d696fba96cb20
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review David-Stevens/Add-dynamic-iommu-backed-bounce-buffers/20210806-183631
        git checkout 385dff3d789a97ef650912616e9d696fba96cb20
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

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/iommu/dma-iommu.c:415:12: error: conflicting types for '__iommu_dma_alloc_iova'
     415 | dma_addr_t __iommu_dma_alloc_iova(struct iommu_domain *domain,
         |            ^~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/iommu/dma-iommu.c:14:
   include/linux/dma-iommu.h:47:12: note: previous declaration of '__iommu_dma_alloc_iova' was here
      47 | dma_addr_t __iommu_dma_alloc_iova(struct iommu_domain *domain,
         |            ^~~~~~~~~~~~~~~~~~~~~~


vim +/__iommu_dma_alloc_iova +415 drivers/iommu/dma-iommu.c

   414	
 > 415	dma_addr_t __iommu_dma_alloc_iova(struct iommu_domain *domain,
   416			size_t size, u64 dma_limit, struct device *dev)
   417	{
   418		struct iommu_dma_cookie *cookie = domain->iova_cookie;
   419		struct iova_domain *iovad = &cookie->iovad;
   420		unsigned long shift, iova_len, iova = 0;
   421	
   422		if (cookie->type == IOMMU_DMA_MSI_COOKIE) {
   423			cookie->msi_iova += size;
   424			return cookie->msi_iova - size;
   425		}
   426	
   427		shift = iova_shift(iovad);
   428		iova_len = size >> shift;
   429		/*
   430		 * Freeing non-power-of-two-sized allocations back into the IOVA caches
   431		 * will come back to bite us badly, so we have to waste a bit of space
   432		 * rounding up anything cacheable to make sure that can't happen. The
   433		 * order of the unadjusted size will still match upon freeing.
   434		 */
   435		if (iova_len < (1 << (IOVA_RANGE_CACHE_MAX_SIZE - 1)))
   436			iova_len = roundup_pow_of_two(iova_len);
   437	
   438		dma_limit = min_not_zero(dma_limit, dev->bus_dma_limit);
   439	
   440		if (domain->geometry.force_aperture)
   441			dma_limit = min(dma_limit, (u64)domain->geometry.aperture_end);
   442	
   443		/* Try to get PCI devices a SAC address */
   444		if (dma_limit > DMA_BIT_MASK(32) && !iommu_dma_forcedac && dev_is_pci(dev))
   445			iova = alloc_iova_fast(iovad, iova_len,
   446					       DMA_BIT_MASK(32) >> shift, false);
   447	
   448		if (!iova)
   449			iova = alloc_iova_fast(iovad, iova_len, dma_limit >> shift,
   450					       true);
   451	
   452		return (dma_addr_t)iova << shift;
   453	}
   454	

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

Download attachment ".config.gz" of type "application/gzip" (39716 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ