public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc@us.ibm.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Matt Helsley <matthltc@us.ibm.com>,
	Roland McGrath <roland@redhat.com>,
	Oleg Nesterov <oleg@redhat.com>,
	Grzegorz Nosek <root@localdomain.pl>,
	Sukadev Bhattiprolu <sukadev@us.ibm.com>,
	containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: Testing lxc 0.6.5 in Fedora 13
Date: Tue, 6 Apr 2010 08:29:36 -0700	[thread overview]
Message-ID: <20100406152936.GD3345@count0.beaverton.ibm.com> (raw)
In-Reply-To: <m1vdc48vhy.fsf@fess.ebiederm.org>

On Tue, Apr 06, 2010 at 08:13:13AM -0700, Eric W. Biederman wrote:
> Matt Helsley <matthltc@us.ibm.com> writes:
> 
> > On Mon, Apr 05, 2010 at 08:44:43PM -0700, Roland McGrath wrote:

<snip>

> >> None of this has much of anything to do with strace, of course.  As I've
> >> said, I don't see anything other than the PTRACE_GETEVENTMSG value for
> >> PTRACE_EVENT_{CLONE,FORK,VFORK} reports that is wrong in the kernel.  As
> >> Oleg said, strace doesn't use that at all.  (This is not the place to
> >> discuss the details of strace further.)
> >
> > Also, looking at proposed changes (utrace and Eric Biederman's setns())
> > storing a pid nr rather than a reference to a task struct or struct pid
> > probably won't be correct.
> 
> My setns work has demonstrated that even for entering a namespace we
> never ever need to change the struct pid of a task.  setns has no other
> bearing on this problem then to say there is no foreseeable reason to
> change the rules.
> 
> > In the case of Eric Biederman's setns(), if capable of changing pid namespace,
> > we could have:
> >
> > 	Traced				Tracer
> > 	fork()
> > 					... (an arbitrary amount of time passes)
> > 					setns()
> > 					ptrace(GETEVENTMSG)
> 
> Forget that.  The pid namespace was architected so that we can ptrace a process
> in another pid namespace.
> 
> > At which point returning a static pid number held in the message field
> > produces the wrong pid.
> 
> No.  A processes always sees pids from the context of it's original pid
> namespace.  All setns does is affect which pid namespace children will
> be native in.

OK, good. So we can resolve the tasks/struct pids within the tracehook
and be done with it. Thanks Eric!

Cheers,
	-Matt Helsley

      reply	other threads:[~2010-04-06 15:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100321195044.GA23757@megiteam.pl>
2010-03-23 21:28 ` Testing lxc 0.6.5 in Fedora 13 Matt Helsley
2010-03-24  9:25   ` Greg Kurz
2010-03-25 21:33   ` Grzegorz Nosek
2010-03-26 11:11     ` Oleg Nesterov
2010-03-26 11:32       ` Grzegorz Nosek
2010-03-26 12:00         ` Oleg Nesterov
2010-03-26 12:46           ` Matt Helsley
2010-03-26 13:34             ` Oleg Nesterov
2010-03-26 11:53       ` Matt Helsley
2010-03-26 12:45         ` Grzegorz Nosek
2010-03-26 12:54           ` Matt Helsley
2010-03-26 13:56             ` Oleg Nesterov
2010-03-26 13:47           ` Oleg Nesterov
2010-04-06  3:44             ` Roland McGrath
2010-04-06 13:53               ` Matt Helsley
2010-04-06 14:36                 ` Oleg Nesterov
2010-04-06 15:17                   ` Eric W. Biederman
2010-04-06 15:13                 ` Eric W. Biederman
2010-04-06 15:29                   ` Matt Helsley [this message]

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=20100406152936.GD3345@count0.beaverton.ibm.com \
    --to=matthltc@us.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=roland@redhat.com \
    --cc=root@localdomain.pl \
    --cc=sukadev@us.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