[linux] 01/01: [x86] KVM: svm: Restore #BP handler, mistakenly removed in 3.2.73-1

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Fri Nov 27 16:26:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch wheezy
in repository linux.

commit b8a03d029a2f9972c47f254da6aed6fa2f4d3e27
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Fri Nov 27 16:25:45 2015 +0000

    [x86] KVM: svm: Restore #BP handler, mistakenly removed in 3.2.73-1
    
    Replace my first backport of the fix for CVE-2015-8104 with the
    version that went into 3.2.74.
---
 debian/changelog                                   |  6 +++
 .../x86/kvm-svm-unconditionally-intercept-db.patch | 45 ++++++++++------------
 2 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2e07377..bf2fa06 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+linux (3.2.73-3) UNRELEASED; urgency=medium
+
+  * [x86] KVM: svm: Restore #BP handler, mistakenly removed in 3.2.73-1
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Fri, 27 Nov 2015 16:23:11 +0000
+
 linux (3.2.73-2) wheezy; urgency=medium
 
   * splice: sendfile() at once fails for big files (Closes: #785189)
diff --git a/debian/patches/bugfix/x86/kvm-svm-unconditionally-intercept-db.patch b/debian/patches/bugfix/x86/kvm-svm-unconditionally-intercept-db.patch
index ba38dc7..e2f9647 100644
--- a/debian/patches/bugfix/x86/kvm-svm-unconditionally-intercept-db.patch
+++ b/debian/patches/bugfix/x86/kvm-svm-unconditionally-intercept-db.patch
@@ -10,11 +10,11 @@ VMX is not affected: because it does not save DR6 in the VMCS,
 it already intercepts #DB unconditionally.
 
 Reported-by: Jan Beulich <jbeulich at suse.com>
-Cc: stable at vger.kernel.org
 Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
-[bwh: Backported to 3.2: #DB and #BP did not share a function, and there is
- no operation pointer referring to it, so remove update_db_intercept()
- entirely]
+[bwh: Backported to 3.2, with thanks to Paolo:
+ - update_db_bp_intercept() was called update_db_intercept()
+ - The remaining call is in svm_guest_debug() rather than through svm_x86_ops]
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
 ---
  arch/x86/kvm/svm.c | 14 +++-----------
  1 file changed, 3 insertions(+), 11 deletions(-)
@@ -29,43 +29,38 @@ Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
  
  	set_intercept(svm, INTERCEPT_INTR);
  	set_intercept(svm, INTERCEPT_NMI);
-@@ -1550,26 +1551,6 @@ static void svm_set_segment(struct kvm_v
+@@ -1550,20 +1551,13 @@ static void svm_set_segment(struct kvm_v
  	mark_dirty(svm->vmcb, VMCB_SEG);
  }
  
 -static void update_db_intercept(struct kvm_vcpu *vcpu)
--{
--	struct vcpu_svm *svm = to_svm(vcpu);
--
++static void update_bp_intercept(struct kvm_vcpu *vcpu)
+ {
+ 	struct vcpu_svm *svm = to_svm(vcpu);
+ 
 -	clr_exception_intercept(svm, DB_VECTOR);
--	clr_exception_intercept(svm, BP_VECTOR);
--
+ 	clr_exception_intercept(svm, BP_VECTOR);
+ 
 -	if (svm->nmi_singlestep)
 -		set_exception_intercept(svm, DB_VECTOR);
 -
--	if (vcpu->guest_debug & KVM_GUESTDBG_ENABLE) {
+ 	if (vcpu->guest_debug & KVM_GUESTDBG_ENABLE) {
 -		if (vcpu->guest_debug &
 -		    (KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP))
 -			set_exception_intercept(svm, DB_VECTOR);
--		if (vcpu->guest_debug & KVM_GUESTDBG_USE_SW_BP)
--			set_exception_intercept(svm, BP_VECTOR);
--	} else
--		vcpu->guest_debug = 0;
--}
--
- static void svm_guest_debug(struct kvm_vcpu *vcpu, struct kvm_guest_debug *dbg)
- {
- 	struct vcpu_svm *svm = to_svm(vcpu);
-@@ -1580,8 +1561,6 @@ static void svm_guest_debug(struct kvm_v
- 		svm->vmcb->save.dr7 = vcpu->arch.dr7;
+ 		if (vcpu->guest_debug & KVM_GUESTDBG_USE_SW_BP)
+ 			set_exception_intercept(svm, BP_VECTOR);
+ 	} else
+@@ -1581,7 +1575,7 @@ static void svm_guest_debug(struct kvm_v
  
  	mark_dirty(svm->vmcb, VMCB_DR);
--
+ 
 -	update_db_intercept(vcpu);
++	update_bp_intercept(vcpu);
  }
  
  static void new_asid(struct vcpu_svm *svm, struct svm_cpu_data *sd)
-@@ -1655,7 +1634,6 @@ static int db_interception(struct vcpu_s
+@@ -1655,7 +1649,6 @@ static int db_interception(struct vcpu_s
  		if (!(svm->vcpu.guest_debug & KVM_GUESTDBG_SINGLESTEP))
  			svm->vmcb->save.rflags &=
  				~(X86_EFLAGS_TF | X86_EFLAGS_RF);
@@ -73,7 +68,7 @@ Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
  	}
  
  	if (svm->vcpu.guest_debug &
-@@ -3557,7 +3535,6 @@ static void enable_nmi_window(struct kvm
+@@ -3557,7 +3550,6 @@ static void enable_nmi_window(struct kvm
  	 */
  	svm->nmi_singlestep = true;
  	svm->vmcb->save.rflags |= (X86_EFLAGS_TF | X86_EFLAGS_RF);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list