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:	Tue, 14 Jul 2015 11:40:40 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Florian Westphal <fw@...len.de>
Cc:	Thomas Graf <tgraf@...g.ch>, Cong Wang <cwang@...pensource.com>,
	"Kirill A. Shutemov" <kirill@...temov.name>,
	"David S. Miller" <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: mmap()ed AF_NETLINK: lockdep and sleep-in-atomic warnings

On Tue, 14 Jul 2015 11:50:37 +0200
Florian Westphal <fw@...len.de> wrote:

> Thomas Graf <tgraf@...g.ch> wrote:
> > On 07/13/15 at 10:11pm, Cong Wang wrote:
> > > Caused by:
> > > 
> > > commit 21e4902aea80ef35afc00ee8d2abdea4f519b7f7
> > > Author: Thomas Graf <tgraf@...g.ch>
> > > Date:   Fri Jan 2 23:00:22 2015 +0100
> > > 
> > >     netlink: Lockless lookup with RCU grace period in socket release
> > > 
> > >     Defers the release of the socket reference using call_rcu() to
> > >     allow using an RCU read-side protected call to rhashtable_lookup()
> > > 
> > >     This restores behaviour and performance gains as previously
> > >     introduced by e341694 ("netlink: Convert netlink_lookup() to use
> > >     RCU protected hash table") without the side effect of severely
> > >     delayed socket destruction.
> > > 
> > >     Signed-off-by: Thomas Graf <tgraf@...g.ch>
> > >     Signed-off-by: David S. Miller <davem@...emloft.net>
> > > 
> > > 
> > > We can't hold mutex lock in a rcu callback, perhaps we could
> > > defer the mmap ring cleanup to a workqueue.
> > 
> > The socket should be dead at this point. It might be simpler to
> > add a netlink_release_ring() function which doesn't require
> > locking at all. It would also get rid of all the special handling
> > for closing vs. non-closing.
> 
> Do you know of any users of mmap'd netlink?
> Support for this was never added to libmnl; given the fact that netlink
> mmap doesn't have any advantages vs. socket interface i'd just revert it
> (or mark CONFIG_NETLINK_MMAP broken -- although I don't see
>  how the unconditional copy on tx could ever be avoided).

We use netlink mmap because it gives slightly better performance
when processing a route flap.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ