Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH v2] crypto: arm64: use simd_skcipher_create() when registering aes internal algs
@ 2024-05-22  3:58 Liam Kearney
  2024-05-22  4:18 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Liam Kearney @ 2024-05-22  3:58 UTC (permalink / raw)
  To: gregkh; +Cc: Liam Kearney, Herbert Xu, stable

The arm64 crypto drivers duplicate driver names when adding simd
variants, which after backported commit 27016f75f5ed ("crypto: api -
Disallow identical driver names"), causes an error that leads to the
aes algs not being installed. On weaker processors this results in hangs
due to falling back to SW crypto.
Use simd_skcipher_create() as it will properly namespace the new algs.
This issue does not exist in mainline/latest (and stable v6.1+) as the
driver has been refactored to remove the simd algs from this code path.

Fixes: 27016f75f5ed ("crypto: api - Disallow identical driver names")
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: stable@vger.kernel.org
Signed-off-by: Liam Kearney <liam.kearney@canonical.com>
---
v2:
 - No changes
---
 arch/arm64/crypto/aes-glue.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm64/crypto/aes-glue.c b/arch/arm64/crypto/aes-glue.c
index aa13344a3a5e..af862e52a36b 100644
--- a/arch/arm64/crypto/aes-glue.c
+++ b/arch/arm64/crypto/aes-glue.c
@@ -1028,7 +1028,6 @@ static int __init aes_init(void)
 	struct simd_skcipher_alg *simd;
 	const char *basename;
 	const char *algname;
-	const char *drvname;
 	int err;
 	int i;
 
@@ -1045,9 +1044,8 @@ static int __init aes_init(void)
 			continue;
 
 		algname = aes_algs[i].base.cra_name + 2;
-		drvname = aes_algs[i].base.cra_driver_name + 2;
 		basename = aes_algs[i].base.cra_driver_name;
-		simd = simd_skcipher_create_compat(algname, drvname, basename);
+		simd = simd_skcipher_create(algname, basename);
 		err = PTR_ERR(simd);
 		if (IS_ERR(simd))
 			goto unregister_simds;
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-22  4:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-22  3:58 [PATCH v2] crypto: arm64: use simd_skcipher_create() when registering aes internal algs Liam Kearney
2024-05-22  4:18 ` Greg KH
2024-05-22  4:47   ` Liam Kearney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox