]> git.baikalelectronics.ru Git - kernel.git/commit
lguest: fix guest crash on non-linear addresses in gdt pvops
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 20 Apr 2009 05:14:00 +0000 (23:14 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Sun, 19 Apr 2009 13:44:01 +0000 (23:14 +0930)
commitd47bce099f4e55d520399c267aeb7a6a0eaf97a2
tree560bd8c56524b658eb0b46e03ef42e262eb5f9b7
parent9a77b3177ad764b50ab6a19132f208b55c23520a
lguest: fix guest crash on non-linear addresses in gdt pvops

Fixes guest crash 'lguest: bad read address 0x4800000 len 256'

The new per-cpu allocator ends up handing a non-linear address to
write_gdt_entry.  We do __pa() on it, and hand it to the host, which
kills us.

I've long wanted to make the hypercall "LOAD_GDT_ENTRY" to match the IDT
code, but had no pressing reason until now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: lguest@ozlabs.org
arch/x86/include/asm/lguest_hcall.h
arch/x86/lguest/boot.c
drivers/lguest/lg.h
drivers/lguest/segments.c
drivers/lguest/x86/core.c