rcu.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH tip/core/rcu 0/12] Add strict short-grace-period Kconfig option
@ 2020-08-12 22:56 Paul E. McKenney
  2020-08-12 22:57 ` [PATCH tip/core/rcu 01/12] rcu: Add Kconfig option for strict RCU grace periods paulmck
                   ` (11 more replies)
  0 siblings, 12 replies; 15+ messages in thread
From: Paul E. McKenney @ 2020-08-12 22:56 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, dipankar, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, elver, dvyukov, jannh

Hello!

This series adds a CONFIG_RCU_STRICT_GRACE_PERIOD Kconfig option that
causes RCU to strive for short grace periods even at great expense in
terms of performance, scalability, and real-time response.  This option is
therefore not for production use, but rather to allow tools such as KASAN
to more readily detect pointer leaks from RCU read-side critical sections.
Here is an example of such a pointer leak:

	rcu_read_lock();
	p = rcu_dereference(gp);
	do_something(p);
	rcu_read_unlock(); // *p might be freed immediately!
	do_something_else(p); // Potential use after free BUG!!!

This series also adds a rcutree.rcu_unlock_delay kernel boot parameter
that delays the specified number of microseconds after the outermost
rcu_read_unlock() in an attempt to further bend the odds in KASAN's favor.

The patches in this series are as follows:

1.	Add Kconfig option for strict RCU grace periods.

2.	Reduce leaf fanout for strict RCU grace periods.

3.	Restrict default jiffies_till_first_fqs for strict RCU GPs.

4.	Force DEFAULT_RCU_BLIMIT to 1000 for strict RCU GPs.

5.	Always set .need_qs from __rcu_read_lock() for strict GPs.

6.	Do full report for .need_qs for strict GPs.

7.	Attempt QS when CPU discovers GP for strict GPs.

8.	IPI all CPUs at GP start for strict GPs.

9.	IPI all CPUs at GP end for strict GPs.

10.	Provide optional RCU-reader exit delay for strict GPs.

11.	Execute RCU reader shortly after rcu_core for strict GPs.

12.	Report QS for outermost PREEMPT=n rcu_read_unlock() for strict GPs.

							Thanx, Paul

------------------------------------------------------------------------

 Documentation/admin-guide/kernel-parameters.txt |    9 +++
 include/linux/rcupdate.h                        |    7 ++
 kernel/rcu/Kconfig                              |    8 +-
 kernel/rcu/Kconfig.debug                        |   15 +++++
 kernel/rcu/tree.c                               |   65 +++++++++++++++++++++---
 kernel/rcu/tree.h                               |    1 
 kernel/rcu/tree_plugin.h                        |   47 +++++++++++++----
 7 files changed, 132 insertions(+), 20 deletions(-)

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-08-13  3:29 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12 22:56 [PATCH tip/core/rcu 0/12] Add strict short-grace-period Kconfig option Paul E. McKenney
2020-08-12 22:57 ` [PATCH tip/core/rcu 01/12] rcu: Add Kconfig option for strict RCU grace periods paulmck
2020-08-12 22:57 ` [PATCH tip/core/rcu 02/12] rcu: Reduce leaf fanout " paulmck
2020-08-12 22:57 ` [PATCH tip/core/rcu 03/12] rcu: Restrict default jiffies_till_first_fqs for strict RCU GPs paulmck
2020-08-12 22:57 ` [PATCH tip/core/rcu 04/12] rcu: Force DEFAULT_RCU_BLIMIT to 1000 " paulmck
2020-08-12 22:57 ` [PATCH tip/core/rcu 05/12] rcu: Always set .need_qs from __rcu_read_lock() for strict GPs paulmck
2020-08-12 22:57 ` [PATCH tip/core/rcu 06/12] rcu: Do full report for .need_qs " paulmck
2020-08-13  0:50   ` Jann Horn
2020-08-13  3:29     ` Paul E. McKenney
2020-08-12 22:57 ` [PATCH tip/core/rcu 07/12] rcu: Attempt QS when CPU discovers GP " paulmck
2020-08-12 22:57 ` [PATCH tip/core/rcu 08/12] rcu: IPI all CPUs at GP start " paulmck
2020-08-12 22:57 ` [PATCH tip/core/rcu 09/12] rcu: IPI all CPUs at GP end " paulmck
2020-08-12 22:57 ` [PATCH tip/core/rcu 10/12] rcu: Provide optional RCU-reader exit delay " paulmck
2020-08-12 22:57 ` [PATCH tip/core/rcu 11/12] rcu: Execute RCU reader shortly after rcu_core " paulmck
2020-08-12 22:57 ` [PATCH tip/core/rcu 12/12] rcu: Report QS for outermost PREEMPT=n rcu_read_unlock() " paulmck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).