aboutsummaryrefslogtreecommitdiffstats
path: root/module/icp/io/aes.c
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-12-22 15:27:43 +0100
committerBrian Behlendorf <[email protected]>2022-01-06 16:14:04 -0800
commit5c8389a8cbe8305b95d0594713cbf3c77d9dfb44 (patch)
tree51243d1ed383933eafbaee2d4c18dea877921daa /module/icp/io/aes.c
parentc1d3be19d7646c2dfeec04a31c96542be77b9763 (diff)
module: icp: rip out the Solaris loadable module architecture
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 <[email protected]> Reviewed-by: Attila Fülöp <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12895 Closes #12902
Diffstat (limited to 'module/icp/io/aes.c')
-rw-r--r--module/icp/io/aes.c28
1 files changed, 2 insertions, 26 deletions
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 <sys/crypto/spi.h>
#include <sys/crypto/icp.h>
#include <modes/modes.h>
-#include <sys/modctl.h>
#define _AES_IMPL
#include <aes/aes_impl.h>
#include <modes/gcm_impl.h>
-#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