From: Matthew Wilcox <matthew@wil.cx>
To: dhowells@redhat.com, lethal@linux-sh.org,
linux-sh@vger.kernel.org, chris@zankel.net
Cc: linux-arch@vger.kernel.org, Kyle McMartin <kyle@mcmartin.ca>
Subject: Missing memory clobber in ip_fast_csum
Date: Sat, 31 May 2008 05:13:41 -0600 [thread overview]
Message-ID: <20080531111340.GE28074@parisc-linux.org> (raw)
Kyle McMartin just tracked down a bug on parisc to a missing "memory"
clobber in the inline assembly implementation of ip_fast_csum. The FRV,
SH and Xtensa ports are also missing a memory clobber, so I thought it
would be polite to let you know.
The bug manifests as dropped network packets (obviously they have the
wrong checksum). It started appearing for parisc with GCC 4.3.
The GCC manual says:
If your assembler instructions access memory in an unpredictable
fashion, add `memory' to the list of clobbered registers. This will
cause GCC to not keep memory values cached in registers across the
assembler instruction and not optimize stores or loads to that memory.
I see that FRV has a 400 byte memory output which may prevent this
problem from appearing, but SH and Xtensa have nothing to prevent this
bug. Hope this saves you a few days of debugging.
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
reply other threads:[~2008-05-31 11:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080531111340.GE28074@parisc-linux.org \
--to=matthew@wil.cx \
--cc=chris@zankel.net \
--cc=dhowells@redhat.com \
--cc=kyle@mcmartin.ca \
--cc=lethal@linux-sh.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-sh@vger.kernel.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