Skip to content

KVM: VMX: Fix null pointer dereference

Sean Christopherson lkml stable 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Document why there is no exact upstream commit for the fix, with

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: VMX: Explicitly reference RCX as the vmx_vcpu pointer in asm blobsarch/x86/kvm/vmx.c+47 -390 replies
2/2KVM: VMX: Mark RCX, RDX and RSI as clobbered in vmx_vcpu_run()'s asm blobarch/x86/kvm/vmx.c+3 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH 4.19 STABLE v2 0/2] KVM: VMX: Fix null pointer dereference

A simple fix for a null pointer dereference in vmx_vcpu_run() with an ugly-but-safe prereq patch.

The even uglier ASM_CALL_CONSTRAINT is gone in v2 as I finally figured out why vmx_return was undefined: GCC dropped the entire asm blob because all outputs were deemed unused.

v2:
- Document why there is no exact upstream commit for the fix, with

    --verbose. [Greg]

- Tag the asm blob as volatile and drop the ASM_CALL_CONSTRAINT hack.

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 | 91 +++++++++++++++++++++++++---------------------
 1 file changed, 50 insertions(+), 41 deletions(-)
Signature · 1 line
2.26.0