alignment faults in 3.6

3 messages, 2 authors, 2012-10-12 · open the first message on its own page

alignment faults in 3.6

From: Måns Rullgård <hidden>
Date: 2012-10-12 11:00:03

Russell King - ARM Linux [off-list ref] writes:
On Fri, Oct 12, 2012 at 08:11:42AM +0000, Arnd Bergmann wrote:
quoted
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?
I think that's an excellent idea.
quoted
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.
As far as I'm concerned, this is all hearsay, and I've only ever heard
it from you.  Why can't you let those who care fix these bugs instead?

-- 
Måns Rullgård
mans@mansr.com

alignment faults in 3.6

From: Russell King - ARM Linux <hidden>
Date: 2012-10-12 11:07:50

On Fri, Oct 12, 2012 at 12:00:03PM +0100, Måns Rullgård wrote:
Russell King - ARM Linux [off-list ref] writes:
quoted
On Fri, Oct 12, 2012 at 08:11:42AM +0000, Arnd Bergmann wrote:
quoted
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?
I think that's an excellent idea.
Well, I get the last word here and it's no.
quoted
quoted
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.
As far as I'm concerned, this is all hearsay, and I've only ever heard
it from you.  Why can't you let those who care fix these bugs instead?
You know, I'm giving you the benefit of my _knowledge_ which has been
built over the course of the last 20 years.  I've been in these
discussions with networking people before.  I ended up having to develop
the alignment fault handler because of those discussions.  And oh look,
Eric confirmed that the networking code isn't going to get "fixed" as
you were demanding, which is exactly what I said.

I've been in discussions with MTD people over these issues before, I've
discussed this with David Woodhouse when it came up in JFFS2.  I *KNOW*
these things.

You can call it hearsay if you wish, but it seems to be more accurate
than your wild outlandish and pathetic statements.

alignment faults in 3.6

From: Russell King - ARM Linux <hidden>
Date: 2012-10-12 11:19:06

On Fri, Oct 12, 2012 at 12:07:50PM +0100, Russell King - ARM Linux wrote:
On Fri, Oct 12, 2012 at 12:00:03PM +0100, Måns Rullgård wrote:
quoted
Russell King - ARM Linux [off-list ref] writes:
quoted
On Fri, Oct 12, 2012 at 08:11:42AM +0000, Arnd Bergmann wrote:
quoted
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?
I think that's an excellent idea.
Well, I get the last word here and it's no.
quoted
quoted
quoted
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.
As far as I'm concerned, this is all hearsay, and I've only ever heard
it from you.  Why can't you let those who care fix these bugs instead?
You know, I'm giving you the benefit of my _knowledge_ which has been
built over the course of the last 20 years.  I've been in these
discussions with networking people before.  I ended up having to develop
the alignment fault handler because of those discussions.
Correction: San Mehat at Corel Inc had to develop it, but I was involved
in those discussions over it nevertheless, as I was the person who merged
the code and then subsequently maintained it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help