mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ram Pai <linuxram@us.ibm.com>
To: Dawid Ciezarkiewicz <dawid.ciezarkiewicz@rubrik.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: Read-only `slaves` with shared subtrees?
Date: Sun, 8 Oct 2017 19:15:46 -0500	[thread overview]
Message-ID: <20171009001546.GB5675@ram.oc3035372033.ibm.com> (raw)
In-Reply-To: <CAOEu9U5c3dWBPdAWb_TduoPv78fT0JLkZCjSYvpY37QHjkr1FA@mail.gmail.com>

On Fri, Sep 29, 2017 at 04:02:42PM -0700, Dawid Ciezarkiewicz wrote:
> On Fri, Sep 22, 2017 at 11:43 AM, Dawid Ciezarkiewicz
> <dawid.ciezarkiewicz@rubrik.com> wrote:
> > On Thu, Sep 21, 2017 at 12:14 PM, Ram Pai <linuxram@us.ibm.com> wrote:
> >> Here is a patch that accomplishes the job. tested to work with
> >> some simple use cases.  check if this works for you. If it does
> >> than we will have to think through all the edge cases and make it
> >> acceptable.
> >
> > From your experiments, it looks exactly right.
> >
> > I'll give it a try in the upcoming week. Thank you!
> 
> 
> I've reproduced your setup and results.
> 
> I've played with it for a while, mostly checking some recursive mount scenarios.
> My biggest concern is transitivity of the RO attribute. Once a root of
> slave directory
> is set to be RO + STICKY, it is very important that host directories
> propagated there,
> even recursively (rslave), or any other, are not RW. From what I was
> able to test, everything
> seemed OK, but I don't grok all the semantics around it, so I'm just
> pointing it out, as I might
> have missed something.

yes it will be RO. the patch takes care of that.

> 
> One thing that I don't plan to use, but might be worth thinking about is
>  `slave + RW + STICKY` combination.  If `master` mounts something RO,
> and `slave`
> is `RW + STICKY`, should the mount appear RW inside the slave? I don't
> find it particularly useful,
> but still...

As per the implemented semantics it will become "RW".  Should it be "RO"
aswell?  Will that open up security holes?

> 
> Another thing that popped into my head: Is it worth considering any
> dynamic changes to `slave`'s
> RO status? It complicates everything a lot (it seems to me), since it
> adds a retroactive
> dynamic propagation. I don't currently have any plans to use it, but I
> could imagine scenarios
> in which a slave mount with all it's sub-mounts is remounted from RO
> to RW, in response to
> some external authorization trigger.

The sematics should be something like this. Check if it makes sense.

a) anything mounted under stick-mount will be a sticky-mount and will
	inherit the mount's access-attribute;i.e RO RW attribute.
b) a mount when made sticky will propagate its sticky attribute
	as well as its access-attribute recursively to its children 
c) anything mounted under non-sticky mount will not inherit the
	mount's access-attribute and will be non-sticky aswell.
d) a mount when made non-sticky will just change itself to non-sticky.
	(will NOT propagate its non-sticky attribute and its
	access-attribue recursively to its children.)


Will this work?

> Regards,
> Dawid Ciezarkiewicz

-- 
Ram Pai

  reply	other threads:[~2017-10-09  0:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15 17:57 Dawid Ciezarkiewicz
2017-09-18 20:47 ` Ram Pai
2017-09-19 23:18   ` Dawid Ciezarkiewicz
2017-09-20 19:39     ` Ram Pai
2017-09-20 19:41       ` Ram Pai
2017-09-20 22:56         ` Eric W. Biederman
2017-09-20 23:06           ` Eric W. Biederman
2017-09-21  0:39             ` Ram Pai
2017-09-21  3:00               ` Dawid Ciezarkiewicz
2017-09-21 19:14                 ` Ram Pai
2017-09-22 18:43                   ` Dawid Ciezarkiewicz
2017-09-29 23:02                     ` Dawid Ciezarkiewicz
2017-10-09  0:15                       ` Ram Pai [this message]
2017-10-09 21:39                         ` Dawid Ciezarkiewicz
2017-10-19 18:13                           ` Ram Pai
2017-10-20  2:23                             ` Eric W. Biederman

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=20171009001546.GB5675@ram.oc3035372033.ibm.com \
    --to=linuxram@us.ibm.com \
    --cc=dawid.ciezarkiewicz@rubrik.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®