From: Matt Helsley <matthltc@us.ibm.com>
To: Eric Paris <eparis@redhat.com>
Cc: Andreas Gruenbacher <agruen@suse.de>,
Christoph Hellwig <hch@infradead.org>,
Matt Helsley <matthltc@us.ibm.com>,
torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
viro@zeniv.linux.org.uk, akpm@linux-foundation.org,
Michael Kerrisk <michael.kerrisk@gmail.com>,
Serge Hallyn <serge@hallyn.com>,
Biederman Eric Biederman <ebiederm@xmission.com>,
Containers <containers@lists.linux-foundation.org>
Subject: Re: [GIT PULL] notification tree - try 37!
Date: Mon, 16 Aug 2010 21:03:53 -0700 [thread overview]
Message-ID: <20100817040353.GD3648@count0.beaverton.ibm.com> (raw)
In-Reply-To: <1282016387.21419.113.camel@acb20005.ipt.aol.com>
On Mon, Aug 16, 2010 at 11:39:47PM -0400, Eric Paris wrote:
> On Mon, 2010-08-16 at 22:32 +0200, Andreas Gruenbacher wrote:
> > On Saturday 07 August 2010 21:15:14 Eric Paris wrote:
> > > On Fri, 2010-08-06 at 20:06 -0400, Christoph Hellwig wrote:
> > > > I'm also totally missing on any re-post of these patches or discussion
> > > > of the changes during the last development window.
> > >
> > > I just searched lkml an fsdevel where I usually send everything don't
> > > see then. I totally failed.
> >
> > Oh yes.
> >
> > This introduces two new syscalls which will be impossible to fix up after the
> > fact, and those system calls are poorly documented: commits 2a3edf86 and
> > 52c923dd document the initial versions (in the commit message!), but
> > subsequent commits then extend that interface. The interface for replying to
> > events is not documented at all beyond the example code [1]. There is no
> > documentation in Documentation/filesystems/, either.
> >
> > [1] http://people.redhat.com/~eparis/fanotify/
>
> I'll work on documentation. Although it should be pointed out that the
> interface was sent to list many times with lots of discussion and
> feedback. The only patches that didn't make the list were the last
> couple which changed internal notification semantics (and fscked with
> fput() but that patch, which caused problems, was specifically pointed
> out in this thread and reverted).
>
> > Q: What happens when a process watching for FAN_OPEN_PERM or FAN_ACCESS_PERM
> > events exits or dies while events are in flight? I can't see anything in the
> > code that would wake sleeping processes up when the fsnotify_group of the
> > listener is torn down.
>
> We can get stuck. There was code which cleaned that up, but it got
> accidentally removed long ago when, upon review on list, I was told to
> remove all timeout code. It's easy enough to fix up. I'll post a patch
> this week.
>
> > Q: What prevents the system from going out of memory when a listener decides
> > to stop reading events or simply can't keep up? There doesn't seem to be a
> > limit on the queue depth. Listeners currently need CAP_SYS_ADMIN, but somehow
> > limiting the queue depth and throttling when things start to go bad still
> > sounds like a reasonable thing to do, right?)
>
> It's an interesting question and obviously one that I've thought about.
> You remember when we talked previously I said the hardest part left was
> allowing non-root users to use the interface. It gets especially
> difficult when thinking about perm-events. I was specifically told not
> to timeout or drop those. But when dealing with non-root users using
> perm events? As for pure notification we can do something like inotify
> does quite easily.
>
> I'm not certain exactly what the best semantics are for non trusted
> users, so I didn't push any patches that way. Suggestions welcome :)
Hi Eric,
Sorry I haven't had a chance to look at the perm events. I think
user namespace and containers folks might be interested in them for
non-root users though.
[Adding userns/containers folks to Cc]
I'm guessing non-trusted users can be restricted to only get perm events
on stuff they already own. Plus make perm events by non-trusted users
unreliable yet failsafe -- return EACESS/EPERM when we have to timeout or
drop the events if I understand the issues correctly. Those rules plus user
namespaces would still be quite useful I think. Do they seem reasonable to
implement? Am I forgetting anything important?
Cheers,
-Matt Helsley
next prev parent reply other threads:[~2010-08-17 4:04 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 15:58 Eric Paris
2010-08-06 23:34 ` Matt Helsley
2010-08-07 0:06 ` Christoph Hellwig
2010-08-07 19:15 ` Eric Paris
2010-08-07 20:55 ` Matt Helsley
2010-08-16 20:32 ` Andreas Gruenbacher
2010-08-17 3:39 ` Eric Paris
2010-08-17 4:03 ` Matt Helsley [this message]
2010-08-17 8:09 ` Andreas Gruenbacher
2010-08-17 15:08 ` Eric Paris
2010-08-19 20:24 ` Andreas Gruenbacher
2010-08-19 20:32 ` Andreas Gruenbacher
2010-08-19 20:42 ` Eric Paris
2010-08-19 21:07 ` Andreas Gruenbacher
2010-08-19 21:22 ` Andreas Gruenbacher
2010-08-20 3:50 ` Eric Paris
2010-08-20 12:38 ` Andreas Gruenbacher
2010-08-23 16:46 ` Eric Paris
2010-08-23 22:38 ` Andreas Gruenbacher
2010-08-20 0:00 ` Andreas Gruenbacher
2010-08-17 8:38 ` Andreas Gruenbacher
2010-08-17 15:24 ` Eric Paris
2010-08-17 15:48 ` Andreas Gruenbacher
2010-08-18 14:18 ` Andreas Gruenbacher
2010-08-17 9:45 ` Tvrtko Ursulin
2010-08-17 10:01 ` Andreas Gruenbacher
2010-08-17 10:12 ` Tvrtko Ursulin
2010-08-17 10:55 ` Tvrtko Ursulin
2010-08-17 15:27 ` Eric Paris
2010-08-18 15:47 ` [GIT PULL] notification tree: directory events Andreas Gruenbacher
2010-08-18 15:59 ` Eric Paris
2010-08-18 16:42 ` Christoph Hellwig
2010-08-18 17:07 ` Eric Paris
2010-08-19 12:44 ` Andreas Gruenbacher
2010-08-19 15:00 ` Eric Paris
2010-08-19 23:41 ` Andreas Gruenbacher
2010-08-20 3:38 ` Eric Paris
2010-08-20 5:19 ` Andreas Dilger
2010-08-20 9:21 ` Christoph Hellwig
2010-08-20 15:29 ` Andreas Gruenbacher
2010-08-20 20:39 ` Andreas Dilger
2010-08-20 9:09 ` Tvrtko Ursulin
2010-08-20 11:07 ` Andreas Gruenbacher
2010-08-20 11:25 ` Andreas Gruenbacher
2010-08-20 12:16 ` Andreas Gruenbacher
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=20100817040353.GD3648@count0.beaverton.ibm.com \
--to=matthltc@us.ibm.com \
--cc=agruen@suse.de \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=eparis@redhat.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.kerrisk@gmail.com \
--cc=serge@hallyn.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®