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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <88cb44b0-62bd-e753-9aba-82502d162749@amd.com>
Date: Sat, 12 Jul 2025 09:54:20 -0500
From: Tom Lendacky <thomas.lendacky@....com>
To: Borislav Petkov <bp@...en8.de>
Cc: Ard Biesheuvel <ardb+git@...gle.com>, linux-kernel@...r.kernel.org,
 linux-efi@...r.kernel.org, x86@...nel.org, Ard Biesheuvel <ardb@...nel.org>,
 Ingo Molnar <mingo@...nel.org>, Dionna Amalie Glaze
 <dionnaglaze@...gle.com>, Kevin Loughlin <kevinloughlin@...gle.com>,
 Josh Poimboeuf <jpoimboe@...nel.org>, Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v4 01/24] x86/sev: Separate MSR and GHCB based snp_cpuid()
 via a callback

On 7/11/25 15:59, Borislav Petkov wrote:
> On Wed, Jul 09, 2025 at 10:12:48AM -0500, Tom Lendacky wrote:
>> Not sure the renaming makes it read any easier or say anything more. It
>> does add extra changes to the diff that have to be read through, though,
>> so I don't think it is beneficial.
> 
> So it really comes natural to split them into a msr_prot and a ghcb_prot
> variant. If we added a separate patch ontop that does only the renaming, then
> that would probably be more churn than necessary.

Right, they already are though:

  __sev_cpuid_hv_msr() and __sev_cpuid_hv_ghcb()

the first one meaning that the hypervisor is being called using the msr
protocol and the second one meaning that the hypervisor is being called
using the ghcb protocol.

That's why I made the comment. Just changing

  __sev_cpuid_hv_msr() to __sev_cpuid_msr_prot()

isn't saying anything more in my opinion.

Thanks,
Tom

> 
>> Maybe rename this parameter to snp_cpuid or snp_cpuid_fn or similar,
>> because it can be very confusing to see "cpuid" on its own like this.a
> 
> Yeah, that's a good point - snp_cpuid_fn clearly states that it is a function
> pointer and not *the* cpuid() function.
> 
> Thx.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ