From: Sean Christopherson <sean.j.christopherson@intel.com>
To: stable@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ben Hutchings <ben.hutchings@codethink.co.uk>,
Sasha Levin <sashal@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
linux-kernel@vger.kernel.org,
Tobias Urdin <tobias.urdin@binero.com>
Subject: [PATCH 4.19 STABLE 0/2] KVM: VMX: Fix null pointer dereference
Date: Mon, 4 May 2020 18:23:46 -0700 [thread overview]
Message-ID: <20200505012348.17099-1-sean.j.christopherson@intel.com> (raw)
A simple fix for a null pointer dereference in vmx_vcpu_run() with an
ugly-but-safe prereq patch.
The fix also has a wart/hack where it marks RSP as clobbered using
ASM_CALL_CONSTRAINT to workaround an issue where the VM-Exit label isn't
found by _something_ during modpost. I vaguely recall seeing the same
issue when I first worked on this code a few years back. I think it was
objtool that was confused, but I can't remember the details for the life
of me. I don't have more cycles to throw at deciphering the thing, and
marking RSP as clobbered is safe, so I went with the hack.
Alternatively, reverting the offending commit (added in v4.19.119) would
fix the immediate issue, but RDX and RSI technically need to be marked as
clobbered even though it's extremely unlikely the compiler will consume
their bad value. All of the above ugliness seems preferable to leaving a
known bug in place.
Sean Christopherson (2):
KVM: VMX: Explicitly reference RCX as the vmx_vcpu pointer in asm
blobs
KVM: VMX: Mark RCX, RDX and RSI as clobbered in vmx_vcpu_run()'s asm
blob
arch/x86/kvm/vmx.c | 89 +++++++++++++++++++++++++---------------------
1 file changed, 49 insertions(+), 40 deletions(-)
--
2.26.0
next reply other threads:[~2020-05-05 1:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 1:23 Sean Christopherson [this message]
2020-05-05 1:23 ` [PATCH 4.19 STABLE 1/2] KVM: VMX: Explicitly reference RCX as the vmx_vcpu pointer in asm blobs Sean Christopherson
2020-05-05 1:23 ` [PATCH 4.19 STABLE 2/2] KVM: VMX: Mark RCX, RDX and RSI as clobbered in vmx_vcpu_run()'s asm blob Sean Christopherson
2020-05-05 6:15 ` Greg Kroah-Hartman
2020-05-05 6:27 ` Sean Christopherson
2020-05-05 7:02 ` Greg Kroah-Hartman
2020-05-05 14:37 ` Sean Christopherson
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=20200505012348.17099-1-sean.j.christopherson@intel.com \
--to=sean.j.christopherson@intel.com \
--cc=ben.hutchings@codethink.co.uk \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tobias.urdin@binero.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®