From: Giuseppe Scrivano <gscrivan@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Amir Goldstein <amir73il@gmail.com>,
Miklos Szeredi <mszeredi@redhat.com>,
linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 3/5] ovl: make redirect/metacopy rejection consistent
Date: Thu, 20 Feb 2025 10:53:58 +0100 [thread overview]
Message-ID: <87a5ahdjrd.fsf@redhat.com> (raw)
In-Reply-To: <CAJfpegvUdaCeBcPPc_Qe6vK4ELz7NXWCxuDcVHLpbzZJazXsqA@mail.gmail.com> (Miklos Szeredi's message of "Wed, 12 Feb 2025 17:57:50 +0100")
Miklos Szeredi <miklos@szeredi.hu> writes:
> On Tue, 11 Feb 2025 at 16:52, Amir Goldstein <amir73il@gmail.com> wrote:
>
>> It sounds very complicated. Is that even possible?
>> Do we always know the path of the upper alias?
>> IIRC, the absolute redirect path in upper is not necessary
>> the absolute path where the origin is found.
>> e.g. if there are middle layer redirects of parents.
>
> Okay, it was a stupid idea.
>
>> > > Looking closer at ovl_maybe_validate_verity(), it's actually
>> > > worse - if you create an upper without metacopy above
>> > > a lower with metacopy, ovl_validate_verity() will only check
>> > > the metacopy xattr on metapath, which is the uppermost
>> > > and find no md5digest, so create an upper above a metacopy
>> > > lower is a way to avert verity check.
>> >
>> > I need to dig into how verity is supposed to work as I'm not seeing it
>> > clearly yet...
>> >
>>
>> The short version - for lazy data lookup we store the lowerdata
>> redirect absolute path in the ovl entry stack, but we do not store
>> the verity digest, we just store OVL_HAS_DIGEST inode flag if there
>> is a digest in metacopy xattr.
>>
>> If we store the digest from lookup time in ovl entry stack, your changes
>> may be easier.
>
> Sorry, I can't wrap my head around this issue. Cc-ing Giuseppe.
>
>> > > So I think lookup code needs to disallow finding metacopy
>> > > in middle layer and need to enforce that also when upper is found
>> > > via index.
>> >
>> > That's the hard link case. I.e. with metacopy=on,index=on it's
>> > possible that one link is metacopyied up, and the other one is then
>> > found through the index. Metacopy *should* work in this case, no?
>> >
>>
>> Right. So I guess we only need to disallow uppermetacopy from
>> index when metacoy=off.
is that be safe from a user namespace?
Regards,
Giuseppe
next prev parent reply other threads:[~2025-02-20 9:54 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 19:45 [PATCH 1/5] ovl: don't allow datadir only Miklos Szeredi
2025-02-10 19:45 ` [PATCH 2/5] ovl: remove unused forward declaration Miklos Szeredi
2025-02-11 10:02 ` Amir Goldstein
2025-02-10 19:45 ` [PATCH 3/5] ovl: make redirect/metacopy rejection consistent Miklos Szeredi
2025-02-11 11:13 ` Amir Goldstein
2025-02-11 11:46 ` Miklos Szeredi
2025-02-11 12:00 ` Amir Goldstein
2025-02-11 12:34 ` Miklos Szeredi
2025-02-11 15:51 ` Amir Goldstein
2025-02-12 16:57 ` Miklos Szeredi
2025-02-20 9:53 ` Giuseppe Scrivano [this message]
2025-02-20 11:25 ` Miklos Szeredi
2025-02-20 11:39 ` Giuseppe Scrivano
2025-02-20 11:47 ` Miklos Szeredi
2025-03-25 12:16 ` Amir Goldstein
2025-03-27 15:28 ` Miklos Szeredi
2025-03-27 17:13 ` Amir Goldstein
2025-03-27 19:23 ` Miklos Szeredi
2025-03-28 9:04 ` Alexander Larsson
2025-03-27 22:20 ` Colin Walters
2025-03-25 10:57 ` Miklos Szeredi
2025-03-25 11:18 ` Alexander Larsson
2025-03-25 13:34 ` Giuseppe Scrivano
2025-03-25 13:42 ` Miklos Szeredi
2025-03-25 14:16 ` Alexander Larsson
[not found] ` <CAGUVWovzT=7Gj2nj-RWC9g5_KWMzPPzAbFs9-xKWpFuh8iFTiw@mail.gmail.com>
2025-03-25 14:04 ` Alexander Larsson
2025-02-10 19:45 ` [PATCH 4/5] ovl: don't require metacopy=on for lower -> data redirect Miklos Szeredi
2025-02-11 12:08 ` Amir Goldstein
2025-02-10 19:45 ` [PATCH 5/5] ovl: don't require "metacopy=on" for "verity" Miklos Szeredi
2025-02-11 10:49 ` Amir Goldstein
2025-02-11 12:14 ` Miklos Szeredi
2025-02-11 12:24 ` Amir Goldstein
2025-02-11 10:01 ` [PATCH 1/5] ovl: don't allow datadir only 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=87a5ahdjrd.fsf@redhat.com \
--to=gscrivan@redhat.com \
--cc=amir73il@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--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).