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: <87h68jclre.fsf@mpe.ellerman.id.au>
Date: Thu, 07 Nov 2024 22:43:17 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Michal Suchanek <msuchanek@...e.de>, linuxppc-dev@...ts.ozlabs.org,
 Herbert Xu <herbert@...dor.apana.org.au>
Cc: Michal Suchanek <msuchanek@...e.de>, "David S. Miller"
 <davem@...emloft.net>, Nicholas Piggin <npiggin@...il.com>, Christophe
 Leroy <christophe.leroy@...roup.eu>, Naveen N Rao <naveen@...nel.org>,
 Madhavan Srinivasan <maddy@...ux.ibm.com>, Danny Tsen
 <dtsen@...ux.ibm.com>, linux-crypto@...r.kernel.org,
 linux-kernel@...r.kernel.org, Nicolai Stange <nstange@...e.com>
Subject: Re: [PATCH] aes-gcm-p10: Use the correct bit to test for P10

Michal Suchanek <msuchanek@...e.de> writes:
> A hwcap feature bit is passed to cpu_has_feature, resulting in testing
> for CPU_FTR_MMCRA instead of the 3.1 platform revision.

Ouch. Good find.

Notably all IBM Power CPUs have MMCRA set, so the feature test is
essentially a nop.

> Fixes: c954b252dee9 ("crypto: powerpc/p10-aes-gcm - Register modules as SIMD")

^ which is only in linux-next so no stable tag needed.

> Reported-by: Nicolai Stange <nstange@...e.com>
> Signed-off-by: Michal Suchanek <msuchanek@...e.de>
> ---
>  arch/powerpc/crypto/aes-gcm-p10-glue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Michael Ellerman <mpe@...erman.id.au> (powerpc)

cheers

> diff --git a/arch/powerpc/crypto/aes-gcm-p10-glue.c b/arch/powerpc/crypto/aes-gcm-p10-glue.c
> index e52629334cf8..1f8b67775658 100644
> --- a/arch/powerpc/crypto/aes-gcm-p10-glue.c
> +++ b/arch/powerpc/crypto/aes-gcm-p10-glue.c
> @@ -414,7 +414,7 @@ static int __init p10_init(void)
>  {
>  	int ret;
>  
> -	if (!cpu_has_feature(PPC_FEATURE2_ARCH_3_1))
> +	if (!cpu_has_feature(CPU_FTR_ARCH_31))
>  		return 0;
>  
>  	ret = simd_register_aeads_compat(gcm_aes_algs,
> -- 
> 2.46.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ