All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Eugene Korenevsky" <ekorenevsky@gmail.com>,
	"Jan Kiszka" <jan.kiszka@web.de>, "Bandan Das" <bsd@redhat.com>,
	kvm@vger.kernel.org, "Radim Krčmář" <rkrcmar@redhat.com>,
	"Wanpeng Li" <wanpeng.li@linux.intel.com>
Subject: Re: nVMX MSR load/store feature
Date: Mon, 15 Dec 2014 13:10:44 +0100	[thread overview]
Message-ID: <548ECFC4.2000607@redhat.com> (raw)
In-Reply-To: <CAJC2YLa3bdQg4sJFuvX4NjSBT_q1hrx-q8W5kjc9gKBeE6ZwzA@mail.gmail.com>



On 14/12/2014 02:17, Eugene Korenevsky wrote:
> Hi there,
> 
> Please DO NOT take v3 version of patchset in account. It contains bug
> (missing check for MSR load/store area size in
> `nested_vmx_check_msr_switch`). This bug has been fixed in v4 version
> of patchset.

The diff is just

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index d6fe958a0403..09ccf6c09435 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -8305,6 +8305,8 @@ static int nested_vmx_check_msr_switch(struct kvm_vcpu *vcpu,
 		WARN_ON(1);
 		return -EINVAL;
 	}
+	if (count == 0)
+		return 0;
 	if (!IS_ALIGNED(addr, 16) || addr >> maxphyaddr ||
 	    (addr + count * sizeof(struct vmx_msr_entry) - 1) >> maxphyaddr) {
 		pr_warn_ratelimited(

right?

Paolo

  parent reply	other threads:[~2014-12-15 12:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-14  1:17 nVMX MSR load/store feature Eugene Korenevsky
2014-12-14  9:51 ` Paolo Bonzini
2014-12-15 12:10 ` Paolo Bonzini [this message]
2014-12-15 13:59   ` Eugene Korenevsky
2014-12-15 14:08     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=548ECFC4.2000607@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bsd@redhat.com \
    --cc=ekorenevsky@gmail.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=wanpeng.li@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.