]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jun 2015 07:27:15 +0000 (16:27 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jun 2015 07:27:15 +0000 (16:27 +0900)
added patches:
kvm-mmu-fix-cr4.smep-1-cr0.wp-0-with-shadow-pages.patch

queue-3.10/kvm-mmu-fix-cr4.smep-1-cr0.wp-0-with-shadow-pages.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/kvm-mmu-fix-cr4.smep-1-cr0.wp-0-with-shadow-pages.patch b/queue-3.10/kvm-mmu-fix-cr4.smep-1-cr0.wp-0-with-shadow-pages.patch
new file mode 100644 (file)
index 0000000..a94dad3
--- /dev/null
@@ -0,0 +1,32 @@
+From 898761158be7682082955e3efa4ad24725305fc7 Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <pbonzini@redhat.com>
+Date: Thu, 2 Apr 2015 11:04:05 +0200
+Subject: KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages
+
+From: Paolo Bonzini <pbonzini@redhat.com>
+
+commit 898761158be7682082955e3efa4ad24725305fc7 upstream.
+
+smep_andnot_wp is initialized in kvm_init_shadow_mmu and shadow pages
+should not be reused for different values of it.  Thus, it has to be
+added to the mask in kvm_mmu_pte_write.
+
+Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kvm/mmu.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/kvm/mmu.c
++++ b/arch/x86/kvm/mmu.c
+@@ -3975,7 +3975,7 @@ void kvm_mmu_pte_write(struct kvm_vcpu *
+       ++vcpu->kvm->stat.mmu_pte_write;
+       kvm_mmu_audit(vcpu, AUDIT_PRE_PTE_WRITE);
+-      mask.cr0_wp = mask.cr4_pae = mask.nxe = 1;
++      mask.cr0_wp = mask.cr4_pae = mask.nxe = mask.smep_andnot_wp = 1;
+       for_each_gfn_indirect_valid_sp(vcpu->kvm, sp, gfn) {
+               if (detect_write_misaligned(sp, gpa, bytes) ||
+                     detect_write_flooding(sp)) {
index 04badf4c4d2e36556e6ae1cd9538ced48b8f2fd0..dd92501deb3cdb247a68fb39eb2b32477161798b 100644 (file)
@@ -5,3 +5,4 @@ staging-rtl8712-rtl8712-avoid-lots-of-build-warnings.patch
 staging-rtl8192e-llvmlinux-remove-unused-inline-prototype.patch
 kernel-use-the-gnu89-standard-explicitly.patch
 net-socket-fix-the-wrong-returns-for-recvmsg-and-sendmsg.patch
+kvm-mmu-fix-cr4.smep-1-cr0.wp-0-with-shadow-pages.patch