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: <YqIPYP0gKIoU7JLG@google.com>
Date:   Thu, 9 Jun 2022 15:18:56 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Andrew Jones <drjones@...hat.com>
Cc:     Marc Zyngier <maz@...nel.org>, Paolo Bonzini <pbonzini@...hat.com>,
        kvm@...r.kernel.org, Vitaly Kuznetsov <vkuznets@...hat.com>,
        David Matlack <dmatlack@...gle.com>,
        Ben Gardon <bgardon@...gle.com>,
        Oliver Upton <oupton@...gle.com>, linux-kernel@...r.kernel.org,
        anup@...infault.org, Raghavendra Rao Ananta <rananta@...gle.com>,
        eric.auger@...hat.com
Subject: Re: [PATCH v2 000/144] KVM: selftests: Overhaul APIs, purge VCPU_ID

On Thu, Jun 09, 2022, Andrew Jones wrote:
> On Wed, Jun 08, 2022 at 11:20:06PM +0000, Sean Christopherson wrote:
> > diff --git a/tools/testing/selftests/kvm/aarch64/get-reg-list.c b/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> > index b3116c151d1c..17f7ef975d5c 100644
> > --- a/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> > +++ b/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> > @@ -419,7 +419,7 @@ static void run_test(struct vcpu_config *c)
> > 
> >         check_supported(c);
> > 
> > -       vm = vm_create_barebones();
> > +       vm = vm_create(1);
> 
> Hmm, looks like something, somewhere for AArch64 needs improving to avoid
> strangeness like this. I'll look into it after we get this series merged.

Huh, you're right, that is odd.  Ah, duh, aarch64_vcpu_add() allocates a stack
for the vCPU, and that will fail if there's no memslot from which to allocate
guest memory.

So, this is my goof in

  KVM: selftests: Rename vm_create() => vm_create_barebones(), drop param

get-reg-list should first be converted to vm_create_without_vcpus().  I'll also
add a comment explaining that vm_create_barebones() can be used with __vm_vcpu_add(),
but not the "full" vm_vcpu_add() or vm_arch_vcpu_add() variants.

> >         prepare_vcpu_init(c, &init);
> >         vcpu = aarch64_vcpu_add(vm, 0, &init, NULL);
> >         finalize_vcpu(vcpu, c);
> > 
> 
> Thanks,
> drew
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ