mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
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 <behlendorf1@llnl.gov> Reviewed-by: Attila Fülöp <attila@fueloep.org> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12895 Closes #12902
This commit is contained in:
+2
-26
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user