]> Git Repo - linux.git/commitdiff
doc: Tasks RCU must protect instructions before trampoline
authorPaul E. McKenney <[email protected]>
Tue, 12 May 2020 02:52:34 +0000 (19:52 -0700)
committerPaul E. McKenney <[email protected]>
Mon, 29 Jun 2020 18:58:11 +0000 (11:58 -0700)
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/[email protected]/
Reported-by: Lai Jiangshan <[email protected]>
Reported-by: Steven Rostedt <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
Documentation/RCU/Design/Requirements/Requirements.rst

index 75b8ca007a11c4c9a06b4d579cd704e25eed7535..a69b5c43a10ca56182b9da9c23a96c0f1ce91d3b 100644 (file)
@@ -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
This page took 0.059448 seconds and 4 git commands to generate.