From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: Nicholas Piggin <npiggin@gmail.com>,
linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, Yosry Ahmed <yosry@kernel.org>
Subject: Re: [PATCH 0/6] KVM: Harden kvm_vcpu_map() usage against memory leaks
Date: Fri, 31 Jul 2026 13:09:52 -0700 [thread overview]
Message-ID: <178552810478.2701886.12087185654970147716.b4-ty@google.com> (raw)
In-Reply-To: <20260724004757.131420-1-seanjc@google.com>
On Thu, 23 Jul 2026 17:47:51 -0700, Sean Christopherson wrote:
> Harden kvm_vcpu_map() usage against memory leaks by yelling if there's already
> a valid mapping, and then unmapping the existing mapping before establishing a
> new one. To get there, add a CLASS() for local, on-stack usage, to guarantee
> the map metadata is zero-initialized (well, so long as the CLASS() is used).
>
> Prompted by 2f2312c422fd ("KVM: nVMX: Put vmcs12 pages if nested VM-Enter fails
> due to invalid guest state").
>
> [...]
Applied to kvm-x86 misc, thanks!
[1/6] KVM: nVMX: Ensure KVM_REQ_GET_NESTED_STATE_PAGES is cleared on VM-Exit
https://github.com/kvm-x86/linux/commit/11722439fb20
[2/6] KVM: nSVM: Add CLASS()es for automagically handling local kvm_vcpu_map() usage
https://github.com/kvm-x86/linux/commit/d196e4d91e78
[3/6] KVM: nSVM: Use CLASS(kvm_vcpu_map_local) for SMM VMCB mappings
https://github.com/kvm-x86/linux/commit/b717245a7b08
[4/6] KVM: nVMX: Use CLASS(kvm_vcpu_map_local_readonly) for MSR bitmap merging
https://github.com/kvm-x86/linux/commit/6bb3493175d8
[5/6] KVM: PPC: Use CLASS(kvm_vcpu_map_local_readonly) for patching dcbz
https://github.com/kvm-x86/linux/commit/e060b94a1cd4
[6/6] KVM: Harden kvm_vcpu_map() against double-mapping and thus leaking references
https://github.com/kvm-x86/linux/commit/e186d4e34ad5
--
https://github.com/kvm-x86/linux/tree/next
prev parent reply other threads:[~2026-07-31 20:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 0:47 [PATCH 0/6] KVM: Harden kvm_vcpu_map() usage against memory leaks Sean Christopherson
2026-07-24 0:47 ` [PATCH 1/6] KVM: nVMX: Ensure KVM_REQ_GET_NESTED_STATE_PAGES is cleared on VM-Exit Sean Christopherson
2026-07-27 16:51 ` Yosry Ahmed
2026-07-24 0:47 ` [PATCH 2/6] KVM: nSVM: Add CLASS()es for automagically handling local kvm_vcpu_map() usage Sean Christopherson
2026-07-24 0:47 ` [PATCH 3/6] KVM: nSVM: Use CLASS(kvm_vcpu_map_local) for SMM VMCB mappings Sean Christopherson
2026-07-24 0:47 ` [PATCH 4/6] KVM: nVMX: Use CLASS(kvm_vcpu_map_local_readonly) for MSR bitmap merging Sean Christopherson
2026-07-24 0:47 ` [PATCH 5/6] KVM: PPC: Use CLASS(kvm_vcpu_map_local_readonly) for patching dcbz Sean Christopherson
2026-07-24 0:47 ` [PATCH 6/6] KVM: Harden kvm_vcpu_map() against double-mapping and thus leaking references Sean Christopherson
2026-07-31 20:09 ` 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=178552810478.2701886.12087185654970147716.b4-ty@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=pbonzini@redhat.com \
--cc=yosry@kernel.org \
/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