lkml.org 
[lkml]   [2001]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.4.x i386 SMP interrupts can corrupt registers
Linus Torvalds wrote:
>
> On Wed, 29 Aug 2001 john.l.byrne@compaq.com wrote:
> >
> > Currently, the SMP interrupt code generated by the macros
> > BUILD_SMP_INTERRUPT and BUILD_SMP_TIMER_INTERRUPT push the positive
> > interrupt vector number on the stack.
>
> [ Details deleted ]
>
> Wow. Good catch - that's just incredibly broken, and I wonder how come
> the
> SMP interrupt build stuff didn't get the right code copied from
> BUILD_IRQ..

Thanks.

Incredibly broken, true, but I'm not sure how often anyone has seen the
bug.

While I'm not sure why the code wasn't copied properly, I looked through
the history via CVSweb and the reason the bug got through looks pretty
obvious:

The bug came into existence in 2.3.14, when the file
arch/i386/kernel/irq.h became include/asm-i386/hw_irq.h. The file was
moved and changed at the same time, but the bug was missed because the
diff would have shown the entire file being deleted in one place and
added in another. If the file had been moved first, and then the changes
made, the bug almost certainly would have been caught.

>
> How the h*ll did you happen to actually notice this?

Some combination of blind luck, curiosity, pride, and Obsessive
Compulsive Disorder...

I happened to read the code and the difference between the macros looked
wrong; if the code was right, for some nonobvious reason, I was d*mn
well going to what it was!

>
> Obviously applied, thanks,
>
> Linus

You're welcome.

John
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:01    [W:0.237 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site