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: <1F30CBDD95FCBE06+20250823020302.GC1995939@nic-Precision-5820-Tower>
Date: Sat, 23 Aug 2025 10:03:02 +0800
From: Yibo Dong <dong100@...se.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Parthiban.Veerasooran@...rochip.com, andrew+netdev@...n.ch,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, horms@...nel.org, corbet@....net,
	gur.stavi@...wei.com, maddy@...ux.ibm.com, mpe@...erman.id.au,
	danishanwar@...com, lee@...ger.us, gongfan1@...wei.com,
	lorenzo@...nel.org, geert+renesas@...der.be,
	lukas.bulwahn@...hat.com, alexanderduyck@...com,
	richardcochran@...il.com, kees@...nel.org, gustavoars@...nel.org,
	netdev@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH net-next v7 4/5] net: rnpgbe: Add basic mbx_fw support

On Fri, Aug 22, 2025 at 04:33:54PM +0200, Andrew Lunn wrote:
> > /* Initialized as a defensive measure to handle edge cases
> >  * where try_cnt might be modified
> >  */
> >  int err = -EIO;
> 
> We don't use defensive code in the kernel. Defensive code suggests you
> don't actually know what your driver is doing and you are guessing
> this might happen. You should convince yourself it is
> possible/impossible and write the code as needed.
> 
> 	Andrew
> 

Ok, I will change 'while' to 'do...while" and remove '= -EIO'.
That can guarantee 'mucse_fw_get_capability' run at least once to init
err.

Thanks for your feedback.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ