lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aD9GPPz9U5JU89b-@google.com>
Date: Tue, 3 Jun 2025 12:00:12 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: James Houghton <jthoughton@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Alexander Potapenko <glider@...gle.com>, Peter Gonda <pgonda@...gle.com>, 
	Tom Lendacky <thomas.lendacky@....com>
Subject: Re: [PATCH 1/2] KVM: SVM: Reject SEV{-ES} intra host migration if
 vCPU creation is in-flight

On Tue, Jun 03, 2025, James Houghton wrote:
> On Mon, Jun 2, 2025 at 3:45 PM Sean Christopherson <seanjc@...gle.com> wrote:
> > ---
> >  arch/x86/kvm/svm/sev.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
> > index a7a7dc507336..93d899454535 100644
> > --- a/arch/x86/kvm/svm/sev.c
> > +++ b/arch/x86/kvm/svm/sev.c
> > @@ -2032,6 +2032,10 @@ static int sev_check_source_vcpus(struct kvm *dst, struct kvm *src)
> >         struct kvm_vcpu *src_vcpu;
> >         unsigned long i;
> >
> > +       if (src->created_vcpus != atomic_read(&src->online_vcpus) ||
> > +           dst->created_vcpus != atomic_read(&dst->online_vcpus))
> > +               return -EINVAL;
> 
> I think -EBUSY (or perhaps -EAGAIN) might be a more proper return code.

Yeah, I was 50/50 on EBUSY vs EINVAL.  I think I went with EINVAL mostly out of
spite :-)

I'll change it to EBUSY.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ