From: sashiko-bot@kernel.org
To: "Andrey Albershteyn" <aalbersh@kernel.org>,
fsverity <fsverity@lists.linux.dev>,
linux-ext4 <linux-ext4@vger.kernel.org>,
dsterba@suse.com, "Eric Biggers" <ebiggers@kernel.org>,
"Christian Brauner" <brauner@kernel.org>
Cc: tytso@mit.edu, chao@kernel.org, jaegeuk@kernel.org,
viro@zeniv.linux.org.uk, dsterba@suse.cz
Subject: Re: [PATCH v3 4/7] iomap: use fsverity_is_building() to check for fsverity IO
Date: Fri, 20 Nov 2026 16:21:51 +0000 [thread overview]
Message-ID: <sashiko-outbox-225558@kernel.org> (raw)
In-Reply-To: <20261120155032.187246-5-aalbersh@kernel.org>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] iomap: inode-wide fsverity_is_building() check in
iomap_writeback_handle_eof()
- [Low] iomap: missing Fixes trailer for broken fsverity check in
writeback
--
commit f52ac6dc651e2b12c5452600fd41f0db8111577f
Author: Andrey Albershteyn <aalbersh@kernel.org>
> iomap: use fsverity_is_building() to check for fsverity IO
>
> Recently, inode gained new I_VERITY_BUILDING flag. This flag indicates
> that inode is undergoing fsverity metadata construction. Previously, it
> was indicated by stale iomap flag on the IO, now we can check the inode
> instead. As fsverity inodes are read-only, the only write IO happening
> during I_VERITY_BUILDING is fsverity metadata.
>
> Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
[Severity: Low]
This fixes the check that read an uninitialized or stale wpc->iomap
before wpc->ops->writeback_range() mapped the folio. Should it carry:
Fixes: 63e242afa466 ("iomap: introduce IOMAP_F_FSVERITY and teach writeback to handle fsverity")
> diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
> index d6e2f1ded5ca6..4fb4136908ec5 100644
> --- a/fs/iomap/buffered-io.c
> +++ b/fs/iomap/buffered-io.c
> @@ -1930,7 +1930,7 @@ static bool iomap_writeback_handle_eof(struct folio *folio,
> struct inode *inode = wpc->inode;
> u64 isize = i_size_read(inode);
>
> - if (wpc->iomap.flags & IOMAP_F_FSVERITY) {
> + if (fsverity_is_building(inode)) {
> WARN_ON_ONCE(folio_pos(folio) < isize);
> return true;
> }
[Severity: Medium]
Can writeback of a dirty data folio while I_VERITY_BUILDING is set hit
this WARN_ON_ONCE() and skip post-EOF tail zeroing?
enable_verity() sets I_VERITY_BUILDING without flushing pre-existing
dirty data folios in inode->i_mapping, and filesystems write back both
dirty data and verity metadata folios while I_VERITY_BUILDING is still
set (either during background writeback or in ->end_enable_verity()).
Because fsverity_is_building(inode) is an inode-wide flag checked before
comparing the folio offset against isize, any dirty regular data folio
written back during verity construction triggers WARN_ON_ONCE(folio_pos(folio) < isize),
and a dirty data folio straddling isize returns early without running
folio_zero_segment() or clamping *end_pos to isize.
Should the fsverity_is_building(inode) exemption apply only when the
folio lies entirely at or beyond isize?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120155032.187246-1-aalbersh@kernel.org?part=4
next prev parent reply other threads:[~2026-11-20 16:21 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 15:50 [PATCH v3 0/7] fsverity: lift ioctl() input masking and runtime inode flag to VFS Andrey Albershteyn
2026-11-20 15:50 ` [f2fs-dev] " Andrey Albershteyn via Linux-f2fs-devel
2026-11-20 15:50 ` [PATCH v3 1/7] fs: constify inode argument of inode_state_read_once() Andrey Albershteyn
2026-11-20 15:50 ` [f2fs-dev] " Andrey Albershteyn via Linux-f2fs-devel
2026-11-20 15:58 ` sashiko-bot
2026-11-20 15:58 ` sashiko-bot
2026-11-20 15:50 ` [PATCH v3 2/7] fs: strip FS_VERITY_FL from FS_IOC_SETFLAGS Andrey Albershteyn
2026-11-20 15:50 ` [f2fs-dev] " Andrey Albershteyn via Linux-f2fs-devel
2026-11-20 16:00 ` sashiko-bot
2026-11-20 16:02 ` sashiko-bot
2026-11-20 15:50 ` [PATCH v3 3/7] fs,fsverity: add I_VERITY_BUILDING inode state flag Andrey Albershteyn
2026-11-20 15:50 ` [f2fs-dev] [PATCH v3 3/7] fs, fsverity: " Andrey Albershteyn via Linux-f2fs-devel
2026-11-20 16:01 ` [PATCH v3 3/7] fs,fsverity: " sashiko-bot
2026-11-20 16:01 ` sashiko-bot
2026-11-20 15:50 ` [PATCH v3 4/7] iomap: use fsverity_is_building() to check for fsverity IO Andrey Albershteyn
2026-11-20 15:50 ` [f2fs-dev] " Andrey Albershteyn via Linux-f2fs-devel
2026-11-20 16:13 ` sashiko-bot
2026-11-20 16:21 ` sashiko-bot [this message]
2026-11-20 16:42 ` Andrey Albershteyn
2026-11-20 15:50 ` [PATCH v3 5/7] btrfs: use I_VERITY_BUILDING instead of private flags Andrey Albershteyn
2026-11-20 15:50 ` [f2fs-dev] " Andrey Albershteyn via Linux-f2fs-devel
2026-11-20 15:58 ` sashiko-bot
2026-11-20 15:59 ` sashiko-bot
2026-11-20 15:50 ` [PATCH v3 6/7] ext4: " Andrey Albershteyn
2026-11-20 15:50 ` [f2fs-dev] " Andrey Albershteyn via Linux-f2fs-devel
2026-11-20 16:00 ` sashiko-bot
2026-11-20 16:01 ` sashiko-bot
2026-11-20 15:50 ` [PATCH v3 7/7] f2fs: " Andrey Albershteyn
2026-11-20 15:50 ` [f2fs-dev] " Andrey Albershteyn via Linux-f2fs-devel
2026-11-20 15:58 ` sashiko-bot
2026-11-20 16:01 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-225558@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=aalbersh@kernel.org \
--cc=brauner@kernel.org \
--cc=chao@kernel.org \
--cc=dsterba@suse.com \
--cc=dsterba@suse.cz \
--cc=ebiggers@kernel.org \
--cc=fsverity@lists.linux.dev \
--cc=jaegeuk@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.