From: Ian Kent <raven@themaw.net>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
autofs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, sukadev@linux.vnet.ibm.com,
serge.hallyn@canonical.com
Subject: Re: [PATCH 1/2] autofs4: allow autofs to work outside the initial PID namespace
Date: Mon, 26 Nov 2012 10:29:28 +0800 [thread overview]
Message-ID: <1353896968.2323.7.camel@perseus.themaw.net> (raw)
In-Reply-To: <1353885956.2323.4.camel@perseus.themaw.net>
On Mon, 2012-11-26 at 07:25 +0800, Ian Kent wrote:
> On Sat, 2012-11-24 at 14:35 -0800, Eric W. Biederman wrote:
> > Miklos Szeredi <miklos@szeredi.hu> writes:
> >
> > > On Sat, Nov 24, 2012 at 1:07 PM, Eric W. Biederman
> > > <ebiederm@xmission.com> wrote:
> > >> Ian Kent <raven@themaw.net> writes:
> > >>
> > >>> On Sat, 2012-11-24 at 10:23 +0800, Ian Kent wrote:
> > >>>> On Fri, 2012-11-23 at 15:30 +0100, Miklos Szeredi wrote:
> > >
> > >>>> AFAICS autofs mounts mounted with MS_PRIVATE in the initial namespace do
> > >>>> propagate to the clone when it's created so I'm assuming subsequent
> > >>>> mounts would also. If these mounts are busy in some way they can't be
> > >>>> umounted in the clone unless "/" is marked private before attempting the
> > >>>> umount.
> >
> > Subsequent mounts after the clone do not have a mechanism to propogate
> > with MS_PRIVATE. As creating a new mount namespaces is essentially
> > an instance of mount --bind. Those semantics are a little unintuitive
> > I have to admit.
> >
> > >>> This may sound stupid but if there something like, say, MS_NOPROPAGATE
> > >>> then the problem I see would pretty much just go away. No more need to
> > >>> umount existing mounts and container instances would be isolated. But, I
> > >>> guess, I'm not considering the possibility of cloned of processes as
> > >>> well .... if that makes sense, ;)
> > >>
> > >> Something is very weird is going on. MS_PRIVATE should be the
> > >> MS_NOPROPOGATE you are looking for. There is also MS_UNBINDABLE.
> > >> which is a stronger form of MS_PRIVATE and probably worth play with.
> > >>
> > >
> > > MS_UNBINDABLE says: skip this mount when copying a mount tree, such
> > > as when the mount namespace is cloned.
> > >
> > > If you set MS_UNBINDABLE on autofs mounts then they will simply not
> > > appear in a cloned namespace. Which sounds like a good idea, no?
> >
> > Good point. If the desire is for a mount to be managed by autofs
> > setting MS_UNBINDABLE seems required.
>
> Arrgh, I know that's something I should have looked into long ago.
> The fact is that autofs mounts are directly related to a specific path
> defined by automount maps that are associated with the daemon so bind
> mounting them elsewhere makes no sense.
Except, AFAICS, they do appear in the clone.
>
> Is it necessary (or sensible) to use MS_PRIVATE with MS_UNBINDABLE?
and specifying MS_PRIVATE as well gives an EINVAL return.
>
> >
> > Eric
> >
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe autofs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-11-26 2:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 16:24 Miklos Szeredi
2012-11-22 16:26 ` [PATCH 2/2] autofs4: translate pids to the right namespace for the daemon Miklos Szeredi
2012-11-23 3:45 ` [PATCH 1/2] autofs4: allow autofs to work outside the initial PID namespace Ian Kent
2012-11-23 12:09 ` Ian Kent
2012-11-23 14:30 ` Miklos Szeredi
2012-11-24 2:23 ` Ian Kent
2012-11-24 2:37 ` Ian Kent
2012-11-24 12:07 ` Eric W. Biederman
2012-11-24 21:12 ` Miklos Szeredi
2012-11-24 22:35 ` Eric W. Biederman
2012-11-25 23:25 ` Ian Kent
2012-11-26 2:29 ` Ian Kent [this message]
2012-11-26 8:05 ` Miklos Szeredi
2012-11-26 14:38 ` Eric W. Biederman
2012-11-26 16:11 ` Miklos Szeredi
[not found] <20131115222222.6F70A1CA1A1@corp2gmr1-1.eem.corp.google.com>
2013-11-16 16:03 ` [patch " Oleg Nesterov
2013-11-18 3:04 ` Ian Kent
2013-11-18 18:22 ` Oleg Nesterov
-- strict thread matches above, loose matches on Subject: below --
2013-05-07 13:54 [PATCH " Miklos Szeredi
2013-05-07 18:14 ` Serge E. Hallyn
2012-11-13 11:48 Miklos Szeredi
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=1353896968.2323.7.camel@perseus.themaw.net \
--to=raven@themaw.net \
--cc=autofs@vger.kernel.org \
--cc=ebiederm@xmission.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=serge.hallyn@canonical.com \
--cc=sukadev@linux.vnet.ibm.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
all inboxes | Powered by JetHome®