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: <564C627C.5030904@redhat.com>
Date:	Wed, 18 Nov 2015 12:35:24 +0100
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Borislav Petkov <bp@...en8.de>
Cc:	LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
	KVM <kvm@...r.kernel.org>
Subject: Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping
 calculation



On 18/11/2015 12:28, Borislav Petkov wrote:
>> On 14/11/2015 11:37, Borislav Petkov wrote:
>>> > >  	vendor = x86_vendor();
>>> > > -	family = x86_family();
>>> > > +	family = x86_family_cpuid();
>> > 
>> > What about renaming x86_vendor() so that this looks like
>> > 
>> > -	vendor = x86_vendor();
>> > -	family = x86_family();
>> > +	vendor = x86_cpuid_vendor();
>> > +	family = x86_cpuid_family();
> 
> The idea is that x86_family_cpuid() gives the family *after* having
> executed CPUID while x86_family() only computes the family from a
> supplied CPUID_1_EAX. I.e., the last saves us the CPUID call.

Yes, exactly.  I'm suggesting that the same applies to x86_vendor().  I
also prefer x86_cpuid_* to x86_*_cpuid because, once you add two
functions in the same family it's nice that they share a prefix.

Paolo

> Hmm, maybe I should make that more clear ...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ