From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
Paul Mackerras <paulus@samba.org>,
Ambrose Feinstein <ambrose@google.com>,
linuxppc-dev@lists.ozlabs.org
Subject: RE: [PATCH net-next] af_unix: fix a fatal race with bit fields
Date: Fri, 03 May 2013 08:02:36 -0700 [thread overview]
Message-ID: <1367593356.29805.37.camel@edumazet-glaptop> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B7226@saturn3.aculab.com>
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.
next prev parent reply other threads:[~2013-05-03 15:02 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-01 1:12 [PATCH net-next] af_unix: fix a fatal race with bit fields Eric Dumazet
2013-05-01 1:39 ` Benjamin Herrenschmidt
2013-05-01 7:36 ` David Miller
2013-05-01 8:08 ` Benjamin Herrenschmidt
2013-05-01 15:24 ` [PATCH v2 " Eric Dumazet
2013-05-01 15:53 ` David Laight
2013-05-01 16:00 ` Eric Dumazet
2013-05-01 19:14 ` David Miller
2013-05-01 12:08 ` [PATCH " Ben Hutchings
2013-05-03 14:29 ` David Laight
2013-05-03 15:02 ` Eric Dumazet [this message]
2013-05-03 15:44 ` David Laight
2013-05-01 1:51 ` Anton Blanchard
2013-05-01 2:24 ` Eric Dumazet
2013-05-01 3:54 ` Alan Modra
2013-05-01 5:04 ` Eric Dumazet
2013-05-01 15:10 ` Stephen Hemminger
2013-05-02 21:11 ` Benjamin Herrenschmidt
2013-05-03 1:31 ` Alan Modra
2013-05-03 8:20 ` David Laight
2013-05-03 12:57 ` Benjamin Herrenschmidt
2013-05-03 14:14 ` Eric Dumazet
2013-05-02 17:02 ` Scott Wood
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=1367593356.29805.37.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=David.Laight@ACULAB.COM \
--cc=ambrose@google.com \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=paulus@samba.org \
/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