Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1494063
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability |
| Date | 2016-09-30 14:20 +0200 |
| Message-ID | <sn4Xf-1Ge-1@gated-at.bofh.it> (permalink) |
| References | <smLUB-5YJ-5@gated-at.bofh.it> <smLUB-5YJ-3@gated-at.bofh.it> <smM4i-6hY-7@gated-at.bofh.it> <smMH0-6yY-21@gated-at.bofh.it> <sn3eO-yF-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Sep 30, 2016 at 12:25:16PM +0200, Peter Zijlstra wrote:
> On Thu, Sep 29, 2016 at 09:43:53AM -0700, Paul E. McKenney wrote:
> > 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, for
> > example:
> >
> > P0(int *x, int *y)
> > {
> > WRITE_ONCE(*x, 1);
> > smp_store_release(y, 1);
> > }
> >
> > P1(int *y)
> > {
> > smp_store_release(y, 2);
> > }
> >
> > P2(int *x, int *y)
> > {
> > r1 = smp_load_acquire(y);
> > r2 = READ_ONCE(*x);
> > }
> >
> > Both ARM and powerpc allow the "after the dust settles" outcome (r1=2 &&
> > r2=0), as does the current version of the early prototype Linux-kernel
> > memory model.
> >
> > This commit therefore updates the documentation to call this vulnerability
> > out explicitly.
>
> So its a pretty dumb thing to do in any case (and yes the kernel does
> this). Its also entirely expected in my book, that if you generate
> conflicting writes on a release, ordering is out the window.
>
> Why do we need to call this out? Who in his right mind would want to do
> this and expect anything other than wreckage?
>
> Not that we're not having too much 'fun' discussing this,.. but I do
> wonder why we need to call this out.
You lost me on this one... If no one does this, sure, we can leave it out.
But if some part of the kernel does rely on this, we should call it out as
forbidden. And fix the kernel, of course.
Or am I missing your point?
Thanx, Paul
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Peter Zijlstra <peterz@infradead.org> - 2016-09-29 18:00 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Will Deacon <will.deacon@arm.com> - 2016-09-29 18:10 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Peter Zijlstra <peterz@infradead.org> - 2016-09-29 18:20 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-29 18:50 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-29 18:50 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Will Deacon <will.deacon@arm.com> - 2016-09-29 19:20 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-29 19:30 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-29 20:10 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-29 20:20 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Peter Zijlstra <peterz@infradead.org> - 2016-09-29 20:50 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-29 21:20 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Alan Stern <stern@rowland.harvard.edu> - 2016-09-29 21:40 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-29 22:30 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Peter Zijlstra <peterz@infradead.org> - 2016-09-30 11:00 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Peter Zijlstra <peterz@infradead.org> - 2016-09-30 11:10 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Peter Zijlstra <peterz@infradead.org> - 2016-09-30 12:00 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-30 14:20 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Peter Zijlstra <peterz@infradead.org> - 2016-09-30 15:00 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-30 15:40 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Boqun Feng <boqun.feng@gmail.com> - 2016-09-30 08:00 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Will Deacon <will.deacon@arm.com> - 2016-09-30 11:30 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-30 13:40 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Peter Zijlstra <peterz@infradead.org> - 2016-09-30 12:30 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-30 14:20 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability Peter Zijlstra <peterz@infradead.org> - 2016-09-30 14:50 +0200
Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-30 15:20 +0200
csiph-web