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: <YqDKq2epCx6gno0c@google.com>
Date:   Wed, 8 Jun 2022 16:13:31 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Andrew Jones <drjones@...hat.com>
Cc:     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
Subject: Re: [PATCH v2 045/144] KVM: selftests: Make vm_create() a wrapper
 that specifies VM_MODE_DEFAULT

On Wed, Jun 08, 2022, Andrew Jones wrote:
> On Fri, Jun 03, 2022 at 12:41:52AM +0000, Sean Christopherson wrote:
> ...
> > +/*
> > + * ____vm_create() does KVM_CREATE_VM and little else.  __vm_create() also
> > + * loads the test binary into guest memory and creates an IRQ chip (x86 only).
> > + */
> > +struct kvm_vm *____vm_create(enum vm_guest_mode mode, uint64_t nr_pages);
> > +struct kvm_vm *__vm_create(enum vm_guest_mode mode, uint64_t nr_pages);
> > +
> >  static inline struct kvm_vm *vm_create_barebones(void)
> >  {
> > -	return __vm_create(VM_MODE_DEFAULT, 0);
> > +	return ____vm_create(VM_MODE_DEFAULT, 0);
> > +}
> > +
> 
> I don't [overly] mind the "____helperhelper" naming style, but in this
> case wouldn't __vm_create_barebones() also be a reasonable name?

I don't love the four underscores, but I want to use the "barebones" name only for
cases where the intent is to truly create a barebones VM, i.e. I want to avoid the
common path taking a dependency on "barebones".

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ