[CRIU] [RFC] FSTYPE__UNSUPPORTED/AUTO && non-virtual filesystems

Oleg Nesterov oleg at redhat.com
Tue Mar 31 04:44:35 PDT 2015


On 03/30, Christopher Covington wrote:
>
> On 03/30/2015 01:41 PM, Oleg Nesterov wrote:
> >
> > Heh ;) my process tree is the single
> >
> > 	perl -e 'close STDIN; close STDOUT; close STDERR; sleep'
> >
> > process ;) But it runs in another (non root) mnt namespace. And I am trying
> > to dump/restore it from the root namespace.
>
> I need to learn more about how user namespaces constrain things (I couldn't
> get unshare -U to work on the first try), but using just a mount namespace and
> running as root the whole time I'm able to make a mount disappear with the
> following:
>
> $ m="mount | grep -c boot"
> $ eval $m; unshare -m -- sh -c "umount boot; $m"; eval $m
> 1
> 0
> 1

Of course. But you can not make it disappear in the mount namespace of the
running process this way. You need setns(), not unshare().

And again, in general we do not want (or even can) unmount a mountpoint
in the foreign namespace, other processes can need it even if the dumped
process doesn't.

But thank you very much, I didn't know that binutils already have
/usr/bin/unshare ;) I had to write the trivial clone() caller for testing.

Oleg.



More information about the CRIU mailing list