Re: [PATCH v2 0/2] KVM: x86: gmem populate fix and cleanups

Sean Christopherson <[email protected]>
Newsgroups dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, 30 Jun 2026 14:37:09 -0700, Sean Christopherson wrote:
> Fix a user-triggerable WARN due to KVM not pre-checking that userspace
> provided a source page for non-ZERO pages for SNP_LAUNCH_UPDATE, and then
> clean up the equivalent TDX code to also explicitly check the incoming
> source page *before* calling into guest_memfd, and to return -EINVAL, not
> -EOPNOTSUPP.
> 
> v2:
>  - Rewrite the SNP patch changelog.
>  - Tweak the code to avoid checking KVM_SEV_SNP_PAGE_TYPE_ZERO twice.
>  - Drop what is now effectively a sanity check in sev_gmem_post_populate(),
>    so that we don't have to duplicate the logic when in-place conversion comes
>    along.
>  - Tack on the TDX change.
> 
> [...]

Applied to kvm-x86 misc, thanks!

[1/2] KVM: SEV: Explicitly disallow NULL user address for SNP_LAUNCH_UPDATE
      https://github.com/kvm-x86/linux/commit/2abe1ff20151
[2/2] KVM: TDX: Return EINVAL, not EOPNOTSUPP, for NULL INIT_MEM_REGION source
      https://github.com/kvm-x86/linux/commit/eb606a243863

--
https://github.com/kvm-x86/linux/tree/next
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.