[CRIU] [PATCH] fsmptify: Filter out internal inotify bits when restoring marks

Cyrill Gorcunov gorcunov at gmail.com
Tue Sep 22 05:19:58 PDT 2015


On Tue, Sep 22, 2015 at 02:27:46PM +0300, Andrew Vagin wrote:
> >  
> > +	/*
> > +	 * The kernel prior 4.3 might export internal event
> > +	 * mask bits which are not part of user-space API. It
> > +	 * is fixed in kernel but we have to keep backward
> > +	 * compatibility with old images. So mask out
> > +	 * inappropriate bits (in particular fdinfo might
> > +	 * have FS_EVENT_ON_CHILD bit set).
> > +	 */
> > +	mark->iwe->mask &= IN_ALL_EVENTS;
> 
> I think we need only exclude FS_EVENT_ON_CHILD. Otherwise we will skip a
> new flags, when they will add into the kernel.

New flags are gonna be defined in uapi/ as well so criu is depending on which
system it's built and where it is running, in turn FS_EVENT_ON_CHILD
is really internal one and kernel has all rights to redefine it in
any way it prefer, we simply can't hardcode it in criu code.

It might be worth though to add some pr_info to notify a user that
some particular bit has been removed from the mask, just for info.


More information about the CRIU mailing list