netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: drzeus@drzeus.cx
Cc: netdev@vger.kernel.org
Subject: Re: net: alignment problem in icmp code
Date: Sun, 21 Oct 2007 22:15:24 -0700 (PDT)	[thread overview]
Message-ID: <20071021.221524.49830652.davem@davemloft.net> (raw)
In-Reply-To: <20071022065443.2f3c1b8a@poseidon.drzeus.cx>

From: Pierre Ossman <drzeus@drzeus.cx>
Date: Mon, 22 Oct 2007 06:54:43 +0200

> On Sun, 21 Oct 2007 16:02:15 -0700 (PDT)
> David Miller <davem@davemloft.net> wrote:
> 
> > You will get a 64-bit load and a 64-bit store emitted by
> > the compiler.  Here is what we get on sparc64:
> 
> I assume those ops cause a bus error on unaligned addresses?

Sure.  But the language defines that the types in question
must be 64-bit aligned, so it is legal for the compiler to
emit this code.

It's not a GCC bug.

If you want to let the compiler know that a pointer to a type might
not be aligned, you have to tell it so.

  reply	other threads:[~2007-10-22  5:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-20 21:35 net: alignment problem in icmp code Pierre Ossman
2007-10-21  5:12 ` David Miller
2007-10-21  9:34   ` Pierre Ossman
2007-10-21 19:48     ` David Miller
2007-10-21 21:21       ` Pierre Ossman
2007-10-21 23:02         ` David Miller
2007-10-22  4:54           ` Pierre Ossman
2007-10-22  5:15             ` David Miller [this message]
2007-10-22  7:23               ` Pierre Ossman
2007-10-22  8:31                 ` David Miller
2007-10-22  8:42                   ` Pierre Ossman
2007-10-22  9:05                     ` David Miller
2007-10-22  9:26                       ` Pierre Ossman
2007-10-22  9:52                         ` Eric Dumazet

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=20071021.221524.49830652.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=drzeus@drzeus.cx \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).