From: Andrew Morton <akpm@osdl.org>
To: netdev@oss.sgi.com
Subject: Fw: [BUG] alignment problem in net/core/flow.c:flow_key_compare
Date: Thu, 18 Mar 2004 16:29:03 -0800 [thread overview]
Message-ID: <20040318162903.59192d13.akpm@osdl.org> (raw)
This is in 2.6.4:
Begin forwarded message:
Date: Thu, 18 Mar 2004 11:53:02 +0100
From: mru@kth.se (Måns Rullgård)
To: linux-kernel@vger.kernel.org
Subject: [BUG] alignment problem in net/core/flow.c:flow_key_compare
There is a problem with alignment in the flow_key_compare function in
net/core/flow.c. It takes arguments of type struct flowi * and casts
them to flow_compare_t *, which is 64 bits on 64-bit machines. It
then proceeds to read and compare 64-bit values from these pointers.
The problem is that struct flowi only requires 32-bit alignment, so
these reads cause numerous unaligned exceptions. On average, I get
nearly 1000 unaligned exceptions per second.
The solutions I see are either to force the alignment of struct flowi
to 64 bits, or to use 32-bit access in flow_key_compare.
--
Måns Rullgård
mru@kth.se
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2004-03-19 0:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-19 0:29 Andrew Morton [this message]
2004-03-19 2:55 ` [BUG] alignment problem in net/core/flow.c:flow_key_compare YOSHIFUJI Hideaki / 吉藤英明
2004-03-19 2:59 ` Andrew Morton
2004-03-19 4:21 ` David S. Miller
2004-03-19 5:00 ` YOSHIFUJI Hideaki / 吉藤英明
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=20040318162903.59192d13.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=netdev@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).