From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, dhowells@redhat.com, will.deacon@arm.com,
peterz@infradead.org, stern@rowland.harvard.edu
Subject: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability
Date: Thu, 29 Sep 2016 08:54:01 -0700 [thread overview]
Message-ID: <20160929155401.GA5097@linux.vnet.ibm.com> (raw)
If two processes are related by a RELEASE+ACQUIRE pair, ordering can be
broken if a third process overwrites the value written by the RELEASE
operation before the ACQUIRE operation has a chance of reading it.
This commit therefore updates the documentation to call this vulnerability
out explicitly.
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
Documentation/memory-barriers.txt | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index ba818ecce6f9..a57679ec9441 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -490,14 +490,18 @@ And a couple of implicit varieties:
the subsection "MMIO write barrier"). In addition, a RELEASE+ACQUIRE
pair is -not- guaranteed to act as a full memory barrier. However, after
an ACQUIRE on a given variable, all memory accesses preceding any prior
- RELEASE on that same variable are guaranteed to be visible. In other
- words, within a given variable's critical section, all accesses of all
- previous critical sections for that variable are guaranteed to have
- completed.
+ RELEASE on that same variable in that same chain of RELEASE+ACQUIRE
+ pairs are guaranteed to be visible. In other words, within a given
+ variable's critical section, all accesses of all previous critical
+ sections for that variable are guaranteed to have completed.
This means that ACQUIRE acts as a minimal "acquire" operation and
RELEASE acts as a minimal "release" operation.
+ However, please note that a chain of RELEASE+ACQUIRE pairs may be
+ broken by a store by another thread that overwrites the RELEASE
+ operation's store before the ACQUIRE operation's read.
+
A subset of the atomic operations described in atomic_ops.txt have ACQUIRE
and RELEASE variants in addition to fully-ordered and relaxed (no barrier
semantics) definitions. For compound atomics performing both a load and a
--
2.5.2
next reply other threads:[~2016-09-29 15:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-29 15:54 Paul E. McKenney [this message]
2016-09-29 15:58 ` [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Peter Zijlstra
2016-09-29 16:03 ` Will Deacon
2016-09-29 16:17 ` Peter Zijlstra
2016-09-29 16:44 ` Paul E. McKenney
2016-09-29 16:43 ` Paul E. McKenney
2016-09-29 17:10 ` Will Deacon
2016-09-29 17:23 ` Paul E. McKenney
2016-09-29 18:04 ` Paul E. McKenney
2016-09-29 18:10 ` Paul E. McKenney
2016-09-29 18:44 ` Peter Zijlstra
2016-09-29 19:18 ` Paul E. McKenney
2016-09-29 19:36 ` Alan Stern
2016-09-29 20:26 ` Paul E. McKenney
2016-09-30 8:53 ` Peter Zijlstra
2016-09-30 9:00 ` Peter Zijlstra
2016-09-30 9:57 ` Peter Zijlstra
2016-09-30 12:14 ` Paul E. McKenney
2016-09-30 12:51 ` Peter Zijlstra
2016-09-30 13:35 ` Paul E. McKenney
2016-09-30 5:53 ` Boqun Feng
2016-09-30 9:20 ` Will Deacon
2016-09-30 11:35 ` Paul E. McKenney
2016-09-30 10:25 ` Peter Zijlstra
2016-09-30 12:17 ` Paul E. McKenney
2016-09-30 12:45 ` Peter Zijlstra
2016-09-30 13:10 ` Paul E. McKenney
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=20160929155401.GA5097@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=stern@rowland.harvard.edu \
--cc=will.deacon@arm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.