[CRIU] Sync TODO-s for mount.c work

Tycho Andersen tycho.andersen at canonical.com
Thu Apr 23 08:09:01 PDT 2015


On Thu, Apr 23, 2015 at 06:04:35PM +0300, Pavel Emelyanov wrote:
> On 04/23/2015 05:31 PM, Tycho Andersen wrote:
> > On Thu, Apr 23, 2015 at 02:52:35PM +0300, Pavel Emelyanov wrote:
> >> On 04/23/2015 02:17 PM, Oleg Nesterov wrote:
> >>
> >>> Now what? Obviously we can't just add
> >>>
> >>> 	if (is_not_external_mount(m))
> >>> 		continue;
> >>
> >> Why not? The is_not_external_mount() is
> >>
> >> fsroot_mounted(m) || /* mount's root is visible from chroot */
> > 
> > But what if the mount's root is /? e.g with pstore in lxc, the
> > mountinfo from inside looks like:
> > 
> > 110 104 0:23 / /sys/fs/pstore rw,nosuid,nodev,noexec,relatime master:11 - pstore pstore rw
> > 
> > which is a bind mount from the host's:
> > 
> > 29 17 0:23 / /sys/fs/pstore rw,nosuid,nodev,noexec,relatime shared:11 - pstore pstore rw
> 
> Ah, so sharing takes place. OK, then (sorry, maybe I'm replaying your
> conversation again, but I'm still blind about it) the check should be
> 
>    (fsroot_mounted(m) || root_is_visible(m)) && master_is_external(m)

I think not, because if we didn't have this as a shared mount it would
still be an external bind mount, just without sharing. An external
master peer is an indication that it's a bind mount, but if we don't
have one of those, it could still be a bind mount.

Tycho

> ?
> 
> -- Pavel
> 


More information about the CRIU mailing list