From: Eric Biggers <ebiggers@kernel.org>
To: linux-fscrypt@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org,
Andrey Albershteyn <aalbersh@redhat.com>
Subject: [PATCH v2 11/11] ext4: allow verity with fs block size < PAGE_SIZE
Date: Fri, 23 Dec 2022 12:36:38 -0800 [thread overview]
Message-ID: <20221223203638.41293-12-ebiggers@kernel.org> (raw)
In-Reply-To: <20221223203638.41293-1-ebiggers@kernel.org>
From: Eric Biggers <ebiggers@google.com>
Now that the needed changes have been made to fs/buffer.c, ext4 is ready
to support the verity feature when the filesystem block size is less
than the page size. So remove the mount-time check that prevented this.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
Documentation/filesystems/fsverity.rst | 8 +++++---
fs/ext4/super.c | 5 -----
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/Documentation/filesystems/fsverity.rst b/Documentation/filesystems/fsverity.rst
index 948d202545240..c0c8a25b41bb8 100644
--- a/Documentation/filesystems/fsverity.rst
+++ b/Documentation/filesystems/fsverity.rst
@@ -497,9 +497,11 @@ To create verity files on an ext4 filesystem, the filesystem must have
been formatted with ``-O verity`` or had ``tune2fs -O verity`` run on
it. "verity" is an RO_COMPAT filesystem feature, so once set, old
kernels will only be able to mount the filesystem readonly, and old
-versions of e2fsck will be unable to check the filesystem. Moreover,
-currently ext4 only supports mounting a filesystem with the "verity"
-feature when its block size is equal to PAGE_SIZE (often 4096 bytes).
+versions of e2fsck will be unable to check the filesystem.
+
+Originally, an ext4 filesystem with the "verity" feature could only be
+mounted when its block size was equal to the system page size
+(typically 4096 bytes). In Linux v6.3, this limitation was removed.
ext4 sets the EXT4_VERITY_FL on-disk inode flag on verity files. It
can only be set by `FS_IOC_ENABLE_VERITY`_, and it cannot be cleared.
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 16a343e8047d4..798cb19e2258b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5336,11 +5336,6 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
}
}
- if (ext4_has_feature_verity(sb) && sb->s_blocksize != PAGE_SIZE) {
- ext4_msg(sb, KERN_ERR, "Unsupported blocksize for fs-verity");
- goto failed_mount_wq;
- }
-
/*
* Get the # of file system overhead blocks from the
* superblock if present.
--
2.39.0
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: linux-fscrypt@vger.kernel.org
Cc: Andrey Albershteyn <aalbersh@redhat.com>,
linux-f2fs-devel@lists.sourceforge.net,
linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: [f2fs-dev] [PATCH v2 11/11] ext4: allow verity with fs block size < PAGE_SIZE
Date: Fri, 23 Dec 2022 12:36:38 -0800 [thread overview]
Message-ID: <20221223203638.41293-12-ebiggers@kernel.org> (raw)
In-Reply-To: <20221223203638.41293-1-ebiggers@kernel.org>
From: Eric Biggers <ebiggers@google.com>
Now that the needed changes have been made to fs/buffer.c, ext4 is ready
to support the verity feature when the filesystem block size is less
than the page size. So remove the mount-time check that prevented this.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
Documentation/filesystems/fsverity.rst | 8 +++++---
fs/ext4/super.c | 5 -----
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/Documentation/filesystems/fsverity.rst b/Documentation/filesystems/fsverity.rst
index 948d202545240..c0c8a25b41bb8 100644
--- a/Documentation/filesystems/fsverity.rst
+++ b/Documentation/filesystems/fsverity.rst
@@ -497,9 +497,11 @@ To create verity files on an ext4 filesystem, the filesystem must have
been formatted with ``-O verity`` or had ``tune2fs -O verity`` run on
it. "verity" is an RO_COMPAT filesystem feature, so once set, old
kernels will only be able to mount the filesystem readonly, and old
-versions of e2fsck will be unable to check the filesystem. Moreover,
-currently ext4 only supports mounting a filesystem with the "verity"
-feature when its block size is equal to PAGE_SIZE (often 4096 bytes).
+versions of e2fsck will be unable to check the filesystem.
+
+Originally, an ext4 filesystem with the "verity" feature could only be
+mounted when its block size was equal to the system page size
+(typically 4096 bytes). In Linux v6.3, this limitation was removed.
ext4 sets the EXT4_VERITY_FL on-disk inode flag on verity files. It
can only be set by `FS_IOC_ENABLE_VERITY`_, and it cannot be cleared.
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 16a343e8047d4..798cb19e2258b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5336,11 +5336,6 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
}
}
- if (ext4_has_feature_verity(sb) && sb->s_blocksize != PAGE_SIZE) {
- ext4_msg(sb, KERN_ERR, "Unsupported blocksize for fs-verity");
- goto failed_mount_wq;
- }
-
/*
* Get the # of file system overhead blocks from the
* superblock if present.
--
2.39.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2022-12-23 20:37 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-23 20:36 [PATCH v2 00/11] fsverity: support for non-4K pages Eric Biggers
2022-12-23 20:36 ` [f2fs-dev] " Eric Biggers
2022-12-23 20:36 ` [PATCH v2 01/11] fsverity: use unsigned long for level_start Eric Biggers
2022-12-23 20:36 ` [f2fs-dev] " Eric Biggers
2022-12-23 20:36 ` [PATCH v2 02/11] fsverity: simplify Merkle tree readahead size calculation Eric Biggers
2022-12-23 20:36 ` [f2fs-dev] " Eric Biggers
2022-12-23 20:36 ` [PATCH v2 03/11] fsverity: store log2(digest_size) precomputed Eric Biggers
2022-12-23 20:36 ` [f2fs-dev] " Eric Biggers
2022-12-23 20:36 ` [PATCH v2 04/11] fsverity: use EFBIG for file too large to enable verity Eric Biggers
2022-12-23 20:36 ` [f2fs-dev] " Eric Biggers
2022-12-23 20:36 ` [PATCH v2 05/11] fsverity: replace fsverity_hash_page() with fsverity_hash_block() Eric Biggers
2022-12-23 20:36 ` [f2fs-dev] " Eric Biggers
2022-12-23 20:36 ` [PATCH v2 06/11] fsverity: support verification with tree block size < PAGE_SIZE Eric Biggers
2022-12-23 20:36 ` [f2fs-dev] " Eric Biggers
2022-12-23 20:36 ` [PATCH v2 07/11] fsverity: support enabling " Eric Biggers
2022-12-23 20:36 ` [f2fs-dev] " Eric Biggers
2022-12-23 20:36 ` [PATCH v2 08/11] ext4: simplify ext4_readpage_limit() Eric Biggers
2022-12-23 20:36 ` [f2fs-dev] " Eric Biggers
2022-12-23 20:36 ` [PATCH v2 09/11] f2fs: simplify f2fs_readpage_limit() Eric Biggers
2022-12-23 20:36 ` [f2fs-dev] " Eric Biggers
2022-12-23 20:36 ` [PATCH v2 10/11] fs/buffer.c: support fsverity in block_read_full_folio() Eric Biggers
2022-12-23 20:36 ` [f2fs-dev] " Eric Biggers
2023-01-10 2:37 ` Andrew Morton
2023-01-10 2:37 ` [f2fs-dev] " Andrew Morton
2023-01-10 3:05 ` Eric Biggers
2023-01-10 3:05 ` [f2fs-dev] " Eric Biggers
2023-01-20 19:56 ` Eric Biggers
2023-01-20 19:56 ` [f2fs-dev] " Eric Biggers
2023-01-21 6:39 ` Christoph Hellwig
2023-01-21 6:39 ` [f2fs-dev] " Christoph Hellwig
2022-12-23 20:36 ` Eric Biggers [this message]
2022-12-23 20:36 ` [f2fs-dev] [PATCH v2 11/11] ext4: allow verity with fs block size < PAGE_SIZE Eric Biggers
2023-01-04 6:38 ` [PATCH v2 00/11] fsverity: support for non-4K pages Ojaswin Mujoo
2023-01-04 6:38 ` [f2fs-dev] " Ojaswin Mujoo via Linux-f2fs-devel
2023-01-04 7:25 ` Eric Biggers
2023-01-04 7:25 ` [f2fs-dev] " Eric Biggers
2023-01-05 11:24 ` Ojaswin Mujoo
2023-01-05 11:24 ` [f2fs-dev] " Ojaswin Mujoo via Linux-f2fs-devel
2023-01-09 17:38 ` Eric Biggers
2023-01-09 17:38 ` [f2fs-dev] " Eric Biggers
2023-01-09 19:34 ` Andrey Albershteyn
2023-01-09 19:34 ` [f2fs-dev] " Andrey Albershteyn
2023-01-10 3:10 ` Eric Biggers
2023-01-10 3:10 ` [f2fs-dev] " Eric Biggers
2023-02-03 22:01 ` Eric Biggers
2023-02-03 22:01 ` [f2fs-dev] " Eric Biggers
2023-02-28 1:01 ` patchwork-bot+f2fs
2023-02-28 1:01 ` patchwork-bot+f2fs
2023-02-28 1:30 ` Eric Biggers
2023-02-28 1:30 ` [f2fs-dev] " Eric Biggers
2023-02-28 3:53 ` Jaegeuk Kim
2023-02-28 3:53 ` [f2fs-dev] " Jaegeuk Kim
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=20221223203638.41293-12-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=aalbersh@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--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 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.