[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48A47B83.3090408@zytor.com>
Date: Thu, 14 Aug 2008 11:37:55 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Jeremy Fitzhardinge <jeremy@...p.org>
CC: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
Andi Kleen <andi@...stfloor.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
Steven Rostedt <rostedt@...dmis.org>,
Steven Rostedt <srostedt@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
David Miller <davem@...emloft.net>,
Roland McGrath <roland@...hat.com>,
Ulrich Drepper <drepper@...hat.com>,
Rusty Russell <rusty@...tcorp.com.au>,
Gregory Haskins <ghaskins@...ell.com>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
"Luis Claudio R. Goncalves" <lclaudio@...g.org>,
Clark Williams <williams@...hat.com>,
Christoph Lameter <cl@...ux-foundation.org>
Subject: Re: [RFC PATCH] x86 alternatives : fix LOCK_PREFIX race with preemptible
kernel and CPU hotplug
Jeremy Fitzhardinge wrote:
>
> Ah, OK. I'd thought we started unlocked, but given that I've just been
> disassembling the kernel and looking at the lock prefixes, that's a bit
> of a braino on my part.
>
> BTW, using the ds prefix allows us to undo the hack of dealing with
> locked instructions with exception handlers. There was a bug where if
> we do lock->nop, then the address of a faulting instruction changes, so
> we need exception records for both the locked and unlocked forms. Using
> ds means the instruction size doesn't change, so we only need one
> exception record. I don't remember off hand where that happens.
>
Using %ds: rather than nop really seems to solve a whole lot of
problems, and might even be faster to boot. It really sounds like a
no-brainer.
-hpa
--
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