[PATCH] x86, Fix broken LDT access in VMI



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
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@xxxxxxxxxx>

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,


Relevant Pages

  • Re: [OT] Family names (Wieser)
    ... similar and common between them... ... "bug" was commonly used in electrical engineering (the term ... post-Roman periods...and, certainly, the old Celtic languages were ... sometimes think they were the "originals" on this small island, ...
    (alt.lang.asm)
  • Re: Causing Death by Accident
    ... But the reason they are not so common is not ... The brain's reaction upon encountering a "bug" ... which analyses the bug and provides a patch. ... It still has to take us offline for a short while whilst it formulates ...
    (uk.legal)
  • Re: Passing Strings
    ... I'm not sure what icc is that it would have a bug in common with ... that particular bug and have ... What you declare the dummy argument with a length of 255, ... explicit-length form cause errors plenty of times, ...
    (comp.lang.fortran)
  • Re: vista update
    ... what common setting is there in OS X that has the potential to lead ... where I talked about an OS X bug. ... There are two general types of PCs: Macs and PCs ...
    (comp.sys.mac.advocacy)
  • Re: Bug/Gross InEfficiency in HeathFields fgetline program
    ... looking for a clueless in security, unable to identify *common* errors. ... the following bug is far more common than strncpy: ... The bug here is in failing to allocate *any storage at all* for t. ... So ban pointers. ...
    (comp.lang.c)