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: <aWapt9vh8EEGdFUG@redhat.com>
Date: Tue, 13 Jan 2026 15:23:19 -0500
From: Brian Masney <bmasney@...hat.com>
To: david.laight.linux@...il.com
Cc: Christian Brauner <brauner@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Miklos Szeredi <miklos@...redi.hu>, Mark Brown <broonie@...nel.org>,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Andreas Dilger <adilger.kernel@...ger.ca>,
	Kees Cook <kees@...nel.org>,
	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>,
	Theodore Ts'o <tytso@....edu>
Subject: Re: [PATCH next] fuse: Fix 'min: signedness error' in fuse_wr_pages()

On Tue, Jan 13, 2026 at 07:22:43PM +0000, david.laight.linux@...il.com wrote:
> From: David Laight <david.laight.linux@...il.com>
> 
> On 32bit systems 'pos' is s64 and everything else is 32bit so the
> first argument to min() is signed - generating a warning.
> On 64bit systems 'len' is 64bit unsigned forcing everything to unsigned.
> 
> Fix by reworking the exprssion to completely avoid 64bit maths on 32bit.
> Use DIV_ROUND_UP() instead of open-coding something equivalent.
> 
> Note that the 32bit 'len' cannot overflow because the syscall interface
> limits read/write (etc) to (INT_MAX - PAGE_SIZE) bytes (even on 64bit).
> 
> Fixes: 0f5bb0cfb0b4 ("fs: use min() or umin() instead of min_t()")
> Signed-off-by: David Laight <david.laight.linux@...il.com>

Reported-by: Brian Masney <bmasney@...hat.com>
Reviewed-by: Brian Masney <bmasney@...hat.com>

This fixes the MIPS cross compiler error on arm64 that I reported. I
also tested a native arm64 build.

Brian


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ