From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 30 Aug 2001 14:51:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 30 Aug 2001 14:51:39 -0400 Received: from suntan.tandem.com ([192.216.221.8]:30353 "EHLO suntan.tandem.com") by vger.kernel.org with ESMTP id ; Thu, 30 Aug 2001 14:51:25 -0400 Message-ID: <3B8E88C1.D96DA91B@kahuna.cag.cpqcorp.net> Date: Thu, 30 Aug 2001 11:41:05 -0700 From: John Byrne Reply-To: John.L.Byrne@compaq.com X-Mailer: Mozilla 4.61 [en] (X11; I; UnixWare 5 i386) MIME-Version: 1.0 To: Linus Torvalds CC: linux-kernel@vger.kernel.org, MOLNAR Ingo Subject: Re: [PATCH] 2.4.x i386 SMP interrupts can corrupt registers In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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