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: Wed, 24 Jan 2024 19:31:53 +0100
From: Borislav Petkov <bp@...en8.de>
To: Reinette Chatre <reinette.chatre@...el.com>
Cc: Babu Moger <babu.moger@....com>, corbet@....net, fenghua.yu@...el.com,
	tglx@...utronix.de, mingo@...hat.com, dave.hansen@...ux.intel.com,
	x86@...nel.org, hpa@...or.com, paulmck@...nel.org,
	rdunlap@...radead.org, tj@...nel.org, peterz@...radead.org,
	yanjiewtw@...il.com, kim.phillips@....com, lukas.bulwahn@...il.com,
	seanjc@...gle.com, jmattson@...gle.com, leitao@...ian.org,
	jpoimboe@...nel.org, rick.p.edgecombe@...el.com,
	kirill.shutemov@...ux.intel.com, jithu.joseph@...el.com,
	kai.huang@...el.com, kan.liang@...ux.intel.com,
	daniel.sneddon@...ux.intel.com, pbonzini@...hat.com,
	sandipan.das@....com, ilpo.jarvinen@...ux.intel.com,
	peternewman@...gle.com, maciej.wieczor-retman@...el.com,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	eranian@...gle.com
Subject: Re: [PATCH] x86/resctrl: Fix unneeded variable warning reported by
 kernel test robot

On Wed, Jan 24, 2024 at 10:25:17AM -0800, Reinette Chatre wrote:
> This can be confusing since it implies that the patch you mention
> introduces the issue but instead the variable has been unneeded since
> the original:
> 92bd5a139033 ("x86/resctrl: Add interface to write mbm_total_bytes_config")

What I said. :)

> To help clarify you can mention this order of events and also add an
> appropriate "Fixes:" tag.
> 
> > cocci warnings: (new ones prefixed by >>)
> >>> arch/x86/kernel/cpu/resctrl/rdtgroup.c:1621:5-8: Unneeded variable: "ret". Return "  0" on line 1655
> > 
> > Fix the warning by removing the variable "ret" and returning 0 directly.
> 
> cocci warning was spot on*. This fix is not just a change to "make a
> warning go away" but instead fixing an actual problem.
> It can just be "Remove the unneeded variable and return 0 directly".

I'll fix all up before applying.

> * I'll add a private setup with the goal to catch these earlier.

Except that it doesn't fire with the patch that added the code. It looks
like the cocci script needs adjustment...

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ