Re: [PATCH v2] loop: use vfs_getattr_nosec() for accurate file size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux