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]
Date:   Thu, 9 Jun 2022 15:26:42 +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 048/144] KVM: selftests: Rename 'struct vcpu' to
 'struct kvm_vcpu'

On Thu, Jun 09, 2022, Andrew Jones wrote:
> On Wed, Jun 08, 2022 at 04:01:38PM +0000, Sean Christopherson wrote:
> > On Wed, Jun 08, 2022, Andrew Jones wrote:
> > > If we do need prefixes for the kvm selftest framework code to avoid
> > > collisions with test code, then maybe we should invent something else, rather
> > > than use the somewhat ambiguous 'kvm', which could also collide with stuff in
> > > the kvm uapi.
> > 
> > Potential collisions with the KVM uAPI is a feature of sorts, e.g. tests shouldn't
> > be redefining kvm_* structures (I'd prefer _tests_ not use kvm_* at all, and only
> > use kvm_* in the library), and I gotta imagine KVM would break at least one real
> > world userspace if it defined "kvm_vcpu".
> > 
> > That said, I don't have a super strong preference for kvm_ versus something else,
> > though I think it will be difficult to come up with something that's unique,
> > intuitive, and doesn't look like a typo.
> >
> 
> Maybe just abbreviated "Kvm Selftests", i.e. 'ks_'? I won't harp on this
> any longer though, so if that doesn't look good, then we can proceed with
> 'kvm_'.

ks_ was the best I could come up with too.  But looking at it in code, I find it
more distracting than helpful.  It's kind of like the uncanny valley effect, where
ks_ *just* close enough to kvm_ that it makes me think something is wrong.

	struct kvm_sregs sregs;
	struct kvm_regs regs;
	struct ks_vcpu *vcpu;
	struct kvm_run *run;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ