diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-04-20 01:14:00 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-04-19 09:44:01 -0400 |
commit | a489f0b555b753f9df8ddc24c7e74f657ef7ee7b (patch) | |
tree | 560bd8c56524b658eb0b46e03ef42e262eb5f9b7 /drivers/lguest/x86 | |
parent | 88df781afb788fa588dbf2e77f205214022a8893 (diff) |
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
Diffstat (limited to 'drivers/lguest/x86')
-rw-r--r-- | drivers/lguest/x86/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c index d6d7ac0982ab..1a83910f674f 100644 --- a/drivers/lguest/x86/core.c +++ b/drivers/lguest/x86/core.c | |||
@@ -568,8 +568,8 @@ void __exit lguest_arch_host_fini(void) | |||
568 | int lguest_arch_do_hcall(struct lg_cpu *cpu, struct hcall_args *args) | 568 | int lguest_arch_do_hcall(struct lg_cpu *cpu, struct hcall_args *args) |
569 | { | 569 | { |
570 | switch (args->arg0) { | 570 | switch (args->arg0) { |
571 | case LHCALL_LOAD_GDT: | 571 | case LHCALL_LOAD_GDT_ENTRY: |
572 | load_guest_gdt(cpu, args->arg1, args->arg2); | 572 | load_guest_gdt_entry(cpu, args->arg1, args->arg2, args->arg3); |
573 | break; | 573 | break; |
574 | case LHCALL_LOAD_IDT_ENTRY: | 574 | case LHCALL_LOAD_IDT_ENTRY: |
575 | load_guest_idt_entry(cpu, args->arg1, args->arg2, args->arg3); | 575 | load_guest_idt_entry(cpu, args->arg1, args->arg2, args->arg3); |