[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200812225632.GA19759@paulmck-ThinkPad-P72>
Date: Wed, 12 Aug 2020 15:56:32 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: rcu@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, kernel-team@...com, mingo@...nel.org,
jiangshanlai@...il.com, dipankar@...ibm.com,
akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
josh@...htriplett.org, tglx@...utronix.de, peterz@...radead.org,
rostedt@...dmis.org, dhowells@...hat.com, edumazet@...gle.com,
fweisbec@...il.com, oleg@...hat.com, joel@...lfernandes.org,
elver@...gle.com, dvyukov@...gle.com, jannh@...gle.com
Subject: [PATCH tip/core/rcu 0/12] Add strict short-grace-period Kconfig
option
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(-)
Powered by blists - more mailing lists