From: Eric Biggers <ebiggers@kernel.org>
To: Gwendal Grignou <gwendal@chromium.org>
Cc: sarthakkukreti@chromium.org, tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] tune2fs: allow remove VERITY
Date: Tue, 23 Jun 2020 19:40:43 -0700 [thread overview]
Message-ID: <20200624024043.GA844@sol.localdomain> (raw)
In-Reply-To: <20200624023107.182118-1-gwendal@chromium.org>
On Tue, Jun 23, 2020 at 07:31:07PM -0700, Gwendal Grignou wrote:
> Allow verity flag to be removed from the susperblock:
> Tests:
> - check the signed file is readable by older kernel after flag
> is removed. EXT4_VERITY_FL replaces EXT4_EXT_MIGRATE that has been
> removed in 2009.
> - when a new kernel is reinstalled, check reenabling verity flag
> allow signature to be verified (fsverity measure ...).
>
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> ---
> misc/tune2fs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/misc/tune2fs.c b/misc/tune2fs.c
> index 314cc0d0..724b8014 100644
> --- a/misc/tune2fs.c
> +++ b/misc/tune2fs.c
> @@ -198,7 +198,8 @@ static __u32 clear_ok_features[3] = {
> EXT4_FEATURE_RO_COMPAT_QUOTA |
> EXT4_FEATURE_RO_COMPAT_PROJECT |
> EXT4_FEATURE_RO_COMPAT_METADATA_CSUM |
> - EXT4_FEATURE_RO_COMPAT_READONLY
> + EXT4_FEATURE_RO_COMPAT_READONLY |
> + EXT4_FEATURE_RO_COMPAT_VERITY
> };
>
tune2fs doesn't allow removing features like encrypt, casefold, verity, extents,
and ea_inode because it doesn't know whether there are any inodes on the
filesystem that are using these features. These features can't be removed if
there are any inodes using them.
There was recently a suggestion to make tune2fs scan the inode table to
determine whether it is safe to remove these flags; see
https://lkml.kernel.org/linux-ext4/C0761869-5FCD-4CC7-9635-96C18744A0F8@dilger.ca
and
https://lkml.kernel.org/linux-ext4/20200407053213.GC102437@sol.localdomain
I think you'd need to implement that in order for clearing verity to be safe.
Note that misc/tune2fs.8.in would also need to be updated to remove the sentence
that says that clearing the verity feature is unsuppported.
- Eric
next prev parent reply other threads:[~2020-06-24 2:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 2:31 [PATCH] tune2fs: allow remove VERITY Gwendal Grignou
2020-06-24 2:40 ` Eric Biggers [this message]
2020-06-24 7:06 ` Gwendal Grignou
2020-06-24 16:09 ` Eric Biggers
2020-06-25 18:26 ` Gwendal Grignou
2020-06-26 18:56 ` 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=20200624024043.GA844@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=gwendal@chromium.org \
--cc=linux-ext4@vger.kernel.org \
--cc=sarthakkukreti@chromium.org \
--cc=tytso@mit.edu \
/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).