]> git.ipfire.org Git - thirdparty/linux.git/commit
fsverity: add dependency on 64K or smaller pages
authorEric Biggers <ebiggers@kernel.org>
Sat, 21 Feb 2026 20:45:25 +0000 (12:45 -0800)
committerEric Biggers <ebiggers@kernel.org>
Tue, 3 Mar 2026 05:05:34 +0000 (21:05 -0800)
commita300000233a9ff842e2fb450fb9a79f7827a586d
tree2ccdef3597f8c121327f9d3028e9f035bb46665a
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
fsverity: add dependency on 64K or smaller pages

Currently, all filesystems that support fsverity (ext4, f2fs, and btrfs)
cache the Merkle tree in the pagecache at a 64K aligned offset after the
end of the file data.  This offset needs to be a multiple of the page
size, which is guaranteed only when the page size is 64K or smaller.

64K was chosen to be the "largest reasonable page size".  But it isn't
the largest *possible* page size: the hexagon and powerpc ports of Linux
support 256K pages, though that configuration is rarely used.

For now, just disable support for FS_VERITY in these odd configurations
to ensure it isn't used in cases where it would have incorrect behavior.

Fixes: 671e67b47e9f ("fs-verity: add Kconfig and the helper functions for hashing")
Reported-by: Christoph Hellwig <hch@lst.de>
Closes: https://lore.kernel.org/r/20260119063349.GA643@lst.de
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Link: https://lore.kernel.org/r/20260221204525.30426-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
fs/verity/Kconfig