public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, Fix broken LDT access in VMI
@ 2008-09-30 18:02 Zachary Amsden
  2008-09-30 19:13 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Zachary Amsden @ 2008-09-30 18:02 UTC (permalink / raw)
  To: Linus Torvalds, Linux Kernel Mailing List, Ingo Molnar,
	Glauber de Oliveira Costa

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

This one took a long time to rear up because LDT usage is not very
common, but the bug is quite serious.  It got introduced along with
another bug, already fixed, by 75b8bb3e56ca09a467fbbe5229bc68627f7445be 

Please apply.  Fix should also be headed for stable tree and backported,
it is really sadly trivial.  Glauber, Ingo, sorry for the offlist
posting, somehow the original missed LKML.

Zach

[-- Attachment #2: vmi-ldt-fix.patch --]
[-- Type: text/x-patch, Size: 791 bytes --]

After investigating a JRE failure, I found this bug was introduced a long time
ago, and had already managed to survive another bugfix which occurred on the
same line.  The result is a total failure of the JRE due to LDT selectors not
working properly.

Signed-off-by: Zachary Amsden <zach@vmware.com>

diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c
index 040a95e..411e34f 100644
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -234,7 +234,7 @@ static void vmi_write_ldt_entry(struct desc_struct *dt, int entry,
 				const void *desc)
 {
 	u32 *ldt_entry = (u32 *)desc;
-	vmi_ops.write_idt_entry(dt, entry, ldt_entry[0], ldt_entry[1]);
+	vmi_ops.write_ldt_entry(dt, entry, ldt_entry[0], ldt_entry[1]);
 }
 
 static void vmi_load_sp0(struct tss_struct *tss,

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86, Fix broken LDT access in VMI
  2008-09-30 18:02 [PATCH] x86, Fix broken LDT access in VMI Zachary Amsden
@ 2008-09-30 19:13 ` Ingo Molnar
  2008-09-30 22:49   ` Parag Warudkar
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-09-30 19:13 UTC (permalink / raw)
  To: Zachary Amsden
  Cc: Linus Torvalds, Linux Kernel Mailing List, Ingo Molnar,
	Glauber de Oliveira Costa


* Zachary Amsden <zach@vmware.com> wrote:

> This one took a long time to rear up because LDT usage is not very
> common, but the bug is quite serious.  It got introduced along with
> another bug, already fixed, by 75b8bb3e56ca09a467fbbe5229bc68627f7445be 
> 
> Please apply.  Fix should also be headed for stable tree and backported,
> it is really sadly trivial.  Glauber, Ingo, sorry for the offlist
> posting, somehow the original missed LKML.

> -	vmi_ops.write_idt_entry(dt, entry, ldt_entry[0], ldt_entry[1]);
> +	vmi_ops.write_ldt_entry(dt, entry, ldt_entry[0], ldt_entry[1]);

oops. Applied to tip/x86/urgent, thanks Zachary!

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86, Fix broken LDT access in VMI
  2008-09-30 19:13 ` Ingo Molnar
@ 2008-09-30 22:49   ` Parag Warudkar
  0 siblings, 0 replies; 3+ messages in thread
From: Parag Warudkar @ 2008-09-30 22:49 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Zachary Amsden, Linus Torvalds, Linux Kernel Mailing List,
	Ingo Molnar, Glauber de Oliveira Costa

On Tue, Sep 30, 2008 at 3:13 PM, Ingo Molnar <mingo@elte.hu> wrote:
>> -     vmi_ops.write_idt_entry(dt, entry, ldt_entry[0], ldt_entry[1]);
>> +     vmi_ops.write_ldt_entry(dt, entry, ldt_entry[0], ldt_entry[1]);

For a few seconds I thought it was diff going mad diff'ing exactly
similar lines.

This one could actually use some capitalization to reduce the
possibility of similar problems in future - rename to write_IDT_entry
and write_LDT_entry perhaps?

Parag

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-30 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-30 18:02 [PATCH] x86, Fix broken LDT access in VMI Zachary Amsden
2008-09-30 19:13 ` Ingo Molnar
2008-09-30 22:49   ` Parag Warudkar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox