From: Eric Biggers <ebiggers@kernel.org>
To: Andrey Albershteyn <aalbersh@kernel.org>
Cc: fsdevel <linux-fsdevel@vger.kernel.org>,
fsverity <fsverity@lists.linux.dev>,
linux-ext4 <linux-ext4@vger.kernel.org>,
linux-btrfs <linux-btrfs@vger.kernel.org>,
linux-f2fs <linux-f2fs-devel@lists.sourceforge.net>,
linux-xfs <linux-xfs@vger.kernel.org>,
dsterba@suse.com, Christian Brauner <brauner@kernel.org>,
tytso@mit.edu, chao@kernel.org, jaegeuk@kernel.org,
viro@zeniv.linux.org.uk, Boris Burkov <boris@bur.io>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v3 2/7] fs: strip FS_VERITY_FL from FS_IOC_SETFLAGS
Date: Fri, 20 Nov 2026 22:20:11 +0000 [thread overview]
Message-ID: <20261120222011.GC3048696@google.com> (raw)
In-Reply-To: <20261120155032.187246-3-aalbersh@kernel.org>
On Fri, Nov 20, 2026 at 04:50:24PM +0100, Andrey Albershteyn wrote:
> The common use of FS_IOC_GETFLAGS/SETFLAGS is get-modify-set loop.
> Filesystems could return verity status with GETFLAGS, attempting to then
> pass FS_VERITY_FL to SETFLAGS is not allowed.
>
> The ext4 and f2fs already treat FS_VERITY_FL in the set path as no-op,
> however, BTRFS returns -EOPNOTSUPP. So, the modification of other flags
> doesn't work on BTRFS for fsverity inodes.
>
> Fix it for BTRFS and anyone else, the ext4 and f2fs masking becomes
> no-op. The file_get/setattr() path is fine here as this flag is cleared
> right before fileattr_set_prepare(). The future fsverity support in XFS
> would also need it.
The commit message should explicitly state that this changes behavior
not just in the get-modify-set case on btrfs, but also makes
FS_VERITY_FL be silently ignored if it's attempted to be set on a file
that didn't have it before. I guess that behavior is okay since ext4
and f2fs do that, but we should be intentional about it.
- Eric
next prev parent reply other threads:[~2026-11-20 22:20 UTC|newest]
Thread overview: 26+ 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 ` [PATCH v3 1/7] fs: constify inode argument of inode_state_read_once() Andrey Albershteyn
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 16:00 ` sashiko-bot
2026-11-20 16:02 ` sashiko-bot
2026-11-20 22:20 ` Eric Biggers [this message]
2026-11-20 15:50 ` [PATCH v3 3/7] fs,fsverity: add I_VERITY_BUILDING inode state flag Andrey Albershteyn
2026-11-20 16:01 ` sashiko-bot
2026-11-20 16:01 ` sashiko-bot
2026-11-20 22:17 ` Eric Biggers
2026-11-20 15:50 ` [PATCH v3 4/7] iomap: use fsverity_is_building() to check for fsverity IO Andrey Albershteyn
2026-11-20 16:13 ` sashiko-bot
2026-11-20 16:21 ` sashiko-bot
2026-11-20 16:42 ` Andrey Albershteyn
2026-11-20 22:23 ` Eric Biggers
2026-11-20 15:50 ` [PATCH v3 5/7] btrfs: use I_VERITY_BUILDING instead of private flags Andrey Albershteyn
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 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: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=20261120222011.GC3048696@google.com \
--to=ebiggers@kernel.org \
--cc=aalbersh@kernel.org \
--cc=boris@bur.io \
--cc=brauner@kernel.org \
--cc=chao@kernel.org \
--cc=dsterba@suse.com \
--cc=fsverity@lists.linux.dev \
--cc=hch@lst.de \
--cc=jaegeuk@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox