public inbox for fsverity@lists.linux.dev
 help / color / mirror / Atom feed
* fsverity and large folios
@ 2026-04-06  4:58 Matthew Wilcox
  2026-04-06  6:19 ` Christoph Hellwig
  2026-04-06 16:45 ` Eric Biggers
  0 siblings, 2 replies; 3+ messages in thread
From: Matthew Wilcox @ 2026-04-06  4:58 UTC (permalink / raw)
  To: fsverity; +Cc: Eric Biggers, Theodore Y. Ts'o, Christoph Hellwig

I suspect that fsverity simply doesn't support large folios today.
However, I assume that we'd like to support them someday (eg to support
16KiB block devices on a machine with a 4KiB page size).

To make a move in that direction, I started to convert
->read_markle_tree_page() to ->read_merkle_tree_folio().  But there's
a problem.  The Merkle tree is stored at "some offset" from the EOF.  And
the knowledge of what offset is particular to the individual filesystem
(or potentially each individual file).  That means that we can't hoist
the "folio_file_page(folio, index)" call from the filesystem to the core
code because the core code doesn't know what offset the tree is stored at.

And it's kind of dangerous because calling offset_in_folio(folio,
byte_offset) doesn't work correctly eitheer (it's fine as long as the
Merkle tree starts at some multiple of folio_size() from the base of
the file ... which is a nasty gotcha to stumble across!)

This actually came up for me because fsverity is using PageChecked(),
and it's the last part of the kernel still using PageChecked().  I was
hoping to replace these uses with folio_test/set_checked(), but it all
feels a bit fragile at this point.

I don't have an idea beyond exposing ->verity_metadata_pos() to the
core code from individual filesystems, which feels like poor
architecture.  Ideas welcome.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-06 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-06  4:58 fsverity and large folios Matthew Wilcox
2026-04-06  6:19 ` Christoph Hellwig
2026-04-06 16:45 ` Eric Biggers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox