* [PATCH 6.18] fsverity: add dependency on 64K or smaller pages
@ 2026-10-06 21:41 Eric Biggers
2026-10-07 6:32 ` Patch "fsverity: add dependency on 64K or smaller pages" has been added to the 6.18-stable tree gregkh
0 siblings, 1 reply; 2+ messages in thread
From: Eric Biggers @ 2026-10-06 21:41 UTC (permalink / raw)
To: stable; +Cc: fsverity, Eric Biggers, Christoph Hellwig, Theodore Ts'o
commit a300000233a9ff842e2fb450fb9a79f7827a586d upstream.
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 | 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
@@ -2,6 +2,9 @@
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
select CRYPTO_HASH_INFO
select CRYPTO_LIB_SHA256
select CRYPTO_LIB_SHA512
base-commit: 725bd2f3c81d54edccb66fead01d4c0c222e2231
--
2.56.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Patch "fsverity: add dependency on 64K or smaller pages" has been added to the 6.18-stable tree
2026-10-06 21:41 [PATCH 6.18] fsverity: add dependency on 64K or smaller pages Eric Biggers
@ 2026-10-07 6:32 ` gregkh
0 siblings, 0 replies; 2+ messages in thread
From: gregkh @ 2026-10-07 6:32 UTC (permalink / raw)
To: ebiggers, fsverity, gregkh, hch, tytso; +Cc: stable-commits
This is a note to let you know that I've just added the patch titled
fsverity: add dependency on 64K or smaller pages
to the 6.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
fsverity-add-dependency-on-64k-or-smaller-pages.patch
and it can be found in the queue-6.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From stable+bounces-352125-greg=kroah.com@vger.kernel.org Tue Oct 6 23:42:57 2026
From: Eric Biggers <ebiggers@kernel.org>
Date: Tue, 6 Oct 2026 23:41:37 +0200
Subject: fsverity: add dependency on 64K or smaller pages
To: stable@vger.kernel.org
Cc: fsverity@lists.linux.dev, Eric Biggers <ebiggers@kernel.org>, Christoph Hellwig <hch@lst.de>, Theodore Ts'o <tytso@mit.edu>
Message-ID: <20261006214137.50903-1-ebiggers@kernel.org>
From: Eric Biggers <ebiggers@kernel.org>
commit a300000233a9ff842e2fb450fb9a79f7827a586d upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/verity/Kconfig | 3 +++
1 file changed, 3 insertions(+)
--- a/fs/verity/Kconfig
+++ b/fs/verity/Kconfig
@@ -2,6 +2,9 @@
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
select CRYPTO_HASH_INFO
select CRYPTO_LIB_SHA256
select CRYPTO_LIB_SHA512
Patches currently in stable-queue which might be from ebiggers@kernel.org are
queue-6.18/fs-fsverity-reject-size-changes-on-fsverity-files-in-setattr_prepare.patch
queue-6.18/fs-fsverity-remove-check-for-fsverity-being-enabled-in-setattr_prepare.patch
queue-6.18/fsverity-add-dependency-on-64k-or-smaller-pages.patch
queue-6.18/crypto-x86-aes-gcm-fix-always-true-check-for-last-aad-segment.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-07 6:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 21:41 [PATCH 6.18] fsverity: add dependency on 64K or smaller pages Eric Biggers
2026-10-07 6:32 ` Patch "fsverity: add dependency on 64K or smaller pages" has been added to the 6.18-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.