public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Harald Dunkel <harri@afaics.de>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: /proc/self/mounts in chroot vs lxc
Date: Sun, 05 Feb 2012 14:33:44 +0400	[thread overview]
Message-ID: <4F2E5B08.4010200@msgid.tls.msk.ru> (raw)
In-Reply-To: <4F2E4120.3030506@afaics.de>

On 05.02.2012 12:43, Harald Dunkel wrote:
> Hi folks,
> 
> AFAIK /proc/mounts (-> self/mounts) is supposed to replace
> /etc/mtab. Problem is: In a chroot it contains too much
> (invalid) information about the parent's mount points. It is
> very hard to figure out which lines are correct.
> 
> For lxc there seems to be no such problem, so I wonder if it
> would be possible to extend this scheme to chroot?
> 
> I am not sure if this is a kernel or libc issue. Any helpful
> comment would be highly appreciated.

/proc is _always_ kernel thing.

For lxc, it creates a separate namespace where all "extra" mounts
are unmounted.  So /proc/mounts does not contain unnecessary
entries.

But plain chroot does not create new namespace, the process inherits
parent namespace, so there is no way to clean in up cleanly.

This is how it always worked, I'd say it is too late to change
this, and changing it isn't really trivial due to various
implications bind mounts are giving us.

I think anway.

/mjt.

  reply	other threads:[~2012-02-05 10:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-05  8:43 /proc/self/mounts in chroot vs lxc Harald Dunkel
2012-02-05 10:33 ` Michael Tokarev [this message]
2012-02-06  6:33   ` Harald Dunkel

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=4F2E5B08.4010200@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=harri@afaics.de \
    --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