From: Will Deacon <will@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux@armlinux.org.uk, torvalds@linux-foundation.org,
catalin.marinas@arm.com, vincent.whitchurch@axis.com,
axboe@kernel.dk, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, rabinv@axis.com,
Richard.Earnshaw@arm.com
Subject: Re: [PATCH v2] buffer: Fix I/O error due to ARM read-after-read hazard
Date: Wed, 20 Nov 2019 19:18:40 +0000 [thread overview]
Message-ID: <20191120191839.GF4799@willie-the-truck> (raw)
In-Reply-To: <20191114132848.55atqtjshjmi2udl@gondor.apana.org.au>
On Thu, Nov 14, 2019 at 09:28:48PM +0800, Herbert Xu wrote:
> Will Deacon <will@kernel.org> wrote:
> >
> > which is what can happen due to this erratum. It's generally good practice
> > to use READ_ONCE() when reading something which can be updated concurrently
> > because:
> >
> > * It ensures that the value is (re-)loaded from memory
> >
> > * It prevents the compiler from performing harmful optimisations,
> > such as merging or tearing (although in this case I suspect
> > these are ok because we're dealing with a single bit)
> >
> > * On Alpha, it gives you a barrier so that dependency ordering
> > can be relied upon from the load
>
> The Alpha barrier matters for pointers, how could it make a
> difference for individual bits?
I guess you could use the result of test_bit to index into an array or
something?
Will
next prev parent reply other threads:[~2019-11-20 19:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 13:02 [PATCH v2] buffer: Fix I/O error due to ARM read-after-read hazard Vincent Whitchurch
2019-11-12 16:08 ` Catalin Marinas
2019-11-12 17:54 ` Linus Torvalds
2019-11-12 18:00 ` Will Deacon
2019-11-12 18:22 ` Catalin Marinas
2019-11-12 18:39 ` Linus Torvalds
2019-11-13 10:23 ` Will Deacon
2019-11-13 10:31 ` Russell King - ARM Linux admin
2019-11-13 10:49 ` Will Deacon
2019-11-14 13:28 ` Herbert Xu
2019-11-20 19:18 ` Will Deacon [this message]
2019-11-21 1:25 ` Herbert Xu
2019-11-21 16:53 ` Will Deacon
2019-11-13 16:36 ` Linus Torvalds
2019-11-13 16:40 ` Linus Torvalds
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=20191120191839.GF4799@willie-the-truck \
--to=will@kernel.org \
--cc=Richard.Earnshaw@arm.com \
--cc=axboe@kernel.dk \
--cc=catalin.marinas@arm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=rabinv@axis.com \
--cc=torvalds@linux-foundation.org \
--cc=vincent.whitchurch@axis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).