[CRIU] [PATCH 2/2] restore: remount /proc after clone(CLONE_NEWPID)

Tycho Andersen tycho.andersen at canonical.com
Wed Aug 6 11:52:17 PDT 2014


Hi Andrew,

On Wed, Aug 06, 2014 at 10:44:12PM +0400, Andrew Vagin wrote:
> On Wed, Aug 06, 2014 at 01:34:07PM -0500, Tycho Andersen wrote:
> > Hi Andrew,
> > 
> > On Wed, Aug 06, 2014 at 10:25:10PM +0400, Andrew Vagin wrote:
> > > On Wed, Aug 06, 2014 at 01:06:29PM -0500, Tycho Andersen wrote:
> > > > We need to remount /proc after the clone because things like getpid() return
> > > > the pid in the new namespace, but /proc still has the old namespace's info in
> > > > it. This causes problems when e.g. there are some things in criu's private
> > > > mount namespace but not in (the original) init's namespace.
> > > 
> > > Could you show an example of problems?
> > 
> > Yes, if you:
> > 
> > 1. unshare(CLONE_NEWNS)
> > 2. mount() some directory to pass as --root
> > 3. exec(criu)
> 
> Could you show how criu fails in this case?

Yes,

> > 
> > criu fails with "(mount.c:1958): New root and old root are the same".

what other information would be useful?

Tycho


More information about the CRIU mailing list