linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Byrne <jbyrne@kahuna.cag.cpqcorp.net>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org, MOLNAR Ingo <mingo@chiara.elte.hu>
Subject: Re: [PATCH] 2.4.x i386 SMP interrupts can corrupt registers
Date: Thu, 30 Aug 2001 11:41:05 -0700	[thread overview]
Message-ID: <3B8E88C1.D96DA91B@kahuna.cag.cpqcorp.net> (raw)
In-Reply-To: <Pine.LNX.4.33.0108292037120.1124-100000@penguin.transmeta.com>

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

      reply	other threads:[~2001-08-30 18:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-29 18:47 [PATCH] 2.4.x i386 SMP interrupts can corrupt registers john.l.byrne
2001-08-30  3:39 ` Linus Torvalds
2001-08-30 18:41   ` John Byrne [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B8E88C1.D96DA91B@kahuna.cag.cpqcorp.net \
    --to=jbyrne@kahuna.cag.cpqcorp.net \
    --cc=John.L.Byrne@compaq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@chiara.elte.hu \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).