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]
Date:   Mon, 20 Nov 2023 14:53:54 +0200
From:   Nikolay Borisov <nik.borisov@...e.com>
To:     Borislav Petkov <bp@...en8.de>, X86 ML <x86@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 07/13] x86/CPU/AMD: Move Zenbleed check to the Zen2 init
 function



On 20.11.23 г. 12:41 ч., Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <bp@...en8.de>
> 
> Prefix it properly so that it is clear which generation it is dealing
> with.
> 
> No functional changes.
> 
> Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
> ---
>   arch/x86/kernel/cpu/amd.c | 70 +++++++++++++++++----------------------
>   1 file changed, 30 insertions(+), 40 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
> index 8d90f5f6b0d9..7cbb108afaf4 100644
> --- a/arch/x86/kernel/cpu/amd.c
> +++ b/arch/x86/kernel/cpu/amd.c
> @@ -70,12 +70,6 @@ static const int amd_erratum_383[] =
>   static const int amd_erratum_1054[] =
>   	AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf));
>   
> -static const int amd_zenbleed[] =
> -	AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0x30, 0x0, 0x4f, 0xf),
> -			   AMD_MODEL_RANGE(0x17, 0x60, 0x0, 0x7f, 0xf),
> -			   AMD_MODEL_RANGE(0x17, 0x90, 0x0, 0x91, 0xf),
> -			   AMD_MODEL_RANGE(0x17, 0xa0, 0x0, 0xaf, 0xf));
> -
>   static const int amd_div0[] =
>   	AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0x00, 0x0, 0x2f, 0xf),
>   			   AMD_MODEL_RANGE(0x17, 0x50, 0x0, 0x5f, 0xf));
> @@ -1039,33 +1033,6 @@ static void init_amd_zen(struct cpuinfo_x86 *c)
>   
>   }
>   
> -static void init_amd_zen2(struct cpuinfo_x86 *c)
> -{
> -	init_amd_zen_common();
> -	init_spectral_chicken(c);
> -	fix_erratum_1386(c);
> -}
> -
> -static void init_amd_zen3(struct cpuinfo_x86 *c)
> -{
> -	init_amd_zen_common();
> -
> -	if (!cpu_has(c, X86_FEATURE_HYPERVISOR)) {
> -		/*
> -		 * Zen3 (Fam19 model < 0x10) parts are not susceptible to
> -		 * Branch Type Confusion, but predate the allocation of the
> -		 * BTC_NO bit.
> -		 */
> -		if (!cpu_has(c, X86_FEATURE_BTC_NO))
> -			set_cpu_cap(c, X86_FEATURE_BTC_NO);
> -	}
> -}
> -
> -static void init_amd_zen4(struct cpuinfo_x86 *c)
> -{
> -	init_amd_zen_common();
> -}

nit:  If you initially introduced the zen-specific functions right after 
zenbleed_check you would have avoided the function move in this patch 
which would have reduced the overall diff.

<snip>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ