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: <6a051ef6-0313-41d2-85cc-494edcdcf415@amd.com>
Date: Mon, 16 Jun 2025 09:51:08 -0500
From: "Moger, Babu" <babu.moger@....com>
To: kernel test robot <lkp@...el.com>, corbet@....net, tony.luck@...el.com,
 reinette.chatre@...el.com, Dave.Martin@....com, james.morse@....com,
 tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
 dave.hansen@...ux.intel.com
Cc: oe-kbuild-all@...ts.linux.dev, x86@...nel.org, hpa@...or.com,
 akpm@...ux-foundation.org, paulmck@...nel.org, rostedt@...dmis.org,
 thuth@...hat.com, ardb@...nel.org, gregkh@...uxfoundation.org,
 seanjc@...gle.com, thomas.lendacky@....com,
 pawan.kumar.gupta@...ux.intel.com, perry.yuan@....com,
 yosry.ahmed@...ux.dev, kai.huang@...el.com, xiaoyao.li@...el.com,
 peterz@...radead.org, kan.liang@...ux.intel.com, mario.limonciello@....com,
 xin3.li@...el.com, sohil.mehta@...el.com,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: Re: [PATCH v6 8/8] fs/resctrl: Introduce interface to modify io_alloc
 Capacity Bit Masks



On 6/13/25 02:04, kernel test robot wrote:
> Hi Babu,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on brauner-vfs/vfs.all]
> [also build test WARNING on linus/master v6.16-rc1 next-20250612]
> [cannot apply to tip/x86/core aegl/next]
> [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/Babu-Moger/x86-cpufeatures-Add-support-for-L3-Smart-Data-Cache-Injection-Allocation-Enforcement/20250612-053050
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
> patch link:    https://lore.kernel.org/r/6f8158ba0eebf41c9ec59e82dcdc28d4d3151c3b.1749677012.git.babu.moger%40amd.com
> patch subject: [PATCH v6 8/8] fs/resctrl: Introduce interface to modify io_alloc Capacity Bit Masks> config: x86_64-randconfig-r071-20250612 (https://download.01.org/0day-ci/archive/20250613/202506131403.MWHHLsxB-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> 
> 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/202506131403.MWHHLsxB-lkp@intel.com/
> 
> New smatch warnings:
> fs/resctrl/rdtgroup.c:2105 resctrl_io_alloc_cbm_write() warn: unsigned 'io_alloc_closid' is never less than zero.
> fs/resctrl/rdtgroup.c:2105 resctrl_io_alloc_cbm_write() warn: error code type promoted to positive: 'io_alloc_closid'
> 
> Old smatch warnings:
> fs/resctrl/rdtgroup.c:1961 resctrl_io_alloc_write() warn: unsigned 'io_alloc_closid' is never less than zero.
> fs/resctrl/rdtgroup.c:1961 resctrl_io_alloc_write() warn: error code type promoted to positive: 'io_alloc_closid'
> fs/resctrl/rdtgroup.c:2026 resctrl_io_alloc_cbm_show() warn: unsigned 'io_alloc_closid' is never less than zero.
> fs/resctrl/rdtgroup.c:2026 resctrl_io_alloc_cbm_show() warn: error code type promoted to positive: 'io_alloc_closid'
> 
> vim +/io_alloc_closid +2105 fs/resctrl/rdtgroup.c
> 
>   2072	
>   2073	static ssize_t resctrl_io_alloc_cbm_write(struct kernfs_open_file *of,
>   2074						  char *buf, size_t nbytes, loff_t off)
>   2075	{
>   2076		struct resctrl_schema *s = rdt_kn_parent_priv(of->kn);
>   2077		struct rdt_resource *r = s->res;
>   2078		u32 io_alloc_closid;
>   2079		int ret = 0;
>   2080	
>   2081		/* Valid input requires a trailing newline */
>   2082		if (nbytes == 0 || buf[nbytes - 1] != '\n')
>   2083			return -EINVAL;
>   2084	
>   2085		buf[nbytes - 1] = '\0';
>   2086	
>   2087		if (!r->cache.io_alloc_capable) {
>   2088			rdt_last_cmd_puts("io_alloc feature is not supported on the resource\n");
>   2089			return -EINVAL;
>   2090		}
>   2091	
>   2092		cpus_read_lock();
>   2093		mutex_lock(&rdtgroup_mutex);
>   2094	
>   2095		rdt_last_cmd_clear();
>   2096		rdt_staged_configs_clear();
>   2097	
>   2098		if (!resctrl_arch_get_io_alloc_enabled(r)) {
>   2099			rdt_last_cmd_puts("io_alloc feature is not enabled\n");
>   2100			ret = -EINVAL;
>   2101			goto cbm_write_out;
>   2102		}
>   2103	
>   2104		io_alloc_closid = resctrl_io_alloc_closid_get(r);
>> 2105		if (io_alloc_closid < 0) {
>   2106			rdt_last_cmd_puts("Max CLOSID to support io_alloc is not available\n");

Thanks. Will fix it in next revision.

-- 
Thanks
Babu Moger

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ