All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Dave Hansen <dave@sr71.net>
Cc: dave.hansen@linux.intel.com, avagin@gmail.com,
	akpm@linux-foundation.org, xemul@parallels.com,
	eparis@redhat.com, john@johnmccutchan.com, rlove@rlove.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] inotify: hide internal kernel bits from fdinfo
Date: Mon, 21 Sep 2015 22:28:49 +0300	[thread overview]
Message-ID: <20150921192849.GC3181@uranus> (raw)
In-Reply-To: <20150921184501.E0313E5A@viggo.jf.intel.com>

On Mon, Sep 21, 2015 at 11:45:01AM -0700, Dave Hansen wrote:
> 
> From: Dave Hansen <dave.hansen@linux.intel.com>
> 
> There was a report that my patch:
> 
> 	inotify: actually check for invalid bits in sys_inotify_add_watch()
> 
> broke CRIU.
> 
> The reason is that CRIU looks up raw flags in /proc/$pid/fdinfo/*
> to figure out how to rebuild inotify watches and then passes those
> flags directly back in to the inotify API.  One of those flags
> (FS_EVENT_ON_CHILD) is set in mark->mask, but is not part of the
> inotify API.  It is used inside the kernel to _implement_ inotify
> but it is not and has never been part of the API.
> 
> My patch above ensured that we only allow bits which are part of
> the API (IN_ALL_EVENTS).  This broke CRIU.
> 
> FS_EVENT_ON_CHILD is really internal to the kernel.  It is set
> _anyway_ on all inotify marks.  So, CRIU was really just trying
> to set a bit that was already set.
> 
> This patch hides that bit from fdinfo.  CRIU will not see the
> bit, not try to set it, and should work as before.  We should not
> have been exposing this bit in the first place, so this is a good
> patch independent of the CRIU problem.
> 
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Reported-by: Andrey Wagin <avagin@gmail.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>

Thank you!

  parent reply	other threads:[~2015-09-21 19:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 18:45 [PATCH] inotify: hide internal kernel bits from fdinfo Dave Hansen
2015-09-21 19:26 ` Eric Paris
2015-09-21 19:28 ` Cyrill Gorcunov [this message]
2015-09-21 19:56 ` Andrey Wagin

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=20150921192849.GC3181@uranus \
    --to=gorcunov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dave@sr71.net \
    --cc=eparis@redhat.com \
    --cc=john@johnmccutchan.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rlove@rlove.org \
    --cc=xemul@parallels.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.