linux-kernel-test/arch/x86/kvm
Xiao Guangrong 36a2e6774b KVM: MMU: fix writable sync sp mapping
While we sync many unsync sp at one time(in mmu_sync_children()),
we may mapping the spte writable, it's dangerous, if one unsync
sp's mapping gfn is another unsync page's gfn.

For example:

SP1.pte[0] = P
SP2.gfn's pfn = P
[SP1.pte[0] = SP2.gfn's pfn]

First, we write protected SP1 and SP2, but SP1 and SP2 are still the
unsync sp.

Then, sync SP1 first, it will detect SP1.pte[0].gfn only has one unsync-sp,
that is SP2, so it will mapping it writable, but we plan to sync SP2 soon,
at this point, the SP2->unsync is not reliable since later we sync SP2 but
SP2->gfn is already writable.

So the final result is: SP2 is the sync page but SP2.gfn is writable.

This bug will corrupt guest's page table, fixed by mark read-only mapping
if the mapped gfn has shadow pages.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-08-01 10:47:22 +03:00
..
emulate.c KVM: VMX: Execute WBINVD to keep data consistency with assigned devices 2010-08-01 10:47:21 +03:00
i8254.c KVM: x86: Introduce a workqueue to deliver PIT timer interrupts 2010-08-01 10:46:49 +03:00
i8254.h KVM: x86: Introduce a workqueue to deliver PIT timer interrupts 2010-08-01 10:46:49 +03:00
i8259.c KVM: Search the LAPIC's for one that will accept a PIC interrupt 2010-08-01 10:47:17 +03:00
irq.c KVM: x86: Introduce a workqueue to deliver PIT timer interrupts 2010-08-01 10:46:49 +03:00
irq.h KVM: i8259: reduce excessive abstraction for pic_irq_request() 2010-08-01 10:47:03 +03:00
Kconfig Merge branch 'kvm-updates/2.6.34' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2010-03-05 13:12:34 -08:00
kvm_cache_regs.h KVM: VMX: Enable XSAVE/XRSTOR for guest 2010-08-01 10:46:31 +03:00
kvm_timer.h KVM: arch/x86/kvm/kvm_timer.h checkpatch cleanup 2010-05-17 12:14:42 +03:00
lapic.c KVM: Add mini-API for vcpu->requests 2010-08-01 10:47:05 +03:00
lapic.h KVM: Add HYPER-V apic access MSRs 2010-03-01 12:36:00 -03:00
Makefile KVM: Move assigned device code to own file 2009-12-03 09:32:09 +02:00
mmu.c KVM: MMU: fix writable sync sp mapping 2010-08-01 10:47:22 +03:00
mmu.h KVM: x86 emulator: fix memory access during x86 emulation 2010-03-01 12:36:11 -03:00
mmutrace.h KVM: MMU: split the operations of kvm_mmu_zap_page() 2010-08-01 10:39:27 +03:00
paging_tmpl.h KVM: Remove memory alias support 2010-08-01 10:47:00 +03:00
svm.c KVM: VMX: Execute WBINVD to keep data consistency with assigned devices 2010-08-01 10:47:21 +03:00
timer.c KVM: Add mini-API for vcpu->requests 2010-08-01 10:47:05 +03:00
trace.h KVM: Trace emulated instructions 2010-05-17 12:17:35 +03:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c KVM: VMX: Execute WBINVD to keep data consistency with assigned devices 2010-08-01 10:47:21 +03:00
x86.c KVM: VMX: Execute WBINVD to keep data consistency with assigned devices 2010-08-01 10:47:21 +03:00
x86.h KVM: Remove memory alias support 2010-08-01 10:47:00 +03:00