From: paulmck@kernel.org
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
"Paul E. McKenney" <paulmck@kernel.org>
Subject: [PATCH tip/core/rcu 10/10] doc: Tasks RCU must protect instructions before trampoline
Date: Mon, 22 Jun 2020 17:09:47 -0700 [thread overview]
Message-ID: <20200623000947.25222-10-paulmck@kernel.org> (raw)
In-Reply-To: <20200623000923.GA25047@paulmck-ThinkPad-P72>
From: "Paul E. McKenney" <paulmck@kernel.org>
Protecting the code in a trampoline can also require protecting a
number of instructions prior to actually entering the trampoline.
For example, these earlier instructions might be computing the address
of the trampoline. This commit therefore updates RCU's requirements to
record this for posterity.
Link: https://lore.kernel.org/lkml/20200511154824.09a18c46@gandalf.local.home/
Reported-by: Lai Jiangshan <jiangshanlai@gmail.com>
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
Documentation/RCU/Design/Requirements/Requirements.rst | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Documentation/RCU/Design/Requirements/Requirements.rst b/Documentation/RCU/Design/Requirements/Requirements.rst
index 75b8ca0..a69b5c4 100644
--- a/Documentation/RCU/Design/Requirements/Requirements.rst
+++ b/Documentation/RCU/Design/Requirements/Requirements.rst
@@ -2583,7 +2583,12 @@ not work to have these markers in the trampoline itself, because there
would need to be instructions following ``rcu_read_unlock()``. Although
``synchronize_rcu()`` would guarantee that execution reached the
``rcu_read_unlock()``, it would not be able to guarantee that execution
-had completely left the trampoline.
+had completely left the trampoline. Worse yet, in some situations
+the trampoline's protection must extend a few instructions *prior* to
+execution reaching the trampoline. For example, these few instructions
+might calculate the address of the trampoline, so that entering the
+trampoline would be pre-ordained a surprisingly long time before execution
+actually reached the trampoline itself.
The solution, in the form of `Tasks
RCU <https://lwn.net/Articles/607117/>`__, is to have implicit read-side
--
2.9.5
prev parent reply other threads:[~2020-06-23 0:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 0:09 [PATCH tip/core/rcu 0/10] Documentation updates for v5.9 Paul E. McKenney
2020-06-23 0:09 ` [PATCH tip/core/rcu 01/10] docs: RCU: Convert checklist.txt to ReST paulmck
2020-06-23 0:09 ` [PATCH tip/core/rcu 02/10] docs: RCU: Convert lockdep-splat.txt " paulmck
2020-06-23 0:09 ` [PATCH tip/core/rcu 03/10] docs: RCU: Convert lockdep.txt " paulmck
2020-06-23 0:09 ` [PATCH tip/core/rcu 04/10] docs: RCU: Convert rculist_nulls.txt " paulmck
2020-06-23 0:09 ` [PATCH tip/core/rcu 05/10] docs: RCU: Convert torture.txt " paulmck
2020-06-23 0:09 ` [PATCH tip/core/rcu 06/10] docs: RCU: Convert rcuref.txt " paulmck
2020-06-23 0:09 ` [PATCH tip/core/rcu 07/10] docs: RCU: Convert stallwarn.txt " paulmck
2020-06-23 0:09 ` [PATCH tip/core/rcu 08/10] docs: RCU: Don't duplicate chapter names in rculist_nulls.rst paulmck
2020-06-23 0:09 ` [PATCH tip/core/rcu 09/10] doc: Timer problems can cause RCU CPU stall warnings paulmck
2020-06-23 0:09 ` paulmck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200623000947.25222-10-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®