Thread (5 messages) 5 messages, 4 authors, 2012-10-12

Re: alignment faults in 3.6

flat view

From: Russell King - ARM Linux <hidden>
Date: 2012-10-12 09:03:21
Also in: linux-arm-kernel

On Fri, Oct 12, 2012 at 08:11:42AM +0000, Arnd Bergmann wrote:
On Thursday 11 October 2012, Måns Rullgård wrote:
quoted
quoted
But, the IP header is expected to be aligned.
Everything tells the compiler the struct is perfectly aligned.  When the
buggy driver passes a misaligned pointer, bad things happen.
Would it be appropriate to add a WARN_ON_ONCE() in the alignment fault path
then? If all alignment faults in the kernel are caused by broken drivers,
that would at least give us some hope of finding those drivers while at the
same time not causing much overhead in the case where we need to do the
fixup in the meantime.
No.  It is my understanding that various IP option processing can also
cause the alignment fault handler to be invoked, even when the packet is
properly aligned, and then there's jffs2/mtd which also relies upon
alignment faults being fixed up.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help