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: <202407020415.KKnhPTUj-lkp@intel.com>
Date: Tue, 2 Jul 2024 04:37:39 +0800
From: kernel test robot <lkp@...el.com>
To: Robin Murphy <robin.murphy@....com>, Will Deacon <will@...nel.org>,
	Joerg Roedel <joro@...tes.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-acpi@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	iommu@...ts.linux.dev, devicetree@...r.kernel.org,
	Rob Herring <robh@...nel.org>,
	Saravana Kannan <saravanak@...gle.com>,
	Lorenzo Pieralisi <lpieralisi@...nel.org>,
	Hanjun Guo <guohanjun@...wei.com>,
	Sudeep Holla <sudeep.holla@....com>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Len Brown <lenb@...nel.org>,
	Jean-Philippe Brucker <jean-philippe@...aro.org>,
	Andy Shevchenko <andy.shevchenko@...il.com>
Subject: Re: [PATCH v2 4/4] iommu: Remove iommu_fwspec ops

Hi Robin,

kernel test robot noticed the following build errors:

[auto build test ERROR on joro-iommu/next]
[also build test ERROR on rafael-pm/linux-next rafael-pm/bleeding-edge arm-perf/for-next/perf arm64/for-next/core linus/master v6.10-rc6 next-20240701]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Robin-Murphy/iommu-Resolve-fwspec-ops-automatically/20240625-210010
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
patch link:    https://lore.kernel.org/r/42722975eb1309a3e43f58099ff5b6c7bfb23d3d.1718994350.git.robin.murphy%40arm.com
patch subject: [PATCH v2 4/4] iommu: Remove iommu_fwspec ops
config: arm-allmodconfig
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build):

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407020415.KKnhPTUj-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/iommu/mtk_iommu_v1.c: In function 'mtk_iommu_v1_create_mapping':
>> drivers/iommu/mtk_iommu_v1.c:421:45: error: 'struct iommu_fwspec' has no member named 'ops'
     421 |         } else if (dev_iommu_fwspec_get(dev)->ops != &mtk_iommu_v1_ops) {
         |                                             ^~


vim +421 drivers/iommu/mtk_iommu_v1.c

84672f192671e64 Robin Murphy        2016-10-17  396  
b17336c55d8928c Honghui Zhang       2016-06-08  397  /*
b17336c55d8928c Honghui Zhang       2016-06-08  398   * MTK generation one iommu HW only support one iommu domain, and all the client
b17336c55d8928c Honghui Zhang       2016-06-08  399   * sharing the same iova address space.
b17336c55d8928c Honghui Zhang       2016-06-08  400   */
b42a905b6aad40c Krzysztof Kozlowski 2024-02-16  401  static int mtk_iommu_v1_create_mapping(struct device *dev,
b42a905b6aad40c Krzysztof Kozlowski 2024-02-16  402  				       const struct of_phandle_args *args)
b17336c55d8928c Honghui Zhang       2016-06-08  403  {
a9bf2eec5a6fc01 Joerg Roedel        2018-11-29  404  	struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
ad9b10e533f6fb3 Yong Wu             2022-05-03  405  	struct mtk_iommu_v1_data *data;
b17336c55d8928c Honghui Zhang       2016-06-08  406  	struct platform_device *m4updev;
b17336c55d8928c Honghui Zhang       2016-06-08  407  	struct dma_iommu_mapping *mtk_mapping;
b17336c55d8928c Honghui Zhang       2016-06-08  408  	int ret;
b17336c55d8928c Honghui Zhang       2016-06-08  409  
b17336c55d8928c Honghui Zhang       2016-06-08  410  	if (args->args_count != 1) {
b17336c55d8928c Honghui Zhang       2016-06-08  411  		dev_err(dev, "invalid #iommu-cells(%d) property for IOMMU\n",
b17336c55d8928c Honghui Zhang       2016-06-08  412  			args->args_count);
b17336c55d8928c Honghui Zhang       2016-06-08  413  		return -EINVAL;
b17336c55d8928c Honghui Zhang       2016-06-08  414  	}
b17336c55d8928c Honghui Zhang       2016-06-08  415  
a9bf2eec5a6fc01 Joerg Roedel        2018-11-29  416  	if (!fwspec) {
5fff542d1626fec Robin Murphy        2024-06-21  417  		ret = iommu_fwspec_init(dev, of_fwnode_handle(args->np));
84672f192671e64 Robin Murphy        2016-10-17  418  		if (ret)
84672f192671e64 Robin Murphy        2016-10-17  419  			return ret;
a9bf2eec5a6fc01 Joerg Roedel        2018-11-29  420  		fwspec = dev_iommu_fwspec_get(dev);
ad9b10e533f6fb3 Yong Wu             2022-05-03 @421  	} else if (dev_iommu_fwspec_get(dev)->ops != &mtk_iommu_v1_ops) {
84672f192671e64 Robin Murphy        2016-10-17  422  		return -EINVAL;
84672f192671e64 Robin Murphy        2016-10-17  423  	}
84672f192671e64 Robin Murphy        2016-10-17  424  
3524b5592cad638 Joerg Roedel        2020-03-26  425  	if (!dev_iommu_priv_get(dev)) {
b17336c55d8928c Honghui Zhang       2016-06-08  426  		/* Get the m4u device */
b17336c55d8928c Honghui Zhang       2016-06-08  427  		m4updev = of_find_device_by_node(args->np);
b17336c55d8928c Honghui Zhang       2016-06-08  428  		if (WARN_ON(!m4updev))
b17336c55d8928c Honghui Zhang       2016-06-08  429  			return -EINVAL;
b17336c55d8928c Honghui Zhang       2016-06-08  430  
3524b5592cad638 Joerg Roedel        2020-03-26  431  		dev_iommu_priv_set(dev, platform_get_drvdata(m4updev));
b17336c55d8928c Honghui Zhang       2016-06-08  432  	}
b17336c55d8928c Honghui Zhang       2016-06-08  433  
84672f192671e64 Robin Murphy        2016-10-17  434  	ret = iommu_fwspec_add_ids(dev, args->args, 1);
84672f192671e64 Robin Murphy        2016-10-17  435  	if (ret)
84672f192671e64 Robin Murphy        2016-10-17  436  		return ret;
b17336c55d8928c Honghui Zhang       2016-06-08  437  
3524b5592cad638 Joerg Roedel        2020-03-26  438  	data = dev_iommu_priv_get(dev);
589601720d9d036 Joerg Roedel        2020-06-25  439  	mtk_mapping = data->mapping;
b17336c55d8928c Honghui Zhang       2016-06-08  440  	if (!mtk_mapping) {
b17336c55d8928c Honghui Zhang       2016-06-08  441  		/* MTK iommu support 4GB iova address space. */
b17336c55d8928c Honghui Zhang       2016-06-08  442  		mtk_mapping = arm_iommu_create_mapping(&platform_bus_type,
b17336c55d8928c Honghui Zhang       2016-06-08  443  						0, 1ULL << 32);
84672f192671e64 Robin Murphy        2016-10-17  444  		if (IS_ERR(mtk_mapping))
84672f192671e64 Robin Murphy        2016-10-17  445  			return PTR_ERR(mtk_mapping);
84672f192671e64 Robin Murphy        2016-10-17  446  
589601720d9d036 Joerg Roedel        2020-06-25  447  		data->mapping = mtk_mapping;
b17336c55d8928c Honghui Zhang       2016-06-08  448  	}
b17336c55d8928c Honghui Zhang       2016-06-08  449  
b17336c55d8928c Honghui Zhang       2016-06-08  450  	return 0;
b17336c55d8928c Honghui Zhang       2016-06-08  451  }
b17336c55d8928c Honghui Zhang       2016-06-08  452  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

View attachment "reproduce" of type "text/plain" (753 bytes)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ