From bb9c648b334be581a791c7669abaa594e4b5ebb7 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 17 Apr 2025 21:00:17 -0700 Subject: [PATCH] crypto: lib/poly1305 - restore ability to remove modules Though the module_exit functions are now no-ops, they should still be defined, since otherwise the modules become unremovable. Fixes: 1f81c58279c7 ("crypto: arm/poly1305 - remove redundant shash algorithm") Fixes: f4b1a73aec5c ("crypto: arm64/poly1305 - remove redundant shash algorithm") Fixes: 378a337ab40f ("crypto: powerpc/poly1305 - implement library instead of shash") Fixes: 21969da642a2 ("crypto: x86/poly1305 - remove redundant shash algorithm") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu --- arch/arm/crypto/poly1305-glue.c | 5 +++++ arch/arm64/crypto/poly1305-glue.c | 5 +++++ arch/powerpc/crypto/poly1305-p10-glue.c | 5 +++++ arch/x86/crypto/poly1305_glue.c | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/arch/arm/crypto/poly1305-glue.c b/arch/arm/crypto/poly1305-glue.c index 6d6998b3ec7e..42d0ebde1ae1 100644 --- a/arch/arm/crypto/poly1305-glue.c +++ b/arch/arm/crypto/poly1305-glue.c @@ -116,5 +116,10 @@ static int __init arm_poly1305_mod_init(void) } arch_initcall(arm_poly1305_mod_init); +static void __exit arm_poly1305_mod_exit(void) +{ +} +module_exit(arm_poly1305_mod_exit); + MODULE_DESCRIPTION("Accelerated Poly1305 transform for ARM"); MODULE_LICENSE("GPL v2"); diff --git a/arch/arm64/crypto/poly1305-glue.c b/arch/arm64/crypto/poly1305-glue.c index cb152ceac14a..906970dd5373 100644 --- a/arch/arm64/crypto/poly1305-glue.c +++ b/arch/arm64/crypto/poly1305-glue.c @@ -107,5 +107,10 @@ static int __init neon_poly1305_mod_init(void) } arch_initcall(neon_poly1305_mod_init); +static void __exit neon_poly1305_mod_exit(void) +{ +} +module_exit(neon_poly1305_mod_exit); + MODULE_DESCRIPTION("Poly1305 authenticator (ARM64 optimized)"); MODULE_LICENSE("GPL v2"); diff --git a/arch/powerpc/crypto/poly1305-p10-glue.c b/arch/powerpc/crypto/poly1305-p10-glue.c index 40d296d52c23..00617f4c58e6 100644 --- a/arch/powerpc/crypto/poly1305-p10-glue.c +++ b/arch/powerpc/crypto/poly1305-p10-glue.c @@ -127,6 +127,11 @@ static int __init poly1305_p10_init(void) } arch_initcall(poly1305_p10_init); +static void __exit poly1305_p10_exit(void) +{ +} +module_exit(poly1305_p10_exit); + MODULE_LICENSE("GPL"); MODULE_AUTHOR("Danny Tsen "); MODULE_DESCRIPTION("Optimized Poly1305 for P10"); diff --git a/arch/x86/crypto/poly1305_glue.c b/arch/x86/crypto/poly1305_glue.c index a0fc543a0d68..cff35ca5822a 100644 --- a/arch/x86/crypto/poly1305_glue.c +++ b/arch/x86/crypto/poly1305_glue.c @@ -208,6 +208,11 @@ static int __init poly1305_simd_mod_init(void) } arch_initcall(poly1305_simd_mod_init); +static void __exit poly1305_simd_mod_exit(void) +{ +} +module_exit(poly1305_simd_mod_exit); + MODULE_LICENSE("GPL"); MODULE_AUTHOR("Jason A. Donenfeld "); MODULE_DESCRIPTION("Poly1305 authenticator"); -- 2.50.1