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] [day] [month] [year] [list]
Message-Id: <175686250047.108754.9991172148469474347.b4-ty@kernel.dk>
Date: Tue, 02 Sep 2025 19:21:40 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org, 
 Qianfeng Rong <rongqianfeng@...o.com>
Subject: Re: [PATCH] block: use int type to store negative value


On Tue, 02 Sep 2025 21:09:30 +0800, Qianfeng Rong wrote:
> Change the 'ret' variable in blk_stack_limits() from unsigned int to int,
> as it needs to store negative value -1.
> 
> Storing the negative error codes in unsigned type, or performing equality
> comparisons (e.g., ret == -1), doesn't cause an issue at runtime [1] but
> can be confusing.  Additionally, assigning negative error codes to unsigned
> type may trigger a GCC warning when the -Wsign-conversion flag is enabled.
> 
> [...]

Applied, thanks!

[1/1] block: use int type to store negative value
      commit: b0b4518c992eb5f316c6e40ff186cbb7a5009518

Best regards,
-- 
Jens Axboe




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ