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: <aJr9tpeqaLcDKnhB@infradead.org>
Date: Tue, 12 Aug 2025 01:39:18 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Damien Le Moal <dlemoal@...nel.org>
Cc: Rajeev Mishra <rajeevm@....com>, axboe@...nel.dk,
	yukuai1@...weicloud.com, linux-block@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] loop: use vfs_getattr_nosec() for accurate file size

On Tue, Aug 12, 2025 at 12:42:44PM +0900, Damien Le Moal wrote:
> Since loff_t is "long long", so a signed type, I would keep this interface and
> add a negative error check in the 2 call sites for get_size(). That is simpler.

Not ethat the existing code already treats 0 as error for the
offset smaller than size case.  I'm not arguing against and error
return, but that would require auditing all the call chains.  And I'd
rather not multiplex it into the loff_t as that means people will forget
to handle it way too easily.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ