public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: mtk.manpages@gmail.com, linux-man <linux-man@vger.kernel.org>,
	Linux Containers <containers@lists.linux-foundation.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: For review: pid_namespaces(7) man page
Date: Tue, 05 Mar 2013 19:58:37 -0600	[thread overview]
Message-ID: <1362535117.7276.6@driftwood> (raw)
In-Reply-To: <87k3pnhx2k.fsf@xmission.com> (from ebiederm@xmission.com on Mon Mar  4 11:52:19 2013)

On 03/04/2013 11:52:19 AM, Eric W. Biederman wrote:
> > How about this:
> >
> >        The  point  here is that unshare(2) and setns(2) change the  
> PID
> >        namespace for processes subsequently created by the caller,  
> but
> >        not  for the calling process, while clone(2) CLONE_VM  
> specifies
> >        the creation of a new thread in the same process.
> 
> Hmm.  How about this.
> 
>          The point here is that unshare(2) and setns(2) change the PID
>          namespace that will be used by in all subsequent calls to  
> clone
>          and fork by the caller, but not for the calling process, and
>          that all threads in a process must share the same PID
>          namespace.  Which makes a subsequent clone(2) CLONE_VM
>          specify the creation of a new thread in the a different PID
>          namespace but in the same process which is impossible.

CLONE_VM and CLONE_NEWPID are incompatible because all threads of the  
same process must be in the same PID namespace. Since unshare(2) and  
setns(2) change the PID namespace for subsequent calls to clone(2),  
those subsequent calls cannot create new threads (unless you setns(2)  
back to the original namespace first).

That last bit's a guess. :)

Rob

  parent reply	other threads:[~2013-03-06  1:58 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28 11:24 For review: pid_namespaces(7) man page Michael Kerrisk (man-pages)
2013-02-28 14:24 ` Vasily Kulikov
2013-03-01  8:03   ` Michael Kerrisk (man-pages)
2013-03-01  8:36     ` Eric W. Biederman
2013-03-01  8:53       ` Michael Kerrisk (man-pages)
2013-02-28 15:24 ` Eric W. Biederman
2013-03-01  8:50   ` Michael Kerrisk (man-pages)
2013-03-01  9:10     ` Eric W. Biederman
2013-03-01 10:20       ` Michael Kerrisk (man-pages)
2013-03-01  4:01 ` Rob Landley
2013-03-01  6:58   ` Eric W. Biederman
2013-03-01  9:57   ` Michael Kerrisk (man-pages)
2013-03-01 15:35     ` Eric W. Biederman
2013-03-04 12:46       ` Michael Kerrisk (man-pages)
2013-03-04 17:52         ` Eric W. Biederman
     [not found]           ` <CAKgNAkjYmvjMzC+nYqsjHf4bQn2ZwdE5wawoP2p32ZSo+0dfcQ@mail.gmail.com>
2013-03-05  6:23             ` Michael Kerrisk (man-pages)
2013-03-05  6:41             ` Eric W. Biederman
2013-03-05  8:37               ` Michael Kerrisk (man-pages)
2013-03-06  0:40                 ` Eric W. Biederman
2013-03-07  8:20                   ` Michael Kerrisk (man-pages)
2013-03-07  8:31                     ` Eric W. Biederman
2013-03-06  1:58           ` Rob Landley [this message]
2013-03-06  2:23             ` Eric W. Biederman
2013-03-04  3:50     ` Rob Landley
2013-03-04  4:03       ` Eric W. Biederman
2013-03-04 12:48         ` Michael Kerrisk (man-pages)
2013-03-04 19:27         ` Rob Landley
2013-03-05  7:01           ` Michael Kerrisk (man-pages)
2013-03-04 12:50       ` Michael Kerrisk (man-pages)
  -- strict thread matches above, loose matches on Subject: below --
2014-08-20 23:38 Michael Kerrisk (man-pages)

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=1362535117.7276.6@driftwood \
    --to=rob@landley.net \
    --cc=containers@lists.linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.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