[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160504230638.GO13997@two.firstfloor.org>
Date: Wed, 4 May 2016 16:06:38 -0700
From: Andi Kleen <andi@...stfloor.org>
To: John Denker <jsd@...n.com>
Cc: "H. Peter Anvin" <hpa@...or.com>, tytso@....edu,
noloader@...il.com, linux-kernel@...r.kernel.org,
Stephan Mueller <smueller@...onox.de>,
Herbert Xu <herbert@...dor.apana.org.au>, andi@...stfloor.org,
Sandy Harris <sandyinchina@...il.com>,
cryptography@...edaemon.net, linux-crypto@...r.kernel.org
Subject: Re: linux/bitops.h
On Wed, May 04, 2016 at 03:06:04PM -0700, John Denker wrote:
> On 05/04/2016 02:56 PM, H. Peter Anvin wrote:
> >> Beware that shifting by an amount >= the number of bits in the
> >> word remains Undefined Behavior.
>
> > This construct has been supported as a rotate since at least gcc2.
>
> How then should we understand the story told in commit d7e35dfa?
> Is the story wrong?
I don't think Linux runs on a system where it would make a difference
(like a VAX), and also gcc always converts it before it could.
Even UBSan should not complain because it runs after the conversion
to ROTATE.
So it's unlikely to be a pressing issue.
-Andi
--
ak@...ux.intel.com -- Speaking for myself only.
Powered by blists - more mailing lists