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: <202412031722.5L3bVD47-lkp@intel.com>
Date: Tue, 3 Dec 2024 17:44:34 +0800
From: kernel test robot <lkp@...el.com>
To: alejandro.lucero-palau@....com, linux-cxl@...r.kernel.org,
	netdev@...r.kernel.org, dan.j.williams@...el.com,
	martin.habets@...inx.com, edward.cree@....com, davem@...emloft.net,
	kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com,
	dave.jiang@...el.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	Alejandro Lucero <alucerop@....com>
Subject: Re: [PATCH v6 15/28] cxl: define a driver interface for HPA free
 space enumeration

Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on e70140ba0d2b1a30467d4af6bcfe761327b9ec95]

url:    https://github.com/intel-lab-lkp/linux/commits/alejandro-lucero-palau-amd-com/cxl-add-type2-device-basic-support/20241203-031134
base:   e70140ba0d2b1a30467d4af6bcfe761327b9ec95
patch link:    https://lore.kernel.org/r/20241202171222.62595-16-alejandro.lucero-palau%40amd.com
patch subject: [PATCH v6 15/28] cxl: define a driver interface for HPA free space enumeration
config: arm-randconfig-001-20241203 (https://download.01.org/0day-ci/archive/20241203/202412031722.5L3bVD47-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241203/202412031722.5L3bVD47-lkp@intel.com/reproduce)

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/202412031722.5L3bVD47-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/cxl/core/region.c:803: warning: Function parameter or struct member 'cxlmd' not described in 'cxl_get_hpa_freespace'
>> drivers/cxl/core/region.c:803: warning: Excess function parameter 'endpoint' description in 'cxl_get_hpa_freespace'


vim +803 drivers/cxl/core/region.c

   782	
   783	/**
   784	 * cxl_get_hpa_freespace - find a root decoder with free capacity per constraints
   785	 * @endpoint: an endpoint that is mapped by the returned decoder
   786	 * @flags: CXL_DECODER_F flags for selecting RAM vs PMEM, and HDM-H vs HDM-D[B]
   787	 * @max_avail_contig: output parameter of max contiguous bytes available in the
   788	 *		      returned decoder
   789	 *
   790	 * The return tuple of a 'struct cxl_root_decoder' and 'bytes available given
   791	 * in (@max_avail_contig))' is a point in time snapshot. If by the time the
   792	 * caller goes to use this root decoder's capacity the capacity is reduced then
   793	 * caller needs to loop and retry.
   794	 *
   795	 * The returned root decoder has an elevated reference count that needs to be
   796	 * put with put_device(cxlrd_dev(cxlrd)). Locking context is with
   797	 * cxl_{acquire,release}_endpoint(), that ensures removal of the root decoder
   798	 * does not race.
   799	 */
   800	struct cxl_root_decoder *cxl_get_hpa_freespace(struct cxl_memdev *cxlmd,
   801						       unsigned long flags,
   802						       resource_size_t *max_avail_contig)
 > 803	{
   804		struct cxl_port *endpoint = cxlmd->endpoint;
   805		struct cxlrd_max_context ctx = {
   806			.host_bridge = endpoint->host_bridge,
   807			.flags = flags,
   808		};
   809		struct cxl_port *root_port;
   810		struct cxl_root *root __free(put_cxl_root) = find_cxl_root(endpoint);
   811	
   812		if (!is_cxl_endpoint(endpoint)) {
   813			dev_dbg(&endpoint->dev, "hpa requestor is not an endpoint\n");
   814			return ERR_PTR(-EINVAL);
   815		}
   816	
   817		if (!root) {
   818			dev_dbg(&endpoint->dev, "endpoint can not be related to a root port\n");
   819			return ERR_PTR(-ENXIO);
   820		}
   821	
   822		root_port = &root->port;
   823		down_read(&cxl_region_rwsem);
   824		device_for_each_child(&root_port->dev, &ctx, find_max_hpa);
   825		up_read(&cxl_region_rwsem);
   826	
   827		if (!ctx.cxlrd)
   828			return ERR_PTR(-ENOMEM);
   829	
   830		*max_avail_contig = ctx.max_hpa;
   831		return ctx.cxlrd;
   832	}
   833	EXPORT_SYMBOL_NS_GPL(cxl_get_hpa_freespace, CXL);
   834	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ