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: <aK2KHhaFqWbd5S_O@stanley.mountain>
Date: Tue, 26 Aug 2025 13:19:10 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Qianfeng Rong <rongqianfeng@...o.com>
Cc: Dave Penkler <dpenkler@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Michael Rubin <matchstick@...erthere.org>,
	Arnd Bergmann <arnd@...db.de>, linux-staging@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: gpib: use int instead of u32 to store error
 codes

On Tue, Aug 26, 2025 at 05:58:59PM +0800, Qianfeng Rong wrote:
> Use int instead of size_t for 'ret' variable to store negative error codes
> returned by bb_write().
> 

The commit message needs to give a motivation.  I would have assumed from
reading the patch that this caused a signedness bug but it doesn't.
The commit has no effect on runtime but fixing the type is a nice
cleanup.  My commit message would say:

The "ret" variable is used to store the return from bb_write() returns
either zero on success or negative error codes on failure.  Storing the
error codes in size_t which is an unsigned long, doesn't cause an issue
at runtime but it's ugly as pants.  Change "ret" from size_t to int
type.  No effect on runtime.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ