From: Andrey Albershteyn <aalbersh@redhat.com>
To: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: Andrey Albershteyn <aalbersh@redhat.com>
Subject: [RFC PATCH 00/11] fs-verity support for XFS
Date: Tue, 13 Dec 2022 18:29:24 +0100 [thread overview]
Message-ID: <20221213172935.680971-1-aalbersh@redhat.com> (raw)
Hi all,
This patchset introduces fs-verity [5] support for XFS. This
implementation utilizes extended attributes to store fs-verity
metadata in comparison to ext4/f2fs which store that after EOF. The
pages are stored in the remote extended attributes.
A few starting points:
- The xattr name of a each Merkle tree page is binary
- fs-verity doesn't work with multi-page folios yet. Thus, those are
disabled when fs-verity is enabled on inode.
- Direct path and DAX are disabled for inodes with fs-verity
- Pages are verified in iomap's read IO path (offloaded with
workqueue)
- New ro-compat flag is added as inodes with fs-verity have new
on-disk diflag
Not yet implemented:
- No pre-fetching of Merkle tree pages in the
read_merkle_tree_page()
- No marking of already verified Merkle tree pages (each read, the
whole tree is verified).
Preliminary testing:
- fstests 1k, 4k
- More in-depth testing is on the way :)
This patchset depends on Allison's Parent Pointer patchset [1],
which introduces binary names for extended attributes. Particularly,
patch "[PATCH v6 13/27] xfs: Add xfs_verify_pptr" [3] is needed.
The first patch moves setting of large folio support flag to more
appropriate location - xfs_setup_inode(), where other flags are set.
The second one adds wrapper which would be used when already
existing inode is sealed with fs-verity. The rest adds fs-verity
support.
Allison's Parent Pointer patchset v6:
[1]: https://lore.kernel.org/linux-xfs/20221129211242.2689855-1-allison.henderson@oracle.com/
Allison's Parent Pointer branch:
[2]: https://github.com/allisonhenderson/xfs/tree/xfs_new_pptrsv6
Patch which adds handling of xattr binary names:
[3]: https://lore.kernel.org/linux-xfs/20221129211242.2689855-14-allison.henderson@oracle.com/
This patchset branch:
[4]: https://github.com/alberand/linux/tree/xfs-verity
fs-verity docs:
[5]: https://www.kernel.org/doc/html/latest/filesystems/fsverity.html
I'm looking forward for your comments.
Thanks!
Andrey
Andrey Albershteyn (11):
xfs: enable large folios in xfs_setup_inode()
pagemap: add mapping_clear_large_folios() wrapper
xfs: add attribute type for fs-verity
xfs: add fs-verity ro-compat flag
xfs: add inode on-disk VERITY flag
xfs: initialize fs-verity on file open and cleanup on inode
destruction
xfs: disable direct read path for fs-verity sealed files
xfs: don't enable large folios on fs-verity sealed inode
iomap: fs-verity verification on page read
xfs: add fs-verity support
xfs: add fs-verity ioctls
fs/iomap/buffered-io.c | 80 ++++++++++++-
fs/xfs/Makefile | 1 +
fs/xfs/libxfs/xfs_attr.c | 8 ++
fs/xfs/libxfs/xfs_da_format.h | 5 +-
fs/xfs/libxfs/xfs_format.h | 14 ++-
fs/xfs/libxfs/xfs_log_format.h | 1 +
fs/xfs/libxfs/xfs_sb.c | 2 +
fs/xfs/xfs_file.c | 22 +++-
fs/xfs/xfs_icache.c | 2 -
fs/xfs/xfs_inode.c | 2 +
fs/xfs/xfs_inode.h | 1 +
fs/xfs/xfs_ioctl.c | 11 ++
fs/xfs/xfs_iops.c | 9 ++
fs/xfs/xfs_mount.h | 2 +
fs/xfs/xfs_super.c | 12 ++
fs/xfs/xfs_trace.h | 1 +
fs/xfs/xfs_verity.c | 203 +++++++++++++++++++++++++++++++++
fs/xfs/xfs_verity.h | 19 +++
fs/xfs/xfs_xattr.c | 3 +
include/linux/iomap.h | 5 +
include/linux/pagemap.h | 5 +
21 files changed, 393 insertions(+), 15 deletions(-)
create mode 100644 fs/xfs/xfs_verity.c
create mode 100644 fs/xfs/xfs_verity.h
--
2.31.1
next reply other threads:[~2022-12-13 17:30 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 17:29 Andrey Albershteyn [this message]
2022-12-13 17:29 ` [RFC PATCH 01/11] xfs: enable large folios in xfs_setup_inode() Andrey Albershteyn
2022-12-14 0:53 ` Dave Chinner
2022-12-13 17:29 ` [RFC PATCH 02/11] pagemap: add mapping_clear_large_folios() wrapper Andrey Albershteyn
2022-12-13 17:55 ` Matthew Wilcox
2022-12-13 19:33 ` Eric Biggers
2022-12-13 21:10 ` Dave Chinner
2022-12-14 6:52 ` Eric Biggers
2022-12-14 8:12 ` Dave Chinner
2022-12-13 21:08 ` Dave Chinner
2023-01-09 16:34 ` Andrey Albershteyn
2022-12-13 17:29 ` [RFC PATCH 03/11] xfs: add attribute type for fs-verity Andrey Albershteyn
2022-12-13 17:43 ` Eric Sandeen
2022-12-14 1:03 ` Dave Chinner
2023-01-09 16:37 ` Andrey Albershteyn
2022-12-13 17:29 ` [RFC PATCH 04/11] xfs: add fs-verity ro-compat flag Andrey Albershteyn
2022-12-14 1:06 ` Dave Chinner
2022-12-13 17:29 ` [RFC PATCH 05/11] xfs: add inode on-disk VERITY flag Andrey Albershteyn
2022-12-14 1:29 ` Dave Chinner
2023-01-09 16:51 ` Andrey Albershteyn
2022-12-13 17:29 ` [RFC PATCH 06/11] xfs: initialize fs-verity on file open and cleanup on inode destruction Andrey Albershteyn
2022-12-14 1:35 ` Dave Chinner
2022-12-14 5:25 ` Eric Biggers
2022-12-14 8:18 ` Dave Chinner
2022-12-13 17:29 ` [RFC PATCH 07/11] xfs: disable direct read path for fs-verity sealed files Andrey Albershteyn
2022-12-14 2:07 ` Dave Chinner
2022-12-14 5:44 ` Eric Biggers
2022-12-23 16:18 ` Christoph Hellwig
2023-01-09 17:23 ` Andrey Albershteyn
2022-12-13 17:29 ` [RFC PATCH 08/11] xfs: don't enable large folios on fs-verity sealed inode Andrey Albershteyn
2022-12-14 2:07 ` Dave Chinner
2022-12-13 17:29 ` [RFC PATCH 09/11] iomap: fs-verity verification on page read Andrey Albershteyn
2022-12-13 19:02 ` Eric Biggers
2023-01-09 16:58 ` Andrey Albershteyn
2022-12-14 5:43 ` Dave Chinner
2022-12-13 17:29 ` [RFC PATCH 10/11] xfs: add fs-verity support Andrey Albershteyn
2022-12-13 19:08 ` Eric Biggers
2022-12-13 19:22 ` Darrick J. Wong
2022-12-13 20:13 ` Eric Biggers
2022-12-13 20:33 ` Dave Chinner
2022-12-13 20:39 ` Eric Biggers
2022-12-13 21:40 ` Dave Chinner
2022-12-14 7:58 ` Dave Chinner
2022-12-13 17:29 ` [RFC PATCH 11/11] xfs: add fs-verity ioctls Andrey Albershteyn
2022-12-13 20:50 ` [RFC PATCH 00/11] fs-verity support for XFS Eric Biggers
2022-12-13 22:11 ` Dave Chinner
2022-12-14 6:31 ` Eric Biggers
2022-12-14 23:06 ` Dave Chinner
2022-12-15 6:47 ` Eric Biggers
2022-12-15 20:57 ` Dave Chinner
2022-12-16 5:04 ` Eric Biggers
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=20221213172935.680971-1-aalbersh@redhat.com \
--to=aalbersh@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).