[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071021232113.52ce1be7@poseidon.drzeus.cx>
Date: Sun, 21 Oct 2007 23:21:13 +0200
From: Pierre Ossman <drzeus@...eus.cx>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: net: alignment problem in icmp code
On Sun, 21 Oct 2007 12:48:14 -0700 (PDT)
David Miller <davem@...emloft.net> wrote:
>
> You are missing a crucial point.
>
> The compiler may emit the same exact loads and stores when it inlines
> memcpy() if it "knows" the objects are aligned properly. And it very
> much will do this.
>
Not sure that would be valid. memcpy() is defined as having void* arguments, and the compiler cannot just ignore that if it chooses to inline it.
Still, just give it the char* from the skb and it cannot make any assumption on alignment.
Rgds
Pierre
Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)
Powered by blists - more mailing lists