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/lg.h | |
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/lg.h')
-rw-r--r-- | drivers/lguest/lg.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index ac8a4a3741b8..af92a176697f 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h | |||
@@ -158,7 +158,8 @@ void free_interrupts(void); | |||
158 | /* segments.c: */ | 158 | /* segments.c: */ |
159 | void setup_default_gdt_entries(struct lguest_ro_state *state); | 159 | void setup_default_gdt_entries(struct lguest_ro_state *state); |
160 | void setup_guest_gdt(struct lg_cpu *cpu); | 160 | void setup_guest_gdt(struct lg_cpu *cpu); |
161 | void load_guest_gdt(struct lg_cpu *cpu, unsigned long table, u32 num); | 161 | void load_guest_gdt_entry(struct lg_cpu *cpu, unsigned int i, |
162 | u32 low, u32 hi); | ||
162 | void guest_load_tls(struct lg_cpu *cpu, unsigned long tls_array); | 163 | void guest_load_tls(struct lg_cpu *cpu, unsigned long tls_array); |
163 | void copy_gdt(const struct lg_cpu *cpu, struct desc_struct *gdt); | 164 | void copy_gdt(const struct lg_cpu *cpu, struct desc_struct *gdt); |
164 | void copy_gdt_tls(const struct lg_cpu *cpu, struct desc_struct *gdt); | 165 | void copy_gdt_tls(const struct lg_cpu *cpu, struct desc_struct *gdt); |