lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191114132848.55atqtjshjmi2udl@gondor.apana.org.au>
Date:   Thu, 14 Nov 2019 21:28:48 +0800
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Will Deacon <will@...nel.org>
Cc:     linux@...linux.org.uk, torvalds@...ux-foundation.org,
        catalin.marinas@....com, vincent.whitchurch@...s.com,
        axboe@...nel.dk, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, rabinv@...s.com,
        Richard.Earnshaw@....com
Subject: Re: [PATCH v2] buffer: Fix I/O error due to ARM read-after-read
 hazard

Will Deacon <will@...nel.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?

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ