From: Ram Pai <linuxram@us.ibm.com>
To: Dawid Ciezarkiewicz <dawid.ciezarkiewicz@rubrik.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Read-only `slaves` with shared subtrees?
Date: Mon, 18 Sep 2017 13:47:10 -0700 [thread overview]
Message-ID: <20170918204710.GI5698@ram.oc3035372033.ibm.com> (raw)
In-Reply-To: <CAOEu9U6WWH+ekbRTQOi=BfvtV+DiPXTKf3+aKbQ7Rz04VKZr-g@mail.gmail.com>
On Fri, Sep 15, 2017 at 10:57:30AM -0700, Dawid Ciezarkiewicz wrote:
> Hi,
>
> (Please keep me in CC me when responding.)
>
> I have an use-case for shared subtrees that is not covered by:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.kernel.org_doc_Documentation_filesystems_sharedsubtree.txt&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=m-UrKChQVkZtnPpjbF6YY99NbT8FBByQ-E-ygV8luxw&m=l46zr30OWtcm54Kc2X1KfLkB11GtFf2YLA0WcpI6Tuo&s=L-i2sXNn5dHjJfzl_lCW-JvlZnGf8NdOB7ZktFGTUdY&e=
>
> and I wasn't able to figure out any working solution - it might not be possible
> ATM.
>
> Long story short:
> I'd like the `slave` mount (service in a container) to mount propagated events
> as RO, no matter how did `master` (host) mount them. Host might need that data
> RW, but slave must have it RO only.
>
> I'm using Linux containers to isolate processes. I need the container
> to follow part of the host system mount tree, but not have a write-access to it
> (for security reasons). It's a trivial setup as long
> as everything is static, but as soon as a part of what the container needs
> to access is mounted/unmounted at runtime (and thus shared subtrees
> are involved),
> there seems to be no way to control the flags of the propagated mount events.
It is possible to make a slave mount readonly, by remounting it with
'ro' flags.
something like
mount -o bind,remount,ro <slave-mount-dir>
Any mount-propagation events reaching a read-only-slave does
inherit the slave attribute. However it does not inherit the
read-only attribute.
Should it inherit? or should it not? -- that has not been thought
off AFAICT. it think we should let it inherit.
RP
next prev parent reply other threads:[~2017-09-18 20:47 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 [this message]
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
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=20170918204710.GI5698@ram.oc3035372033.ibm.com \
--to=linuxram@us.ibm.com \
--cc=dawid.ciezarkiewicz@rubrik.com \
--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®