lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 1 Nov 2006 20:34:05 +0100
From:	Andi Kleen <ak@...e.de>
To:	Linus Torvalds <torvalds@...l.org>
Cc:	"Michael S. Tsirkin" <mst@...lanox.co.il>,
	Ernst Herzberg <earny@...4u.de>, Len Brown <lenb@...nel.org>,
	Adrian Bunk <bunk@...sta.de>, Hugh Dickins <hugh@...itas.com>,
	Pavel Machek <pavel@...e.cz>, Andrew Morton <akpm@...l.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-acpi@...r.kernel.org, linux-pm@...l.org,
	Martin Lorenz <martin@...enz.eu.org>
Subject: Re: 2.6.19-rc <-> ThinkPads

On Wednesday 01 November 2006 19:25, Linus Torvalds wrote:
> 
> On Wed, 1 Nov 2006, Andi Kleen wrote:
> >
> > Ok please revert the i386 patch for now then if it fixes the ThinkPads. 
> > The x86-64 version should be probably fixed too, but doesn't cleanly. I will 
> > send you later a patch to fix this there properly.
> 
> Actually, I should have just fixed the ordering. I did some cleanups too, 
> but those are unrelated (except in the sense that I wanted to look at the 
> assembly code, and the cleanups made the code generation at least half-way 
> sane!)

Thanks.

Some of them are still different than the old code now, but that's probably
ok.

But the irq race you pointed out is still there (unless you fixed it in a differnet patch) 
I don't know if it makes
a difference, but here is a patch to fix it.

-Andi

Fix race in IO-APIC routing entry setup.

Interrupt could happen between setting the IO-APIC entry
and setting its interrupt data.

Pointed out by Linus.

Signed-off-by: Andi Kleen <ak@...e.de>

Index: linux/arch/i386/kernel/io_apic.c
===================================================================
--- linux.orig/arch/i386/kernel/io_apic.c
+++ linux/arch/i386/kernel/io_apic.c
@@ -1298,10 +1298,12 @@ static void __init setup_IO_APIC_irqs(vo
 			if (!apic && (irq < 16))
 				disable_8259A_irq(irq);
 		}
+		local_irq_save(flags);
 		ioapic_write_entry(apic, pin, entry);
-		spin_lock_irqsave(&ioapic_lock, flags);
+		spin_lock(&ioapic_lock);
 		set_native_irq_info(irq, TARGET_CPUS);
-		spin_unlock_irqrestore(&ioapic_lock, flags);
+		spin_unlock(&ioapic_lock);
+		local_irq_restore(flags);
 	}
 	}
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ