lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201008192224.12309.agruen@suse.de>
Date:	Thu, 19 Aug 2010 22:24:11 +0200
From:	Andreas Gruenbacher <agruen@...e.de>
To:	Eric Paris <eparis@...hat.com>
Cc:	Christoph Hellwig <hch@...radead.org>,
	Matt Helsley <matthltc@...ibm.com>,
	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	viro@...iv.linux.org.uk, akpm@...ux-foundation.org,
	Michael Kerrisk <michael.kerrisk@...il.com>
Subject: Re: [GIT PULL] notification tree - try 37!

On Tuesday 17 August 2010 17:08:26 Eric Paris wrote:
> On Tue, 2010-08-17 at 10:09 +0200, Andreas Gruenbacher wrote:
> > On Tuesday 17 August 2010 05:39:47 Eric Paris wrote:
> > > On Mon, 2010-08-16 at 22:32 +0200, Andreas Gruenbacher wrote:
> > > > 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.
> > 
> > This needs to be fixed then.  Not such a big deal, but it shows that the
> > tree wasn't ready for being merged yet and needs further review.
> 
> Code with bugs, shocking!  Two other bugs have been found and patches
> for those will be coming shortly.  I've begged for review how many
> times?  I don't care when review it comes, I'll address any issues as
> they come up.

Here is one more bug: when watching a directory with inotify, doing an ls 
gives me:

	Watching d
	d was opened
	d not opened for writing was closed

Watching the same directory with fanotify results in:

	.../d: pid=... open_perm
	.../d: pid=... open
	.../d: pid=... access_perm
	.../d: pid=... access_perm
	.../d: pid=... close

Five events seem a bit excessive; I can't explain why so many are generated.  
The real issue is when watching the same directory both with inotify and 
fanotify, though: the fanotify result stays the same, but 

	Watching d
	d has not changed
	d was opened
	d has not changed
	d has not changed
	d not opened for writing was closed

In other words, watching a directory with fanotify causes extra inotify events 
with mask == 0.

Andreas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ