Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190711235239.GA221389@google.com>
Date: Thu, 11 Jul 2019 19:52:39 -0400
From: Joel Fernandes <joel@...lfernandes.org>
To: linux-kernel@...r.kernel.org
Cc: Alexey Kuznetsov <kuznet@....inr.ac.ru>,
	Bjorn Helgaas <bhelgaas@...gle.com>, Borislav Petkov <bp@...en8.de>,
	c0d1n61at3@...il.com, "David S. Miller" <davem@...emloft.net>,
	edumazet@...gle.com,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
	Josh Triplett <josh@...htriplett.org>, keescook@...omium.org,
	kernel-hardening@...ts.openwall.com,
	Lai Jiangshan <jiangshanlai@...il.com>, Len Brown <lenb@...nel.org>,
	linux-acpi@...r.kernel.org, linux-pci@...r.kernel.org,
	linux-pm@...r.kernel.org,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, neilb@...e.com,
	netdev@...r.kernel.org, oleg@...hat.com,
	"Paul E. McKenney" <paulmck@...ux.ibm.com>,
	Pavel Machek <pavel@....cz>, peterz@...radead.org,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Rasmus Villemoes <rasmus.villemoes@...vas.dk>, rcu@...r.kernel.org,
	Steven Rostedt <rostedt@...dmis.org>, Tejun Heo <tj@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>, will@...nel.org,
	"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>
Subject: Re: [PATCH v1 0/6] Harden list_for_each_entry_rcu() and family

On Thu, Jul 11, 2019 at 07:43:55PM -0400, Joel Fernandes (Google) wrote:
> Hi,
> This series aims to provide lockdep checking to RCU list macros.
> 
> RCU has a number of primitives for "consumption" of an RCU protected pointer.
> Most of the time, these consumers make sure that such accesses are under a RCU
> reader-section (such as rcu_dereference{,sched,bh} or under a lock, such as
> with rcu_dereference_protected()).
> 
> However, there are other ways to consume RCU pointers, such as by
> list_for_each_entry_rcu or hlist_for_each_enry_rcu. Unlike the rcu_dereference
> family, these consumers do no lockdep checking at all. And with the growing
> number of RCU list uses (1000+), it is possible for bugs to creep in and go
> unnoticed which lockdep checks can catch.

I forgot to add in my cover letter, I have kept this option default-disabled
under a new config: CONFIG_PROVE_RCU_LIST. This is so that until all users
are converted to pass the optional argument, we should keep the check
disabled. There are about a 1000 or so users and it is not possible to pass
in the optional lockdep expression in a single series since it is done on a
case-by-case basis. I did convert a few users in this series itself.

Also, I plans to update the RCU documentation as well which I will do, but do
review this series and thank you!

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.