[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210611072312.GE23016@gondor.apana.org.au>
Date: Fri, 11 Jun 2021 15:23:12 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: linux-crypto@...r.kernel.org,
"Jason A . Donenfeld" <Jason@...c4.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] crypto: x86/curve25519 - fix cpu feature checking logic
in mod_exit
On Thu, Jun 03, 2021 at 01:53:40AM -0400, Hangbin Liu wrote:
> In curve25519_mod_init() the curve25519_alg will be registered only when
> (X86_FEATURE_BMI2 && X86_FEATURE_ADX). But in curve25519_mod_exit()
> it still checks (X86_FEATURE_BMI2 || X86_FEATURE_ADX) when do crypto
> unregister. This will trigger a BUG_ON in crypto_unregister_alg() as
> alg->cra_refcnt is 0 if the cpu only supports one of X86_FEATURE_BMI2
> and X86_FEATURE_ADX.
>
> Fixes: 07b586fe0662 ("crypto: x86/curve25519 - replace with formally verified implementation")
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> ---
> arch/x86/crypto/curve25519-x86_64.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists