Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH v3 0/7] fsverity: lift ioctl() input masking and runtime inode flag to VFS
@ 2026-11-20 15:50 Andrey Albershteyn
  2026-11-20 15:50 ` [PATCH v3 1/7] fs: constify inode argument of inode_state_read_once() Andrey Albershteyn
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Andrey Albershteyn @ 2026-11-20 15:50 UTC (permalink / raw)
  To: fsdevel, fsverity, linux-ext4, linux-btrfs, linux-f2fs, linux-xfs,
	dsterba, Eric Biggers, Christian Brauner
  Cc: Andrey Albershteyn, tytso, chao, jaegeuk, viro

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


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

end of thread, other threads:[~2026-11-20 22:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:50 ` [PATCH v3 2/7] fs: strip FS_VERITY_FL from FS_IOC_SETFLAGS Andrey Albershteyn
2026-11-20 22:20   ` Eric Biggers
2026-11-20 15:50 ` [PATCH v3 3/7] fs,fsverity: add I_VERITY_BUILDING inode state flag Andrey Albershteyn
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 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:50 ` [PATCH v3 6/7] ext4: " Andrey Albershteyn
2026-11-20 15:50 ` [PATCH v3 7/7] f2fs: " Andrey Albershteyn

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