From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Eugene Korenevsky <ekorenevsky@gmail.com>,
kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v3 2/2] kvm: vmx: segment limit check: use access length
Date: Wed, 5 Jun 2019 13:27:47 -0700 [thread overview]
Message-ID: <20190605202746.GE26328@linux.intel.com> (raw)
In-Reply-To: <20190605200055.GA25739@dnote>
On Wed, Jun 05, 2019 at 11:00:55PM +0300, Eugene Korenevsky wrote:
> There is an imperfection in get_vmx_mem_address(): access length is ignored
> when checking the limit. To fix this, pass access length as a function argument.
> The access length is obvious since it is used by callers after
> get_vmx_mem_address() call.
>
> Note: both handle_vmread() and handle_vmwrite() should use is_long_mode()
> instead of is_64_bit_mode() because VMREAD/VMWRITE opcodes are invalid in
> compatibility mode and there is no any reason for extra checking CS.L.
>
> Signed-off-by: Eugene Korenevsky <ekorenevsky@gmail.com>
> ---
> Changes in v2 since v1: fixed logical bug (`len` argument was not used inside
> get_vmx_mem_address() function); fixed the subject
> Changes in v3 since v2: replace is_64_bit_mode() with is_long_mode() in
> handle_vmwrite()
Replacing is_64_bit_mode() with is_long_mode() in various functions
should be done as a preqreq patch, if only to explain in the changelog
that VMX instructions #UD in compatibility mode.
prev parent reply other threads:[~2019-06-05 20:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 20:00 [PATCH v3 2/2] kvm: vmx: segment limit check: use access length Eugene Korenevsky
2019-06-05 20:27 ` Sean Christopherson [this message]
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=20190605202746.GE26328@linux.intel.com \
--to=sean.j.christopherson@intel.com \
--cc=ekorenevsky@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.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.