[PATCH 029/106] crypto: convert exported crypto symbol into pluggable interface for CONFIG_CRYPTO_DRBG crypto
Jay Wang
wanjay at amazon.com
Wed Feb 11 18:46:05 PST 2026
From: Vegard Nossum <vegard.nossum at oracle.com>
Apply Crypto API wrappers to the exported crypto symbol in
CONFIG_CRYPTO_DRBG-related crypto to convert them into pluggable
interface.
Signed-off-by: Vegard Nossum <vegard.nossum at oracle.com>
[add drbg.o into crypto-objs-y; revise commit message]
Signed-off-by: Jay Wang <wanjay at amazon.com>
---
crypto/Makefile | 2 +-
crypto/drbg.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/crypto/Makefile b/crypto/Makefile
index 4c87e141c961..25f0d9d56469 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -163,7 +163,7 @@ obj-$(CONFIG_CRYPTO_LZ4HC) += lz4hc.o
obj-$(CONFIG_CRYPTO_XXHASH) += xxhash_generic.o
obj-$(CONFIG_CRYPTO_842) += 842.o
crypto-objs-$(CONFIG_CRYPTO_RNG2) += rng.o
-obj-$(CONFIG_CRYPTO_DRBG) += drbg.o
+crypto-objs-$(CONFIG_CRYPTO_DRBG) += drbg.o
obj-$(CONFIG_CRYPTO_JITTERENTROPY) += jitterentropy_rng.o
CFLAGS_jitterentropy.o = -O0
KASAN_SANITIZE_jitterentropy.o = n
diff --git a/crypto/drbg.c b/crypto/drbg.c
index 5e7ed5f5c192..f4eba9ef6d59 100644
--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -1882,8 +1882,8 @@ static void __exit drbg_exit(void)
crypto_unregister_rngs(drbg_algs, (ARRAY_SIZE(drbg_cores) * 2));
}
-module_init(drbg_init);
-module_exit(drbg_exit);
+crypto_module_init(drbg_init);
+crypto_module_exit(drbg_exit);
#ifndef CRYPTO_DRBG_HASH_STRING
#define CRYPTO_DRBG_HASH_STRING ""
#endif
--
2.47.3
More information about the linux-arm-kernel
mailing list