From 5c8389a8cbe8305b95d0594713cbf3c77d9dfb44 Mon Sep 17 00:00:00 2001 From: наб Date: Wed, 22 Dec 2021 15:27:43 +0100 Subject: module: icp: rip out the Solaris loadable module architecture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After progressively folding away null cases, it turns out there's /literally/ nothing there, even if some things are part of the Solaris SPARC DDI/DKI or the seventeen module types (some doubled for 32-bit userland), or the entire modctl syscall definition. Nothing. Initialisation is handled in illumos-crypto.c, which calls all the initialisers directly Reviewed-by: Brian Behlendorf Reviewed-by: Attila Fülöp Signed-off-by: Ahelenia Ziemiańska Closes #12895 Closes #12902 --- module/icp/io/aes.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'module/icp/io/aes.c') diff --git a/module/icp/io/aes.c b/module/icp/io/aes.c index d50e3bdc1..2f24739a4 100644 --- a/module/icp/io/aes.c +++ b/module/icp/io/aes.c @@ -32,27 +32,10 @@ #include #include #include -#include #define _AES_IMPL #include #include -#define CRYPTO_PROVIDER_NAME "aes" - -extern struct mod_ops mod_cryptoops; - -/* - * Module linkage information for the kernel. - */ -static struct modlcrypto modlcrypto = { - &mod_cryptoops, - "AES Kernel SW Provider" -}; - -static struct modlinkage modlinkage = { - MODREV_1, { (void *)&modlcrypto, NULL } -}; - /* * Mechanism info structure passed to KCF during registration. */ @@ -199,20 +182,13 @@ static crypto_data_t null_crypto_data = { CRYPTO_DATA_RAW }; int aes_mod_init(void) { - int ret; - /* Determine the fastest available implementation. */ aes_impl_init(); gcm_impl_init(); - if ((ret = mod_install(&modlinkage)) != 0) - return (ret); - /* Register with KCF. If the registration fails, remove the module. */ - if (crypto_register_provider(&aes_prov_info, &aes_prov_handle)) { - (void) mod_remove(&modlinkage); + if (crypto_register_provider(&aes_prov_info, &aes_prov_handle)) return (EACCES); - } return (0); } @@ -228,7 +204,7 @@ aes_mod_fini(void) aes_prov_handle = 0; } - return (mod_remove(&modlinkage)); + return (0); } static int -- cgit v1.2.3