netdev
[Top] [All Lists]

Re: conflicting alignment requirements

To: Jacob Avraham <jacoba@xxxxxxxxx>
Subject: Re: conflicting alignment requirements
From: Andi Kleen <ak@xxxxxx>
Date: Wed, 25 Jul 2001 21:15:52 +0200
Cc: Andi Kleen <ak@xxxxxx>, Network Development List <netdev@xxxxxxxxxxx>
In-reply-to: <EJEHILNJPONOHGEOJKICAECOCAAA.jacoba@xxxxxxxxx>; from Jacob Avraham on Wed, Jul 25, 2001 at 06:40:27PM +0200
References: <20010725151707.44709@xxxxxxxxxxxx> <EJEHILNJPONOHGEOJKICAECOCAAA.jacoba@xxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
On Wed, Jul 25, 2001 at 06:40:27PM +0200, Jacob Avraham wrote:
> #if !defined(__i386__) && !defined(__mc68000__)
>       if ((unsigned long)ptr & 3)
>               return -1;
> #endif

As far as I can see this code is wrong: all architectures should be able to 
handle
unaligned accesses in kernel, otherwise they're remotely exploitable anyways.
I guess you can just drop the ifdef, and if it should break anything complain
to the maintainer of the architecture.


-Andi



> 

<Prev in Thread] Current Thread [Next in Thread>