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]
Message-ID: <202104141244.12APZ2en-lkp@intel.com>
Date:   Wed, 14 Apr 2021 12:11:25 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jacob Pan <jacob.jun.pan@...ux.intel.com>,
        LKML <linux-kernel@...r.kernel.org>,
        iommu@...ts.linux-foundation.org, Joerg Roedel <joro@...tes.org>,
        Lu Baolu <baolu.lu@...ux.intel.com>,
        Jean-Philippe Brucker <jean-philippe@...aro.com>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        Yi Liu <yi.l.liu@...el.com>, Raj Ashok <ashok.raj@...el.com>,
        "Tian, Kevin" <kevin.tian@...el.com>,
        Jason Gunthorpe <jgg@...dia.com>,
        Dave Jiang <dave.jiang@...el.com>
Subject: Re: [PATCH 1/2] iommu/sva: Tighten SVA bind API with explicit flags

Hi Jacob,

I love your patch! Yet something to improve:

[auto build test ERROR on vkoul-dmaengine/next]
[also build test ERROR on char-misc/char-misc-testing v5.12-rc7]
[cannot apply to iommu/next next-20210413]
[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/Jacob-Pan/iommu-sva-Tighten-SVA-bind-API-with-explicit-flags/20210409-094521
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
config: x86_64-randconfig-a016-20210413 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/3b009446e2f451c401cff7a6d4766424acbcc890
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jacob-Pan/iommu-sva-Tighten-SVA-bind-API-with-explicit-flags/20210409-094521
        git checkout 3b009446e2f451c401cff7a6d4766424acbcc890
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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/dma/idxd/init.c:307:10: error: use of undeclared identifier 'IOMMU_SVA_BIND_SUPERVISOR'
           flags = IOMMU_SVA_BIND_SUPERVISOR;
                   ^
   drivers/dma/idxd/init.c:422:30: warning: shift count >= width of type [-Wshift-count-overflow]
           rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
                                       ^~~~~~~~~~~~~~~~
   include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
   #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
                                                        ^ ~~~
   drivers/dma/idxd/init.c:428:41: warning: shift count >= width of type [-Wshift-count-overflow]
           rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                                                  ^~~~~~~~~~~~~~~~
   include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
   #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
                                                        ^ ~~~
   2 warnings and 1 error generated.


vim +/IOMMU_SVA_BIND_SUPERVISOR +307 drivers/dma/idxd/init.c

   300	
   301	static int idxd_enable_system_pasid(struct idxd_device *idxd)
   302	{
   303		unsigned int flags;
   304		unsigned int pasid;
   305		struct iommu_sva *sva;
   306	
 > 307		flags = IOMMU_SVA_BIND_SUPERVISOR;
   308	
   309		sva = iommu_sva_bind_device(&idxd->pdev->dev, NULL, flags);
   310		if (IS_ERR(sva)) {
   311			dev_warn(&idxd->pdev->dev,
   312				 "iommu sva bind failed: %ld\n", PTR_ERR(sva));
   313			return PTR_ERR(sva);
   314		}
   315	
   316		pasid = iommu_sva_get_pasid(sva);
   317		if (pasid == IOMMU_PASID_INVALID) {
   318			iommu_sva_unbind_device(sva);
   319			return -ENODEV;
   320		}
   321	
   322		idxd->sva = sva;
   323		idxd->pasid = pasid;
   324		dev_dbg(&idxd->pdev->dev, "system pasid: %u\n", pasid);
   325		return 0;
   326	}
   327	

---
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" (38426 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ