forked from mirrors/linux
		
	crypto: run initcalls for generic implementations earlier
Use subsys_initcall for registration of all templates and generic algorithm implementations, rather than module_init. Then change cryptomgr to use arch_initcall, to place it before the subsys_initcalls. This is needed so that when both a generic and optimized implementation of an algorithm are built into the kernel (not loadable modules), the generic implementation is registered before the optimized one. Otherwise, the self-tests for the optimized implementation are unable to allocate the generic implementation for the new comparison fuzz tests. Note that on arm, a side effect of this change is that self-tests for generic implementations may run before the unaligned access handler has been installed. So, unaligned accesses will crash the kernel. This is arguably a good thing as it makes it easier to detect that type of bug. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
		
							parent
							
								
									40153b10d9
								
							
						
					
					
						commit
						c4741b2305
					
				
					 83 changed files with 89 additions and 83 deletions
				
			
		|  | @ -144,7 +144,7 @@ static int __init crypto842_mod_init(void) | |||
| 
 | ||||
| 	return ret; | ||||
| } | ||||
| module_init(crypto842_mod_init); | ||||
| subsys_initcall(crypto842_mod_init); | ||||
| 
 | ||||
| static void __exit crypto842_mod_exit(void) | ||||
| { | ||||
|  |  | |||
|  | @ -659,7 +659,7 @@ static void __exit adiantum_module_exit(void) | |||
| 	crypto_unregister_template(&adiantum_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(adiantum_module_init); | ||||
| subsys_initcall(adiantum_module_init); | ||||
| module_exit(adiantum_module_exit); | ||||
| 
 | ||||
| MODULE_DESCRIPTION("Adiantum length-preserving encryption mode"); | ||||
|  |  | |||
|  | @ -448,7 +448,7 @@ static void __exit crypto_aegis128_module_exit(void) | |||
| 	crypto_unregister_aead(&crypto_aegis128_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_aegis128_module_init); | ||||
| subsys_initcall(crypto_aegis128_module_init); | ||||
| module_exit(crypto_aegis128_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -512,7 +512,7 @@ static void __exit crypto_aegis128l_module_exit(void) | |||
| 	crypto_unregister_aead(&crypto_aegis128l_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_aegis128l_module_init); | ||||
| subsys_initcall(crypto_aegis128l_module_init); | ||||
| module_exit(crypto_aegis128l_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -463,7 +463,7 @@ static void __exit crypto_aegis256_module_exit(void) | |||
| 	crypto_unregister_aead(&crypto_aegis256_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_aegis256_module_init); | ||||
| subsys_initcall(crypto_aegis256_module_init); | ||||
| module_exit(crypto_aegis256_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -1470,7 +1470,7 @@ static void __exit aes_fini(void) | |||
| 	crypto_unregister_alg(&aes_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(aes_init); | ||||
| subsys_initcall(aes_init); | ||||
| module_exit(aes_fini); | ||||
| 
 | ||||
| MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); | ||||
|  |  | |||
|  | @ -296,7 +296,13 @@ static void __exit cryptomgr_exit(void) | |||
| 	BUG_ON(err); | ||||
| } | ||||
| 
 | ||||
| subsys_initcall(cryptomgr_init); | ||||
| /*
 | ||||
|  * This is arch_initcall() so that the crypto self-tests are run on algorithms | ||||
|  * registered early by subsys_initcall().  subsys_initcall() is needed for | ||||
|  * generic implementations so that they're available for comparison tests when | ||||
|  * other implementations are registered later by module_init(). | ||||
|  */ | ||||
| arch_initcall(cryptomgr_init); | ||||
| module_exit(cryptomgr_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -472,7 +472,7 @@ MODULE_DESCRIPTION("Software Pseudo Random Number Generator"); | |||
| MODULE_AUTHOR("Neil Horman <nhorman@tuxdriver.com>"); | ||||
| module_param(dbg, int, 0); | ||||
| MODULE_PARM_DESC(dbg, "Boolean to enable debugging (0/1 == off/on)"); | ||||
| module_init(prng_mod_init); | ||||
| subsys_initcall(prng_mod_init); | ||||
| module_exit(prng_mod_fini); | ||||
| MODULE_ALIAS_CRYPTO("stdrng"); | ||||
| MODULE_ALIAS_CRYPTO("ansi_cprng"); | ||||
|  |  | |||
|  | @ -699,7 +699,7 @@ static void __exit anubis_mod_fini(void) | |||
| 	crypto_unregister_alg(&anubis_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(anubis_mod_init); | ||||
| subsys_initcall(anubis_mod_init); | ||||
| module_exit(anubis_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -163,7 +163,7 @@ static void __exit arc4_exit(void) | |||
| 	crypto_unregister_skcipher(&arc4_skcipher); | ||||
| } | ||||
| 
 | ||||
| module_init(arc4_init); | ||||
| subsys_initcall(arc4_init); | ||||
| module_exit(arc4_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -508,7 +508,7 @@ static void __exit crypto_authenc_module_exit(void) | |||
| 	crypto_unregister_template(&crypto_authenc_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_authenc_module_init); | ||||
| subsys_initcall(crypto_authenc_module_init); | ||||
| module_exit(crypto_authenc_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -523,7 +523,7 @@ static void __exit crypto_authenc_esn_module_exit(void) | |||
| 	crypto_unregister_template(&crypto_authenc_esn_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_authenc_esn_module_init); | ||||
| subsys_initcall(crypto_authenc_esn_module_init); | ||||
| module_exit(crypto_authenc_esn_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -133,7 +133,7 @@ static void __exit blowfish_mod_fini(void) | |||
| 	crypto_unregister_alg(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(blowfish_mod_init); | ||||
| subsys_initcall(blowfish_mod_init); | ||||
| module_exit(blowfish_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -1092,7 +1092,7 @@ static void __exit camellia_fini(void) | |||
| 	crypto_unregister_alg(&camellia_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(camellia_init); | ||||
| subsys_initcall(camellia_init); | ||||
| module_exit(camellia_fini); | ||||
| 
 | ||||
| MODULE_DESCRIPTION("Camellia Cipher Algorithm"); | ||||
|  |  | |||
|  | @ -543,7 +543,7 @@ static void __exit cast5_mod_fini(void) | |||
| 	crypto_unregister_alg(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(cast5_mod_init); | ||||
| subsys_initcall(cast5_mod_init); | ||||
| module_exit(cast5_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -285,7 +285,7 @@ static void __exit cast6_mod_fini(void) | |||
| 	crypto_unregister_alg(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(cast6_mod_init); | ||||
| subsys_initcall(cast6_mod_init); | ||||
| module_exit(cast6_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -98,7 +98,7 @@ static void __exit crypto_cbc_module_exit(void) | |||
| 	crypto_unregister_template(&crypto_cbc_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_cbc_module_init); | ||||
| subsys_initcall(crypto_cbc_module_init); | ||||
| module_exit(crypto_cbc_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -1014,7 +1014,7 @@ static void __exit crypto_ccm_module_exit(void) | |||
| 				    ARRAY_SIZE(crypto_ccm_tmpls)); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_ccm_module_init); | ||||
| subsys_initcall(crypto_ccm_module_init); | ||||
| module_exit(crypto_ccm_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -243,7 +243,7 @@ static void __exit crypto_cfb_module_exit(void) | |||
| 	crypto_unregister_template(&crypto_cfb_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_cfb_module_init); | ||||
| subsys_initcall(crypto_cfb_module_init); | ||||
| module_exit(crypto_cfb_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -725,7 +725,7 @@ static void __exit chacha20poly1305_module_exit(void) | |||
| 				    ARRAY_SIZE(rfc7539_tmpls)); | ||||
| } | ||||
| 
 | ||||
| module_init(chacha20poly1305_module_init); | ||||
| subsys_initcall(chacha20poly1305_module_init); | ||||
| module_exit(chacha20poly1305_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -201,7 +201,7 @@ static void __exit chacha_generic_mod_fini(void) | |||
| 	crypto_unregister_skciphers(algs, ARRAY_SIZE(algs)); | ||||
| } | ||||
| 
 | ||||
| module_init(chacha_generic_mod_init); | ||||
| subsys_initcall(chacha_generic_mod_init); | ||||
| module_exit(chacha_generic_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -313,7 +313,7 @@ static void __exit crypto_cmac_module_exit(void) | |||
| 	crypto_unregister_template(&crypto_cmac_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_cmac_module_init); | ||||
| subsys_initcall(crypto_cmac_module_init); | ||||
| module_exit(crypto_cmac_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -146,7 +146,7 @@ static void __exit crc32_mod_fini(void) | |||
| 	crypto_unregister_shash(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(crc32_mod_init); | ||||
| subsys_initcall(crc32_mod_init); | ||||
| module_exit(crc32_mod_fini); | ||||
| 
 | ||||
| MODULE_AUTHOR("Alexander Boyko <alexander_boyko@xyratex.com>"); | ||||
|  |  | |||
|  | @ -165,7 +165,7 @@ static void __exit crc32c_mod_fini(void) | |||
| 	crypto_unregister_shash(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(crc32c_mod_init); | ||||
| subsys_initcall(crc32c_mod_init); | ||||
| module_exit(crc32c_mod_fini); | ||||
| 
 | ||||
| MODULE_AUTHOR("Clay Haapala <chaapala@cisco.com>"); | ||||
|  |  | |||
|  | @ -112,7 +112,7 @@ static void __exit crct10dif_mod_fini(void) | |||
| 	crypto_unregister_shash(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(crct10dif_mod_init); | ||||
| subsys_initcall(crct10dif_mod_init); | ||||
| module_exit(crct10dif_mod_fini); | ||||
| 
 | ||||
| MODULE_AUTHOR("Tim Chen <tim.c.chen@linux.intel.com>"); | ||||
|  |  | |||
|  | @ -220,7 +220,7 @@ static void __exit crypto_null_mod_fini(void) | |||
| 	crypto_unregister_skcipher(&skcipher_null); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_null_mod_init); | ||||
| subsys_initcall(crypto_null_mod_init); | ||||
| module_exit(crypto_null_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -384,7 +384,7 @@ static void __exit crypto_ctr_module_exit(void) | |||
| 				    ARRAY_SIZE(crypto_ctr_tmpls)); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_ctr_module_init); | ||||
| subsys_initcall(crypto_ctr_module_init); | ||||
| module_exit(crypto_ctr_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -423,7 +423,7 @@ static void __exit crypto_cts_module_exit(void) | |||
| 	crypto_unregister_template(&crypto_cts_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_cts_module_init); | ||||
| subsys_initcall(crypto_cts_module_init); | ||||
| module_exit(crypto_cts_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("Dual BSD/GPL"); | ||||
|  |  | |||
|  | @ -334,7 +334,7 @@ static void __exit deflate_mod_fini(void) | |||
| 	crypto_unregister_scomps(scomp, ARRAY_SIZE(scomp)); | ||||
| } | ||||
| 
 | ||||
| module_init(deflate_mod_init); | ||||
| subsys_initcall(deflate_mod_init); | ||||
| module_exit(deflate_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -990,7 +990,7 @@ static void __exit des_generic_mod_fini(void) | |||
| 	crypto_unregister_algs(des_algs, ARRAY_SIZE(des_algs)); | ||||
| } | ||||
| 
 | ||||
| module_init(des_generic_mod_init); | ||||
| subsys_initcall(des_generic_mod_init); | ||||
| module_exit(des_generic_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -236,7 +236,7 @@ static void dh_exit(void) | |||
| 	crypto_unregister_kpp(&dh); | ||||
| } | ||||
| 
 | ||||
| module_init(dh_init); | ||||
| subsys_initcall(dh_init); | ||||
| module_exit(dh_exit); | ||||
| MODULE_ALIAS_CRYPTO("dh"); | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -2039,7 +2039,7 @@ static void __exit drbg_exit(void) | |||
| 	crypto_unregister_rngs(drbg_algs, (ARRAY_SIZE(drbg_cores) * 2)); | ||||
| } | ||||
| 
 | ||||
| module_init(drbg_init); | ||||
| subsys_initcall(drbg_init); | ||||
| module_exit(drbg_exit); | ||||
| #ifndef CRYPTO_DRBG_HASH_STRING | ||||
| #define CRYPTO_DRBG_HASH_STRING "" | ||||
|  |  | |||
|  | @ -101,7 +101,7 @@ static void __exit crypto_ecb_module_exit(void) | |||
| 	crypto_unregister_template(&crypto_ecb_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_ecb_module_init); | ||||
| subsys_initcall(crypto_ecb_module_init); | ||||
| module_exit(crypto_ecb_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -166,7 +166,7 @@ static void ecdh_exit(void) | |||
| 	crypto_unregister_kpp(&ecdh); | ||||
| } | ||||
| 
 | ||||
| module_init(ecdh_init); | ||||
| subsys_initcall(ecdh_init); | ||||
| module_exit(ecdh_exit); | ||||
| MODULE_ALIAS_CRYPTO("ecdh"); | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -174,7 +174,7 @@ static void __exit echainiv_module_exit(void) | |||
| 	crypto_unregister_template(&echainiv_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(echainiv_module_init); | ||||
| subsys_initcall(echainiv_module_init); | ||||
| module_exit(echainiv_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -414,7 +414,7 @@ static void __exit fcrypt_mod_fini(void) | |||
| 	crypto_unregister_alg(&fcrypt_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(fcrypt_mod_init); | ||||
| subsys_initcall(fcrypt_mod_init); | ||||
| module_exit(fcrypt_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("Dual BSD/GPL"); | ||||
|  |  | |||
|  | @ -74,5 +74,5 @@ static void __exit fips_exit(void) | |||
| 	crypto_proc_fips_exit(); | ||||
| } | ||||
| 
 | ||||
| module_init(fips_init); | ||||
| subsys_initcall(fips_init); | ||||
| module_exit(fips_exit); | ||||
|  |  | |||
|  | @ -1258,7 +1258,7 @@ static void __exit crypto_gcm_module_exit(void) | |||
| 				    ARRAY_SIZE(crypto_gcm_tmpls)); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_gcm_module_init); | ||||
| subsys_initcall(crypto_gcm_module_init); | ||||
| module_exit(crypto_gcm_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -149,7 +149,7 @@ static void __exit ghash_mod_exit(void) | |||
| 	crypto_unregister_shash(&ghash_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(ghash_mod_init); | ||||
| subsys_initcall(ghash_mod_init); | ||||
| module_exit(ghash_mod_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -268,7 +268,7 @@ static void __exit hmac_module_exit(void) | |||
| 	crypto_unregister_template(&hmac_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(hmac_module_init); | ||||
| subsys_initcall(hmac_module_init); | ||||
| module_exit(hmac_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -198,7 +198,7 @@ static void __exit jent_mod_exit(void) | |||
| 	crypto_unregister_rng(&jent_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(jent_mod_init); | ||||
| subsys_initcall(jent_mod_init); | ||||
| module_exit(jent_mod_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("Dual BSD/GPL"); | ||||
|  |  | |||
|  | @ -310,7 +310,7 @@ static void __exit crypto_kw_exit(void) | |||
| 	crypto_unregister_template(&crypto_kw_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_kw_init); | ||||
| subsys_initcall(crypto_kw_init); | ||||
| module_exit(crypto_kw_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("Dual BSD/GPL"); | ||||
|  |  | |||
|  | @ -875,7 +875,7 @@ static void __exit khazad_mod_fini(void) | |||
| } | ||||
| 
 | ||||
| 
 | ||||
| module_init(khazad_mod_init); | ||||
| subsys_initcall(khazad_mod_init); | ||||
| module_exit(khazad_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -433,7 +433,7 @@ static void __exit crypto_module_exit(void) | |||
| 	crypto_unregister_template(&crypto_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_module_init); | ||||
| subsys_initcall(crypto_module_init); | ||||
| module_exit(crypto_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -164,7 +164,7 @@ static void __exit lz4_mod_fini(void) | |||
| 	crypto_unregister_scomp(&scomp); | ||||
| } | ||||
| 
 | ||||
| module_init(lz4_mod_init); | ||||
| subsys_initcall(lz4_mod_init); | ||||
| module_exit(lz4_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -165,7 +165,7 @@ static void __exit lz4hc_mod_fini(void) | |||
| 	crypto_unregister_scomp(&scomp); | ||||
| } | ||||
| 
 | ||||
| module_init(lz4hc_mod_init); | ||||
| subsys_initcall(lz4hc_mod_init); | ||||
| module_exit(lz4hc_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -167,7 +167,7 @@ static void __exit lzorle_mod_fini(void) | |||
| 	crypto_unregister_scomp(&scomp); | ||||
| } | ||||
| 
 | ||||
| module_init(lzorle_mod_init); | ||||
| subsys_initcall(lzorle_mod_init); | ||||
| module_exit(lzorle_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -167,7 +167,7 @@ static void __exit lzo_mod_fini(void) | |||
| 	crypto_unregister_scomp(&scomp); | ||||
| } | ||||
| 
 | ||||
| module_init(lzo_mod_init); | ||||
| subsys_initcall(lzo_mod_init); | ||||
| module_exit(lzo_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -232,7 +232,7 @@ static void __exit md4_mod_fini(void) | |||
| 	crypto_unregister_shash(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(md4_mod_init); | ||||
| subsys_initcall(md4_mod_init); | ||||
| module_exit(md4_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -244,7 +244,7 @@ static void __exit md5_mod_fini(void) | |||
| 	crypto_unregister_shash(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(md5_mod_init); | ||||
| subsys_initcall(md5_mod_init); | ||||
| module_exit(md5_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -178,7 +178,7 @@ static void __exit michael_mic_exit(void) | |||
| } | ||||
| 
 | ||||
| 
 | ||||
| module_init(michael_mic_init); | ||||
| subsys_initcall(michael_mic_init); | ||||
| module_exit(michael_mic_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL v2"); | ||||
|  |  | |||
|  | @ -532,7 +532,7 @@ static void __exit crypto_morus1280_module_exit(void) | |||
| 	crypto_unregister_aead(&crypto_morus1280_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_morus1280_module_init); | ||||
| subsys_initcall(crypto_morus1280_module_init); | ||||
| module_exit(crypto_morus1280_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -523,7 +523,7 @@ static void __exit crypto_morus640_module_exit(void) | |||
| 	crypto_unregister_aead(&crypto_morus640_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_morus640_module_init); | ||||
| subsys_initcall(crypto_morus640_module_init); | ||||
| module_exit(crypto_morus640_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -244,7 +244,7 @@ static void __exit nhpoly1305_mod_exit(void) | |||
| 	crypto_unregister_shash(&nhpoly1305_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(nhpoly1305_mod_init); | ||||
| subsys_initcall(nhpoly1305_mod_init); | ||||
| module_exit(nhpoly1305_mod_exit); | ||||
| 
 | ||||
| MODULE_DESCRIPTION("NHPoly1305 ε-almost-∆-universal hash function"); | ||||
|  |  | |||
|  | @ -95,7 +95,7 @@ static void __exit crypto_ofb_module_exit(void) | |||
| 	crypto_unregister_template(&crypto_ofb_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_ofb_module_init); | ||||
| subsys_initcall(crypto_ofb_module_init); | ||||
| module_exit(crypto_ofb_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -191,7 +191,7 @@ static void __exit crypto_pcbc_module_exit(void) | |||
| 	crypto_unregister_template(&crypto_pcbc_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_pcbc_module_init); | ||||
| subsys_initcall(crypto_pcbc_module_init); | ||||
| module_exit(crypto_pcbc_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -512,7 +512,7 @@ static void __exit pcrypt_exit(void) | |||
| 	crypto_unregister_template(&pcrypt_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(pcrypt_init); | ||||
| subsys_initcall(pcrypt_init); | ||||
| module_exit(pcrypt_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -318,7 +318,7 @@ static void __exit poly1305_mod_exit(void) | |||
| 	crypto_unregister_shash(&poly1305_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(poly1305_mod_init); | ||||
| subsys_initcall(poly1305_mod_init); | ||||
| module_exit(poly1305_mod_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -318,7 +318,7 @@ static void __exit rmd128_mod_fini(void) | |||
| 	crypto_unregister_shash(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(rmd128_mod_init); | ||||
| subsys_initcall(rmd128_mod_init); | ||||
| module_exit(rmd128_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -362,7 +362,7 @@ static void __exit rmd160_mod_fini(void) | |||
| 	crypto_unregister_shash(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(rmd160_mod_init); | ||||
| subsys_initcall(rmd160_mod_init); | ||||
| module_exit(rmd160_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -337,7 +337,7 @@ static void __exit rmd256_mod_fini(void) | |||
| 	crypto_unregister_shash(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(rmd256_mod_init); | ||||
| subsys_initcall(rmd256_mod_init); | ||||
| module_exit(rmd256_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -386,7 +386,7 @@ static void __exit rmd320_mod_fini(void) | |||
| 	crypto_unregister_shash(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(rmd320_mod_init); | ||||
| subsys_initcall(rmd320_mod_init); | ||||
| module_exit(rmd320_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -282,7 +282,7 @@ static void rsa_exit(void) | |||
| 	crypto_unregister_akcipher(&rsa); | ||||
| } | ||||
| 
 | ||||
| module_init(rsa_init); | ||||
| subsys_initcall(rsa_init); | ||||
| module_exit(rsa_exit); | ||||
| MODULE_ALIAS_CRYPTO("rsa"); | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -203,7 +203,7 @@ static void __exit salsa20_generic_mod_fini(void) | |||
| 	crypto_unregister_skcipher(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(salsa20_generic_mod_init); | ||||
| subsys_initcall(salsa20_generic_mod_init); | ||||
| module_exit(salsa20_generic_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -470,7 +470,7 @@ static void __exit seed_fini(void) | |||
| 	crypto_unregister_alg(&seed_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(seed_init); | ||||
| subsys_initcall(seed_init); | ||||
| module_exit(seed_fini); | ||||
| 
 | ||||
| MODULE_DESCRIPTION("SEED Cipher Algorithm"); | ||||
|  |  | |||
|  | @ -211,7 +211,7 @@ static void __exit seqiv_module_exit(void) | |||
| 	crypto_unregister_template(&seqiv_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(seqiv_module_init); | ||||
| subsys_initcall(seqiv_module_init); | ||||
| module_exit(seqiv_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -664,7 +664,7 @@ static void __exit serpent_mod_fini(void) | |||
| 	crypto_unregister_algs(srp_algs, ARRAY_SIZE(srp_algs)); | ||||
| } | ||||
| 
 | ||||
| module_init(serpent_mod_init); | ||||
| subsys_initcall(serpent_mod_init); | ||||
| module_exit(serpent_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -92,7 +92,7 @@ static void __exit sha1_generic_mod_fini(void) | |||
| 	crypto_unregister_shash(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(sha1_generic_mod_init); | ||||
| subsys_initcall(sha1_generic_mod_init); | ||||
| module_exit(sha1_generic_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -301,7 +301,7 @@ static void __exit sha256_generic_mod_fini(void) | |||
| 	crypto_unregister_shashes(sha256_algs, ARRAY_SIZE(sha256_algs)); | ||||
| } | ||||
| 
 | ||||
| module_init(sha256_generic_mod_init); | ||||
| subsys_initcall(sha256_generic_mod_init); | ||||
| module_exit(sha256_generic_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -294,7 +294,7 @@ static void __exit sha3_generic_mod_fini(void) | |||
| 	crypto_unregister_shashes(algs, ARRAY_SIZE(algs)); | ||||
| } | ||||
| 
 | ||||
| module_init(sha3_generic_mod_init); | ||||
| subsys_initcall(sha3_generic_mod_init); | ||||
| module_exit(sha3_generic_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -223,7 +223,7 @@ static void __exit sha512_generic_mod_fini(void) | |||
| 	crypto_unregister_shashes(sha512_algs, ARRAY_SIZE(sha512_algs)); | ||||
| } | ||||
| 
 | ||||
| module_init(sha512_generic_mod_init); | ||||
| subsys_initcall(sha512_generic_mod_init); | ||||
| module_exit(sha512_generic_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -199,7 +199,7 @@ static void __exit sm3_generic_mod_fini(void) | |||
| 	crypto_unregister_shash(&sm3_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(sm3_generic_mod_init); | ||||
| subsys_initcall(sm3_generic_mod_init); | ||||
| module_exit(sm3_generic_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL v2"); | ||||
|  |  | |||
|  | @ -237,7 +237,7 @@ static void __exit sm4_fini(void) | |||
| 	crypto_unregister_alg(&sm4_alg); | ||||
| } | ||||
| 
 | ||||
| module_init(sm4_init); | ||||
| subsys_initcall(sm4_init); | ||||
| module_exit(sm4_fini); | ||||
| 
 | ||||
| MODULE_DESCRIPTION("SM4 Cipher Algorithm"); | ||||
|  |  | |||
|  | @ -1128,7 +1128,7 @@ static void __exit streebog_mod_fini(void) | |||
| 	crypto_unregister_shashes(algs, ARRAY_SIZE(algs)); | ||||
| } | ||||
| 
 | ||||
| module_init(streebog_mod_init); | ||||
| subsys_initcall(streebog_mod_init); | ||||
| module_exit(streebog_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -3053,7 +3053,7 @@ static int __init tcrypt_mod_init(void) | |||
|  */ | ||||
| static void __exit tcrypt_mod_fini(void) { } | ||||
| 
 | ||||
| module_init(tcrypt_mod_init); | ||||
| subsys_initcall(tcrypt_mod_init); | ||||
| module_exit(tcrypt_mod_fini); | ||||
| 
 | ||||
| module_param(alg, charp, 0); | ||||
|  |  | |||
|  | @ -274,7 +274,7 @@ MODULE_ALIAS_CRYPTO("tea"); | |||
| MODULE_ALIAS_CRYPTO("xtea"); | ||||
| MODULE_ALIAS_CRYPTO("xeta"); | ||||
| 
 | ||||
| module_init(tea_mod_init); | ||||
| subsys_initcall(tea_mod_init); | ||||
| module_exit(tea_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -677,7 +677,7 @@ MODULE_ALIAS_CRYPTO("tgr192"); | |||
| MODULE_ALIAS_CRYPTO("tgr160"); | ||||
| MODULE_ALIAS_CRYPTO("tgr128"); | ||||
| 
 | ||||
| module_init(tgr192_mod_init); | ||||
| subsys_initcall(tgr192_mod_init); | ||||
| module_exit(tgr192_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -205,7 +205,7 @@ static void __exit twofish_mod_fini(void) | |||
| 	crypto_unregister_alg(&alg); | ||||
| } | ||||
| 
 | ||||
| module_init(twofish_mod_init); | ||||
| subsys_initcall(twofish_mod_init); | ||||
| module_exit(twofish_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -690,7 +690,7 @@ static void __exit vmac_module_exit(void) | |||
| 	crypto_unregister_template(&vmac64_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(vmac_module_init); | ||||
| subsys_initcall(vmac_module_init); | ||||
| module_exit(vmac_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -1168,7 +1168,7 @@ MODULE_ALIAS_CRYPTO("wp512"); | |||
| MODULE_ALIAS_CRYPTO("wp384"); | ||||
| MODULE_ALIAS_CRYPTO("wp256"); | ||||
| 
 | ||||
| module_init(wp512_mod_init); | ||||
| subsys_initcall(wp512_mod_init); | ||||
| module_exit(wp512_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -282,7 +282,7 @@ static void __exit crypto_xcbc_module_exit(void) | |||
| 	crypto_unregister_template(&crypto_xcbc_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_xcbc_module_init); | ||||
| subsys_initcall(crypto_xcbc_module_init); | ||||
| module_exit(crypto_xcbc_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -359,7 +359,7 @@ static void __exit crypto_module_exit(void) | |||
| 	crypto_unregister_template(&crypto_tmpl); | ||||
| } | ||||
| 
 | ||||
| module_init(crypto_module_init); | ||||
| subsys_initcall(crypto_module_init); | ||||
| module_exit(crypto_module_exit); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
|  | @ -257,7 +257,7 @@ static void __exit zstd_mod_fini(void) | |||
| 	crypto_unregister_scomp(&scomp); | ||||
| } | ||||
| 
 | ||||
| module_init(zstd_mod_init); | ||||
| subsys_initcall(zstd_mod_init); | ||||
| module_exit(zstd_mod_fini); | ||||
| 
 | ||||
| MODULE_LICENSE("GPL"); | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Eric Biggers
						Eric Biggers