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] [day] [month] [year] [list]
Date:	Thu, 15 Sep 2011 11:15:56 -0400
From:	Jason Baron <jbaron@...hat.com>
To:	Andrew Morton <akpm@...gle.com>
Cc:	Josh Boyer <jwboyer@...hat.com>,
	Nelson Elhage <nelhage@...hage.com>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Davide Libenzi <davidel@...ilserver.org>,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	Paul Bolle <pebolle@...cali.nl>, stable@...nel.org
Subject: Re: [PATCH] epoll: Fix spurious lockdep warnings

On Tue, Sep 13, 2011 at 02:16:03PM -0700, Andrew Morton wrote:
> On Tue, 13 Sep 2011 16:22:48 -0400
> Jason Baron <jbaron@...hat.com> wrote:
> 
> > On Wed, Sep 07, 2011 at 08:04:29PM -0400, Josh Boyer wrote:
> > > On Tue, Aug 09, 2011 at 02:11:55PM -0400, Nelson Elhage wrote:
> > > > epoll can acquire recursively acquire ep->mtx on multiple "struct
> > > > eventpoll"s at once in the case where one epoll fd is monitoring
> > > > another epoll fd. This is perfectly OK, since we're careful about the
> > > > lock ordering, but it causes spurious lockdep warnings. Annotate the
> > > > recursion using mutex_lock_nested, and add a comment explaining the
> > > > nesting rules for good measure.
> > > > 
> > > > Recent versions of systemd are triggering this, and it can also be
> > > > demonstrated with the following trivial test program:
> > > > 
> > > > --------------------8<--------------------
> > > > 
> > > > int main(void) {
> > > >    int e1, e2;
> > > >    struct epoll_event evt = {
> > > >        .events = EPOLLIN
> > > >    };
> > > > 
> > > >    e1 = epoll_create1(0);
> > > >    e2 = epoll_create1(0);
> > > >    epoll_ctl(e1, EPOLL_CTL_ADD, e2, &evt);
> > > >    return 0;
> > > > }
> > > > --------------------8<--------------------
> > > > 
> > > > Cc: stable@...nel.org
> > > > Reported-by: Paul Bolle <pebolle@...cali.nl>
> > > > Tested-by: Paul Bolle <pebolle@...cali.nl>
> > > > Signed-off-by: Nelson Elhage <nelhage@...hage.com>
> > > 
> > > Any progress on this heading upstream?
> > > 
> > 
> > Patch looks good to me, feel free to add:
> > 
> > Acked-by: Jason Baron <jbaron@...hat.com>
> > 
> > However, I am going to have to re-base the epoll path I recently posted:
> > https://lkml.org/lkml/2011/9/2/295, if this goes in first. Perhaps,
> > Andrew (added to the 'cc), can help us sort out the ordering...
> 
> I have already fixed up epoll-limit-paths.patch.  You're planning on
> sending a new version of that patch.  Please do base that on
> epoll-fix-spurious-lockdep-warnings.patch.

Ok, where can I get at these patches? With:
http://userweb.kernel.org/~akpm/mmotm/, still down.

Thanks,

-Jason
--
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