Re: [GIT PULL] fsverity fix for 5.15-rc4

From: Linus Torvalds
Date: Tue Sep 28 2021 - 10:59:55 EST

On Mon, Sep 27, 2021 at 11:22 PM Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
> Fix an integer overflow when computing the Merkle tree layout of
> extremely large files, exposed by btrfs adding support for fs-verity.

I wonder if 'i_size' should be u64. I'm not convinced people think
about 'loff_t' being signed - but while that's required for negative
lseek() offsets, I'm not sure it makes tons of sense for an inode

Same goes for f_pos, for that matter.

But who knows what games people have played with magic numbers (ie
"-1") internally, or where they _want_ signed compares. So it's
certainly not some obvious trivial fix.