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: <d6680add-f4d2-4d65-a711-3f80bfd43f6d@intel.com>
Date: Fri, 6 Dec 2024 15:01:30 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>, linux-kernel@...r.kernel.org,
 x86@...nel.org, tglx@...utronix.de, rafael@...nel.org, lenb@...nel.org
Subject: Re: [PATCH 11/11] x86/cpu: Make all all CPUID leaf names consistent

On 11/29/24 10:27, Borislav Petkov wrote:
> Well, enum cpuid_leafs as it is now is the *indices* into the cap flags array:
> 
> struct cpuinfo_x86 {
> 
> 	...
> 
> 	__u32           x86_capability[NCAPINTS + NBUGINTS];
> 
> And having a "CPUID_" prefixed thing and a "CPUID_LEAF_" prefixed other thing
> is going to cause confusion.
> 
> And renaming enum cpuid_leafs is going to cause a massive churn...

Wait a sec though:

$ git grep 'enum cpuid_leafs' arch/x86/
arch/x86/include/asm/cpufeature.h:enum cpuid_leafs
arch/x86/kvm/cpuid.c:static __always_inline void kvm_cpu_cap_mask(enum
cpuid_leafs leaf, u32 mask)

So there is only one direct reference to the type.

I think all it will take to rename the _type_ is something like the
attached. Also, I think the new name 'x86_capability_words' and variable
'cap_nr' make the KVM site a lot more readable.

Thoughts?
View attachment "rename-cpuid_leafs.patch" of type "text/x-patch" (1369 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ