* Re: [PATCH] fsverity: add dependency on 64K or smaller pages
2026-02-21 20:45 [PATCH] fsverity: add dependency on 64K or smaller pages Eric Biggers
@ 2026-02-24 13:55 ` David Sterba
2026-02-24 14:19 ` Arnd Bergmann
2026-02-24 14:51 ` Christoph Hellwig
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: David Sterba @ 2026-02-24 13:55 UTC (permalink / raw)
To: Eric Biggers
Cc: fsverity, linux-fsdevel, Christoph Hellwig, Arnd Bergmann,
linux-ext4, linux-f2fs-devel, linux-btrfs, linux-xfs
On Sat, Feb 21, 2026 at 12:45:25PM -0800, Eric Biggers wrote:
> 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
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
> fs/verity/Kconfig | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fs/verity/Kconfig b/fs/verity/Kconfig
> index 76d1c5971b82..b20882963ffb 100644
> --- a/fs/verity/Kconfig
> +++ b/fs/verity/Kconfig
> @@ -1,9 +1,12 @@
> # SPDX-License-Identifier: GPL-2.0
>
> config FS_VERITY
> bool "FS Verity (read-only file-based authenticity protection)"
> + # Filesystems cache the Merkle tree at a 64K aligned offset in the
> + # pagecache. That approach assumes the page size is at most 64K.
> + depends on PAGE_SHIFT <= 16
Makes sense to me, we have "depends on PAGE_SIZE_LESS_THAN_256KB" since
somebody tried to use btrfs on the 256K system.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] fsverity: add dependency on 64K or smaller pages
2026-02-24 13:55 ` David Sterba
@ 2026-02-24 14:19 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2026-02-24 14:19 UTC (permalink / raw)
To: David Sterba, Eric Biggers
Cc: fsverity, linux-fsdevel, Christoph Hellwig, linux-ext4,
linux-f2fs-devel, linux-btrfs, linux-xfs
On Tue, Feb 24, 2026, at 14:55, David Sterba wrote:
> On Sat, Feb 21, 2026 at 12:45:25PM -0800, Eric Biggers wrote:
>> 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
>> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
>
> Makes sense to me, we have "depends on PAGE_SIZE_LESS_THAN_256KB" since
> somebody tried to use btrfs on the 256K system.
I wonder if we should just drop the configuration entirely. There
are very few users on either PowerPC44x (officially orphaned, but
I know users) and Hexagon (officially supported, but no hardware
available outside of Qualcomm). My impression is that this was
implemented purely because the hardware can do it, not because
anyone actually wants to use 256K pages.
I see that commit "e12401222f74 powerpc/44x: Support for 256KB
PAGE_SIZE" mentions how one has to patch the linker to support
larger than 64K pages, and I see that both powerpc and hexagon
linkers still hardcode the section alignment to 64K pages, for
obvious reasons.
Arnd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fsverity: add dependency on 64K or smaller pages
2026-02-21 20:45 [PATCH] fsverity: add dependency on 64K or smaller pages Eric Biggers
2026-02-24 13:55 ` David Sterba
@ 2026-02-24 14:51 ` Christoph Hellwig
2026-02-24 15:32 ` Theodore Tso
2026-02-24 15:24 ` Theodore Tso
2026-03-03 5:06 ` Eric Biggers
3 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2026-02-24 14:51 UTC (permalink / raw)
To: Eric Biggers
Cc: fsverity, linux-fsdevel, Christoph Hellwig, Arnd Bergmann,
linux-ext4, linux-f2fs-devel, linux-btrfs, linux-xfs,
Andrey Albershteyn, Darrick J. Wong
On Sat, Feb 21, 2026 at 12:45:25PM -0800, Eric Biggers wrote:
> 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.
Do we want to throw in the towel here for the forseable future and if we
ever need to support fsverity on > 64k page size just do a on-disk
version rev?
Because if so we could just simply the pending xfs fsverity support to
drop all the offset adjustment and simplify it a lot..
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fsverity: add dependency on 64K or smaller pages
2026-02-24 14:51 ` Christoph Hellwig
@ 2026-02-24 15:32 ` Theodore Tso
0 siblings, 0 replies; 7+ messages in thread
From: Theodore Tso @ 2026-02-24 15:32 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Eric Biggers, fsverity, linux-fsdevel, Arnd Bergmann, linux-ext4,
linux-f2fs-devel, linux-btrfs, linux-xfs, Andrey Albershteyn,
Darrick J. Wong
On Tue, Feb 24, 2026 at 03:51:56PM +0100, Christoph Hellwig wrote:
> Do we want to throw in the towel here for the forseable future and if we
> ever need to support fsverity on > 64k page size just do a on-disk
> version rev?
>
> Because if so we could just simply the pending xfs fsverity support to
> drop all the offset adjustment and simplify it a lot..
I wholeheartedly agree. Especially given the benefit of large folios,
increasing the base page size beyond 64k has enough downsides without
compelling upsides that can't be achieved via other means, I'm highly
skeptical that page sizes > 64k is going to be appealing for most
system designers. So trying to design in support for this possibility
in fsverrity is not worth it.
- Ted
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fsverity: add dependency on 64K or smaller pages
2026-02-21 20:45 [PATCH] fsverity: add dependency on 64K or smaller pages Eric Biggers
2026-02-24 13:55 ` David Sterba
2026-02-24 14:51 ` Christoph Hellwig
@ 2026-02-24 15:24 ` Theodore Tso
2026-03-03 5:06 ` Eric Biggers
3 siblings, 0 replies; 7+ messages in thread
From: Theodore Tso @ 2026-02-24 15:24 UTC (permalink / raw)
To: Eric Biggers
Cc: fsverity, linux-fsdevel, Christoph Hellwig, Arnd Bergmann,
linux-ext4, linux-f2fs-devel, linux-btrfs, linux-xfs
On Sat, Feb 21, 2026 at 12:45:25PM -0800, Eric Biggers wrote:
> 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
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] fsverity: add dependency on 64K or smaller pages
2026-02-21 20:45 [PATCH] fsverity: add dependency on 64K or smaller pages Eric Biggers
` (2 preceding siblings ...)
2026-02-24 15:24 ` Theodore Tso
@ 2026-03-03 5:06 ` Eric Biggers
3 siblings, 0 replies; 7+ messages in thread
From: Eric Biggers @ 2026-03-03 5:06 UTC (permalink / raw)
To: fsverity
Cc: linux-fsdevel, Christoph Hellwig, Arnd Bergmann, linux-ext4,
linux-f2fs-devel, linux-btrfs, linux-xfs
On Sat, Feb 21, 2026 at 12:45:25PM -0800, Eric Biggers wrote:
> 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
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
> fs/verity/Kconfig | 3 +++
> 1 file changed, 3 insertions(+)
Applied to https://git.kernel.org/pub/scm/fs/fsverity/linux.git/log/?h=for-current
- Eric
^ permalink raw reply [flat|nested] 7+ messages in thread