alignment faults in 3.6

Nicolas Pitre nicolas.pitre at linaro.org
Sat Oct 6 12:19:30 EDT 2012


On Sat, 6 Oct 2012, Mans Rullgard wrote:

> On 5 October 2012 23:42, Russell King - ARM Linux
> <linux at arm.linux.org.uk> wrote:
> > On Fri, Oct 05, 2012 at 11:37:40PM +0100, Mans Rullgard wrote:
> >> The problem is the (__be32 *) casts.  This is a normal pointer to a 32-bit,
> >> which is assumed to be aligned, and the cast overrides the packed attribute
> >> from the struct.  Dereferencing these cast expressions must be done with the
> >> macros from asm/unaligned.h
> >
> > Again, not going to happen.
> 
> There are only two options for fixing this:
> 
> 1. Ensure the struct is always aligned.
> 2. Declare it packed (and fix casts).
> 
> Refusing to do either leaves us with a broken kernel.  Is that what you want?

Once again, please bring this up with davem and also CC 
netdev at vger.kernel.org as he's the point of contention here.


Nicolas



More information about the linux-arm-kernel mailing list