]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: SEV: WARN if KVM attempts to setup scratch area with min_len==0
authorSean Christopherson <seanjc@google.com>
Fri, 1 May 2026 20:22:32 +0000 (13:22 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 May 2026 18:25:28 +0000 (20:25 +0200)
commitf185e05dce6f170f83c4ba602e969b1c3c7a22e6
tree40e9fcedabd9b1d4ca00d8a678555000cfca7245
parent5867d7e202e09f037cefe77f7af4413c7c0fa088
KVM: SEV: WARN if KVM attempts to setup scratch area with min_len==0

Now that all paths in KVM properly validate the length needed for the
scratch area, and are guaranteed to pass in a non-zero length, WARN if KVM
attempts to configured the scratch area with min_len==0 to guard against
future bugs.

Cc: stable@vger.kernel.org
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20260501202250.2115252-8-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c