All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Albershteyn <aalbersh@kernel.org>
To: "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, "Eric Biggers" <ebiggers@kernel.org>,
	"Christian Brauner" <brauner@kernel.org>
Cc: Andrey Albershteyn <aalbersh@kernel.org>,
	tytso@mit.edu, chao@kernel.org, jaegeuk@kernel.org,
	viro@zeniv.linux.org.uk
Subject: [PATCH v3 0/7] fsverity: lift ioctl() input masking and runtime inode flag to VFS
Date: Fri, 20 Nov 2026 16:50:22 +0100	[thread overview]
Message-ID: <20261120155032.187246-1-aalbersh@kernel.org> (raw)

Hi folks,

This patchset lifts two things from filesystems to VFS level:
- No-op'ing FS_VERITY_FL in FS_IOC_SETFLAGS ioctl()
- Runtime fsverity construction flag on inode

The second patch fixes BTRFS get-modify-set loop with
FS_IOC_GETFLAGS/SETFLAGS ioctl()s, as it does return fsverity flag but
not mask it out.

Testing, -g verity passes for all fs, except btrfs/277 and
btrfs+generic/574.

The btrfs/277 seems to fail due to difference between what kernel
and userspace versions support (btrfs-progs v7.1 doesn't seem to
support latest streams v3).

The generic/574 on BTRFS fails only for 1024 block size no matter
the change (fails on v7.3 too). I haven't checked why.

Based on v7.3-rc3.

Changes in v3:
- Add comment that I_VERITY_BUILDING is set over enable
- Revert comment changes in ext4 and f2fs
- Added I_VERITY_BUILDING to show_inode_state()
- Updated comment in begin_enable; dropped -EBUSY
- Added patch changing inode_state_read_once() to const
- Use fsverity_is_building() around ->begin_enable() call
- Use fsverity_is_building() in iomap
Changes in v2:
- Return ret in btrfs_begin_enable_verity()
- Include linux-fsdevel

Andrey Albershteyn (7):
  fs: constify inode argument of inode_state_read_once()
  fs: strip FS_VERITY_FL from FS_IOC_SETFLAGS
  fs,fsverity: add I_VERITY_BUILDING inode state flag
  iomap: use fsverity_is_building() to check for fsverity IO
  btrfs: use I_VERITY_BUILDING instead of private flags
  ext4: use I_VERITY_BUILDING instead of private flags
  f2fs: use I_VERITY_BUILDING instead of private flags

 fs/btrfs/btrfs_inode.h           |  7 -------
 fs/btrfs/verity.c                | 12 ++----------
 fs/ext4/ext4.h                   |  7 -------
 fs/ext4/file.c                   |  2 +-
 fs/ext4/inode.c                  | 17 +++++++++--------
 fs/ext4/ioctl.c                  |  3 +--
 fs/ext4/verity.c                 | 19 ++++++-------------
 fs/f2fs/data.c                   | 10 +++++-----
 fs/f2fs/f2fs.h                   |  7 -------
 fs/f2fs/verity.c                 | 12 +++---------
 fs/file_attr.c                   | 10 ++++++++++
 fs/iomap/buffered-io.c           |  2 +-
 fs/verity/enable.c               | 22 +++++++++++++++++++---
 include/linux/fs.h               |  8 +++++++-
 include/linux/fsverity.h         | 26 ++++++++++++++++++++++++--
 include/trace/events/writeback.h |  3 ++-
 16 files changed, 90 insertions(+), 77 deletions(-)

-- 
2.54.0


WARNING: multiple messages have this Message-ID (diff)
From: Andrey Albershteyn via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: "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, "Eric Biggers" <ebiggers@kernel.org>,
	"Christian Brauner" <brauner@kernel.org>
Cc: tytso@mit.edu, Andrey Albershteyn <aalbersh@kernel.org>,
	viro@zeniv.linux.org.uk, jaegeuk@kernel.org
Subject: [f2fs-dev] [PATCH v3 0/7] fsverity: lift ioctl() input masking and runtime inode flag to VFS
Date: Fri, 20 Nov 2026 16:50:22 +0100	[thread overview]
Message-ID: <20261120155032.187246-1-aalbersh@kernel.org> (raw)

Hi folks,

This patchset lifts two things from filesystems to VFS level:
- No-op'ing FS_VERITY_FL in FS_IOC_SETFLAGS ioctl()
- Runtime fsverity construction flag on inode

The second patch fixes BTRFS get-modify-set loop with
FS_IOC_GETFLAGS/SETFLAGS ioctl()s, as it does return fsverity flag but
not mask it out.

Testing, -g verity passes for all fs, except btrfs/277 and
btrfs+generic/574.

The btrfs/277 seems to fail due to difference between what kernel
and userspace versions support (btrfs-progs v7.1 doesn't seem to
support latest streams v3).

The generic/574 on BTRFS fails only for 1024 block size no matter
the change (fails on v7.3 too). I haven't checked why.

Based on v7.3-rc3.

Changes in v3:
- Add comment that I_VERITY_BUILDING is set over enable
- Revert comment changes in ext4 and f2fs
- Added I_VERITY_BUILDING to show_inode_state()
- Updated comment in begin_enable; dropped -EBUSY
- Added patch changing inode_state_read_once() to const
- Use fsverity_is_building() around ->begin_enable() call
- Use fsverity_is_building() in iomap
Changes in v2:
- Return ret in btrfs_begin_enable_verity()
- Include linux-fsdevel

Andrey Albershteyn (7):
  fs: constify inode argument of inode_state_read_once()
  fs: strip FS_VERITY_FL from FS_IOC_SETFLAGS
  fs,fsverity: add I_VERITY_BUILDING inode state flag
  iomap: use fsverity_is_building() to check for fsverity IO
  btrfs: use I_VERITY_BUILDING instead of private flags
  ext4: use I_VERITY_BUILDING instead of private flags
  f2fs: use I_VERITY_BUILDING instead of private flags

 fs/btrfs/btrfs_inode.h           |  7 -------
 fs/btrfs/verity.c                | 12 ++----------
 fs/ext4/ext4.h                   |  7 -------
 fs/ext4/file.c                   |  2 +-
 fs/ext4/inode.c                  | 17 +++++++++--------
 fs/ext4/ioctl.c                  |  3 +--
 fs/ext4/verity.c                 | 19 ++++++-------------
 fs/f2fs/data.c                   | 10 +++++-----
 fs/f2fs/f2fs.h                   |  7 -------
 fs/f2fs/verity.c                 | 12 +++---------
 fs/file_attr.c                   | 10 ++++++++++
 fs/iomap/buffered-io.c           |  2 +-
 fs/verity/enable.c               | 22 +++++++++++++++++++---
 include/linux/fs.h               |  8 +++++++-
 include/linux/fsverity.h         | 26 ++++++++++++++++++++++++--
 include/trace/events/writeback.h |  3 ++-
 16 files changed, 90 insertions(+), 77 deletions(-)

-- 
2.54.0



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

             reply	other threads:[~2026-11-20 15:53 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 15:50 Andrey Albershteyn [this message]
2026-11-20 15:50 ` [f2fs-dev] [PATCH v3 0/7] fsverity: lift ioctl() input masking and runtime inode flag to VFS 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
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=20261120155032.187246-1-aalbersh@kernel.org \
    --to=aalbersh@kernel.org \
    --cc=brauner@kernel.org \
    --cc=chao@kernel.org \
    --cc=dsterba@suse.com \
    --cc=ebiggers@kernel.org \
    --cc=fsverity@lists.linux.dev \
    --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 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.