linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Larsson <alexl@redhat.com>
To: Miklos Szeredi <mszeredi@redhat.com>, linux-unionfs@vger.kernel.org
Cc: Amir Goldstein <amir73il@gmail.com>,
	linux-fsdevel@vger.kernel.org,
	 Giuseppe Scrivano <gscrivan@redhat.com>
Subject: Re: [PATCH v2 5/5] ovl: don't require "metacopy=on" for "verity"
Date: Tue, 25 Mar 2025 14:48:01 +0100	[thread overview]
Message-ID: <acc20a3215e0b4b7945f57cc1fb22c0f102997ed.camel@redhat.com> (raw)
In-Reply-To: <20250325104634.162496-6-mszeredi@redhat.com>

On Tue, 2025-03-25 at 11:46 +0100, Miklos Szeredi wrote:
> Allow the "verity" mount option to be used with "userxattr" data-only
> layer(s).
> 
> Previous patches made sure that with "userxattr" metacopy only works
> in the
> lower -> data scenario.
> 
> In this scenario the lower (metadata) layer must be secured against
> tampering, in which case the verity checksums contained in this layer
> can
> ensure integrity of data even in the case of an untrusted data layer.
> 
> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>

Reviewed-by: Alexander Larsson <alexl@redhat.com>

This works well enough for composefs, but I agree with Amir that once
we start allowing redirects into data-only lowers, even with
metacopy=0, then we could at least allow verity=on.

> ---
>  fs/overlayfs/params.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/overlayfs/params.c b/fs/overlayfs/params.c
> index 54468b2b0fba..8ac0997dca13 100644
> --- a/fs/overlayfs/params.c
> +++ b/fs/overlayfs/params.c
> @@ -846,8 +846,8 @@ int ovl_fs_params_verify(const struct
> ovl_fs_context *ctx,
>  		config->uuid = OVL_UUID_NULL;
>  	}
>  
> -	/* Resolve verity -> metacopy dependency */
> -	if (config->verity_mode && !config->metacopy) {
> +	/* Resolve verity -> metacopy dependency (unless used with
> userxattr) */
> +	if (config->verity_mode && !config->metacopy && !config-
> >userxattr) {
>  		/* Don't allow explicit specified conflicting
> combinations */
>  		if (set.metacopy) {
>  			pr_err("conflicting options:
> metacopy=off,verity=%s\n",
> @@ -945,7 +945,7 @@ int ovl_fs_params_verify(const struct
> ovl_fs_context *ctx,
>  	}
>  
>  
> -	/* Resolve userxattr -> !redirect && !metacopy && !verity
> dependency */
> +	/* Resolve userxattr -> !redirect && !metacopy dependency */
>  	if (config->userxattr) {
>  		if (set.redirect &&
>  		    config->redirect_mode != OVL_REDIRECT_NOFOLLOW)
> {
> @@ -957,11 +957,6 @@ int ovl_fs_params_verify(const struct
> ovl_fs_context *ctx,
>  			pr_err("conflicting options:
> userxattr,metacopy=on\n");
>  			return -EINVAL;
>  		}
> -		if (config->verity_mode) {
> -			pr_err("conflicting options:
> userxattr,verity=%s\n",
> -			       ovl_verity_mode(config));
> -			return -EINVAL;
> -		}
>  		/*
>  		 * Silently disable default setting of redirect and
> metacopy.
>  		 * This shall be the default in the future as well:
> these

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=
 Alexander Larsson                                            Red Hat,
Inc 
       alexl@redhat.com            alexander.larsson@gmail.com 
He's an oversexed soccer-playing filmmaker possessed of the uncanny 
powers of an insect. She's a foxy nymphomaniac mercenary on the trail
of 
a serial killer. They fight crime! 


  parent reply	other threads:[~2025-03-25 13:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 10:46 [PATCH v2 0/5] ovl: metacopy/verity fixes and improvements Miklos Szeredi
2025-03-25 10:46 ` [PATCH v2 1/5] ovl: don't allow datadir only Miklos Szeredi
2025-03-25 11:57   ` Alexander Larsson
2025-03-25 14:36   ` Christian Brauner
2025-03-25 10:46 ` [PATCH v2 2/5] ovl: remove unused forward declaration Miklos Szeredi
2025-03-25 13:43   ` Alexander Larsson
2025-03-25 14:38   ` Christian Brauner
2025-03-25 10:46 ` [PATCH v2 3/5] ovl: make redirect/metacopy rejection consistent Miklos Szeredi
2025-03-25 11:13   ` Amir Goldstein
2025-03-25 13:44   ` Alexander Larsson
2025-03-25 10:46 ` [PATCH v2 4/5] ovl: relax redirect/metacopy requirements for lower -> data redirect Miklos Szeredi
2025-03-25 11:22   ` Amir Goldstein
2025-03-25 13:46   ` Alexander Larsson
2025-03-25 10:46 ` [PATCH v2 5/5] ovl: don't require "metacopy=on" for "verity" Miklos Szeredi
2025-03-25 11:33   ` Amir Goldstein
2025-03-25 11:47     ` Amir Goldstein
2025-03-25 13:42       ` Alexander Larsson
2025-03-26 10:24     ` Miklos Szeredi
2025-03-28 10:08       ` Alexander Larsson
2025-03-25 13:48   ` Alexander Larsson [this message]
2025-03-25 12:04 ` [PATCH v2 0/5] ovl: metacopy/verity fixes and improvements Amir Goldstein

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=acc20a3215e0b4b7945f57cc1fb22c0f102997ed.camel@redhat.com \
    --to=alexl@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=gscrivan@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    /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).