[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1367593356.29805.37.camel@edumazet-glaptop>
Date: Fri, 03 May 2013 08:02:36 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Laight <David.Laight@...LAB.COM>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Paul Mackerras <paulus@...ba.org>,
Ambrose Feinstein <ambrose@...gle.com>,
linuxppc-dev@...ts.ozlabs.org
Subject: RE: [PATCH net-next] af_unix: fix a fatal race with bit fields
On Fri, 2013-05-03 at 15:29 +0100, David Laight wrote:
> > > Could ppc64 experts confirm using byte is safe, or should we really add
> > > a 32bit hole after the spinlock ? If so, I wonder how many other places
> > > need a change...
> ...
> > Also I'd be surprised if ppc64 is the only one with that problem... what
> > about sparc64 and arm64 ?
>
> Even x86 could be affected.
> The width of the memory cycles used by the 'bit set and bit clear'
> instructions isn't documented. They are certainly allowed to do
> RMW on adjacent bytes.
> I don't remember whether they are constrained to only do
> 32bit accesses, but nothing used to say that they wouldn't
> do 32bit misaligned ones! (although I suspect they never have).
x86 is not affected (or else we would have found the bug much earlier)
Setting 1-bit field to one/zero uses OR/AND instructions.
orb $4,724(%reg)
doesn't load/store 64bits but 8bits.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists