summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-Revert-crypto-run-initcalls-for-generic-implementati.patch1179
-rw-r--r--crypto-ghash-fix-unaligned-memory-access-in-ghash_setkey.patch142
-rw-r--r--kernel.spec2
3 files changed, 143 insertions, 1180 deletions
diff --git a/0001-Revert-crypto-run-initcalls-for-generic-implementati.patch b/0001-Revert-crypto-run-initcalls-for-generic-implementati.patch
deleted file mode 100644
index d5d26f3de..000000000
--- a/0001-Revert-crypto-run-initcalls-for-generic-implementati.patch
+++ /dev/null
@@ -1,1179 +0,0 @@
-From 9b34cb89c2f51c34870bee23ef2ff91eb257d2a0 Mon Sep 17 00:00:00 2001
-From: Peter Robinson <pbrobinson@gmail.com>
-Date: Wed, 29 May 2019 16:31:12 +0100
-Subject: [PATCH] Revert "crypto: run initcalls for generic implementations
- earlier"
-
-This reverts commit c4741b23059794bd99beef0f700103b0d983b3fd.
----
- crypto/842.c | 2 +-
- crypto/adiantum.c | 2 +-
- crypto/aegis128.c | 2 +-
- crypto/aegis128l.c | 2 +-
- crypto/aegis256.c | 2 +-
- crypto/aes_generic.c | 2 +-
- crypto/algboss.c | 8 +-------
- crypto/ansi_cprng.c | 2 +-
- crypto/anubis.c | 2 +-
- crypto/arc4.c | 2 +-
- crypto/authenc.c | 2 +-
- crypto/authencesn.c | 2 +-
- crypto/blowfish_generic.c | 2 +-
- crypto/camellia_generic.c | 2 +-
- crypto/cast5_generic.c | 2 +-
- crypto/cast6_generic.c | 2 +-
- crypto/cbc.c | 2 +-
- crypto/ccm.c | 2 +-
- crypto/cfb.c | 2 +-
- crypto/chacha20poly1305.c | 2 +-
- crypto/chacha_generic.c | 2 +-
- crypto/cmac.c | 2 +-
- crypto/crc32_generic.c | 2 +-
- crypto/crc32c_generic.c | 2 +-
- crypto/crct10dif_generic.c | 2 +-
- crypto/crypto_null.c | 2 +-
- crypto/ctr.c | 2 +-
- crypto/cts.c | 2 +-
- crypto/deflate.c | 2 +-
- crypto/des_generic.c | 2 +-
- crypto/dh.c | 2 +-
- crypto/drbg.c | 2 +-
- crypto/ecb.c | 2 +-
- crypto/ecdh.c | 2 +-
- crypto/echainiv.c | 2 +-
- crypto/fcrypt.c | 2 +-
- crypto/fips.c | 2 +-
- crypto/gcm.c | 2 +-
- crypto/ghash-generic.c | 2 +-
- crypto/hmac.c | 2 +-
- crypto/jitterentropy-kcapi.c | 2 +-
- crypto/keywrap.c | 2 +-
- crypto/khazad.c | 2 +-
- crypto/lrw.c | 2 +-
- crypto/lz4.c | 2 +-
- crypto/lz4hc.c | 2 +-
- crypto/lzo-rle.c | 2 +-
- crypto/lzo.c | 2 +-
- crypto/md4.c | 2 +-
- crypto/md5.c | 2 +-
- crypto/michael_mic.c | 2 +-
- crypto/morus1280.c | 2 +-
- crypto/morus640.c | 2 +-
- crypto/nhpoly1305.c | 2 +-
- crypto/ofb.c | 2 +-
- crypto/pcbc.c | 2 +-
- crypto/pcrypt.c | 2 +-
- crypto/poly1305_generic.c | 2 +-
- crypto/rmd128.c | 2 +-
- crypto/rmd160.c | 2 +-
- crypto/rmd256.c | 2 +-
- crypto/rmd320.c | 2 +-
- crypto/rsa.c | 2 +-
- crypto/salsa20_generic.c | 2 +-
- crypto/seed.c | 2 +-
- crypto/seqiv.c | 2 +-
- crypto/serpent_generic.c | 2 +-
- crypto/sha1_generic.c | 2 +-
- crypto/sha256_generic.c | 2 +-
- crypto/sha3_generic.c | 2 +-
- crypto/sha512_generic.c | 2 +-
- crypto/sm3_generic.c | 2 +-
- crypto/sm4_generic.c | 2 +-
- crypto/streebog_generic.c | 2 +-
- crypto/tcrypt.c | 2 +-
- crypto/tea.c | 2 +-
- crypto/tgr192.c | 2 +-
- crypto/twofish_generic.c | 2 +-
- crypto/vmac.c | 2 +-
- crypto/wp512.c | 2 +-
- crypto/xcbc.c | 2 +-
- crypto/xts.c | 2 +-
- crypto/zstd.c | 2 +-
- 83 files changed, 83 insertions(+), 89 deletions(-)
-
-diff --git a/crypto/842.c b/crypto/842.c
-index 5f98393b65d1..bc26dc942821 100644
---- a/crypto/842.c
-+++ b/crypto/842.c
-@@ -144,7 +144,7 @@ static int __init crypto842_mod_init(void)
-
- return ret;
- }
--subsys_initcall(crypto842_mod_init);
-+module_init(crypto842_mod_init);
-
- static void __exit crypto842_mod_exit(void)
- {
-diff --git a/crypto/adiantum.c b/crypto/adiantum.c
-index 395a3ddd3707..36233ea20046 100644
---- a/crypto/adiantum.c
-+++ b/crypto/adiantum.c
-@@ -658,7 +658,7 @@ static void __exit adiantum_module_exit(void)
- crypto_unregister_template(&adiantum_tmpl);
- }
-
--subsys_initcall(adiantum_module_init);
-+module_init(adiantum_module_init);
- module_exit(adiantum_module_exit);
-
- MODULE_DESCRIPTION("Adiantum length-preserving encryption mode");
-diff --git a/crypto/aegis128.c b/crypto/aegis128.c
-index d78f77fc5dd1..3718a8341303 100644
---- a/crypto/aegis128.c
-+++ b/crypto/aegis128.c
-@@ -448,7 +448,7 @@ static void __exit crypto_aegis128_module_exit(void)
- crypto_unregister_aead(&crypto_aegis128_alg);
- }
-
--subsys_initcall(crypto_aegis128_module_init);
-+module_init(crypto_aegis128_module_init);
- module_exit(crypto_aegis128_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/aegis128l.c b/crypto/aegis128l.c
-index 9bca3d619a22..275a8616d71b 100644
---- a/crypto/aegis128l.c
-+++ b/crypto/aegis128l.c
-@@ -512,7 +512,7 @@ static void __exit crypto_aegis128l_module_exit(void)
- crypto_unregister_aead(&crypto_aegis128l_alg);
- }
-
--subsys_initcall(crypto_aegis128l_module_init);
-+module_init(crypto_aegis128l_module_init);
- module_exit(crypto_aegis128l_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/aegis256.c b/crypto/aegis256.c
-index b47fd39595ad..ecd6b7f34a2d 100644
---- a/crypto/aegis256.c
-+++ b/crypto/aegis256.c
-@@ -463,7 +463,7 @@ static void __exit crypto_aegis256_module_exit(void)
- crypto_unregister_aead(&crypto_aegis256_alg);
- }
-
--subsys_initcall(crypto_aegis256_module_init);
-+module_init(crypto_aegis256_module_init);
- module_exit(crypto_aegis256_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/aes_generic.c b/crypto/aes_generic.c
-index f217568917e4..fddcbe3edb0a 100644
---- a/crypto/aes_generic.c
-+++ b/crypto/aes_generic.c
-@@ -1470,7 +1470,7 @@ static void __exit aes_fini(void)
- crypto_unregister_alg(&aes_alg);
- }
-
--subsys_initcall(aes_init);
-+module_init(aes_init);
- module_exit(aes_fini);
-
- MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm");
-diff --git a/crypto/algboss.c b/crypto/algboss.c
-index bb97cfb38836..527b44d0af21 100644
---- a/crypto/algboss.c
-+++ b/crypto/algboss.c
-@@ -296,13 +296,7 @@ static void __exit cryptomgr_exit(void)
- BUG_ON(err);
- }
-
--/*
-- * 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);
-+subsys_initcall(cryptomgr_init);
- module_exit(cryptomgr_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c
-index c475c1129ff2..b19daa3c5dfa 100644
---- a/crypto/ansi_cprng.c
-+++ b/crypto/ansi_cprng.c
-@@ -466,7 +466,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)");
--subsys_initcall(prng_mod_init);
-+module_init(prng_mod_init);
- module_exit(prng_mod_fini);
- MODULE_ALIAS_CRYPTO("stdrng");
- MODULE_ALIAS_CRYPTO("ansi_cprng");
-diff --git a/crypto/anubis.c b/crypto/anubis.c
-index 673927de0eb9..4bb187c2a902 100644
---- a/crypto/anubis.c
-+++ b/crypto/anubis.c
-@@ -699,7 +699,7 @@ static void __exit anubis_mod_fini(void)
- crypto_unregister_alg(&anubis_alg);
- }
-
--subsys_initcall(anubis_mod_init);
-+module_init(anubis_mod_init);
- module_exit(anubis_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/arc4.c b/crypto/arc4.c
-index 2233d36456e2..6c93342e3405 100644
---- a/crypto/arc4.c
-+++ b/crypto/arc4.c
-@@ -163,7 +163,7 @@ static void __exit arc4_exit(void)
- crypto_unregister_skcipher(&arc4_skcipher);
- }
-
--subsys_initcall(arc4_init);
-+module_init(arc4_init);
- module_exit(arc4_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/authenc.c b/crypto/authenc.c
-index b3eddac7fa3a..4be293a4b5f0 100644
---- a/crypto/authenc.c
-+++ b/crypto/authenc.c
-@@ -508,7 +508,7 @@ static void __exit crypto_authenc_module_exit(void)
- crypto_unregister_template(&crypto_authenc_tmpl);
- }
-
--subsys_initcall(crypto_authenc_module_init);
-+module_init(crypto_authenc_module_init);
- module_exit(crypto_authenc_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/authencesn.c b/crypto/authencesn.c
-index 58074308e535..4741fe89ba2c 100644
---- a/crypto/authencesn.c
-+++ b/crypto/authencesn.c
-@@ -523,7 +523,7 @@ static void __exit crypto_authenc_esn_module_exit(void)
- crypto_unregister_template(&crypto_authenc_esn_tmpl);
- }
-
--subsys_initcall(crypto_authenc_esn_module_init);
-+module_init(crypto_authenc_esn_module_init);
- module_exit(crypto_authenc_esn_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/blowfish_generic.c b/crypto/blowfish_generic.c
-index 8548ced8b074..87b392a77a93 100644
---- a/crypto/blowfish_generic.c
-+++ b/crypto/blowfish_generic.c
-@@ -133,7 +133,7 @@ static void __exit blowfish_mod_fini(void)
- crypto_unregister_alg(&alg);
- }
-
--subsys_initcall(blowfish_mod_init);
-+module_init(blowfish_mod_init);
- module_exit(blowfish_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/camellia_generic.c b/crypto/camellia_generic.c
-index b6a1121e2478..48029b49f40a 100644
---- a/crypto/camellia_generic.c
-+++ b/crypto/camellia_generic.c
-@@ -1080,7 +1080,7 @@ static void __exit camellia_fini(void)
- crypto_unregister_alg(&camellia_alg);
- }
-
--subsys_initcall(camellia_init);
-+module_init(camellia_init);
- module_exit(camellia_fini);
-
- MODULE_DESCRIPTION("Camellia Cipher Algorithm");
-diff --git a/crypto/cast5_generic.c b/crypto/cast5_generic.c
-index 24bc7d4e33be..66169c178314 100644
---- a/crypto/cast5_generic.c
-+++ b/crypto/cast5_generic.c
-@@ -543,7 +543,7 @@ static void __exit cast5_mod_fini(void)
- crypto_unregister_alg(&alg);
- }
-
--subsys_initcall(cast5_mod_init);
-+module_init(cast5_mod_init);
- module_exit(cast5_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/cast6_generic.c b/crypto/cast6_generic.c
-index edd59cc34991..c8e5ec69790e 100644
---- a/crypto/cast6_generic.c
-+++ b/crypto/cast6_generic.c
-@@ -285,7 +285,7 @@ static void __exit cast6_mod_fini(void)
- crypto_unregister_alg(&alg);
- }
-
--subsys_initcall(cast6_mod_init);
-+module_init(cast6_mod_init);
- module_exit(cast6_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/cbc.c b/crypto/cbc.c
-index 129f79d03365..d12efaac9230 100644
---- a/crypto/cbc.c
-+++ b/crypto/cbc.c
-@@ -98,7 +98,7 @@ static void __exit crypto_cbc_module_exit(void)
- crypto_unregister_template(&crypto_cbc_tmpl);
- }
-
--subsys_initcall(crypto_cbc_module_init);
-+module_init(crypto_cbc_module_init);
- module_exit(crypto_cbc_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/ccm.c b/crypto/ccm.c
-index c1ef9d0b4271..f4caa149b9d2 100644
---- a/crypto/ccm.c
-+++ b/crypto/ccm.c
-@@ -1006,7 +1006,7 @@ static void __exit crypto_ccm_module_exit(void)
- ARRAY_SIZE(crypto_ccm_tmpls));
- }
-
--subsys_initcall(crypto_ccm_module_init);
-+module_init(crypto_ccm_module_init);
- module_exit(crypto_ccm_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/cfb.c b/crypto/cfb.c
-index 7b68fbb61732..03ac847f6d6a 100644
---- a/crypto/cfb.c
-+++ b/crypto/cfb.c
-@@ -243,7 +243,7 @@ static void __exit crypto_cfb_module_exit(void)
- crypto_unregister_template(&crypto_cfb_tmpl);
- }
-
--subsys_initcall(crypto_cfb_module_init);
-+module_init(crypto_cfb_module_init);
- module_exit(crypto_cfb_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/chacha20poly1305.c b/crypto/chacha20poly1305.c
-index e38a2d61819a..279d816ab51d 100644
---- a/crypto/chacha20poly1305.c
-+++ b/crypto/chacha20poly1305.c
-@@ -725,7 +725,7 @@ static void __exit chacha20poly1305_module_exit(void)
- ARRAY_SIZE(rfc7539_tmpls));
- }
-
--subsys_initcall(chacha20poly1305_module_init);
-+module_init(chacha20poly1305_module_init);
- module_exit(chacha20poly1305_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/chacha_generic.c b/crypto/chacha_generic.c
-index d2ec04997832..a7fae9b73ec4 100644
---- a/crypto/chacha_generic.c
-+++ b/crypto/chacha_generic.c
-@@ -201,7 +201,7 @@ static void __exit chacha_generic_mod_fini(void)
- crypto_unregister_skciphers(algs, ARRAY_SIZE(algs));
- }
-
--subsys_initcall(chacha_generic_mod_init);
-+module_init(chacha_generic_mod_init);
- module_exit(chacha_generic_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/cmac.c b/crypto/cmac.c
-index c60b6c011ec6..16301f52858c 100644
---- a/crypto/cmac.c
-+++ b/crypto/cmac.c
-@@ -313,7 +313,7 @@ static void __exit crypto_cmac_module_exit(void)
- crypto_unregister_template(&crypto_cmac_tmpl);
- }
-
--subsys_initcall(crypto_cmac_module_init);
-+module_init(crypto_cmac_module_init);
- module_exit(crypto_cmac_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/crc32_generic.c b/crypto/crc32_generic.c
-index 9e97912280bd..00facd27bcc2 100644
---- a/crypto/crc32_generic.c
-+++ b/crypto/crc32_generic.c
-@@ -146,7 +146,7 @@ static void __exit crc32_mod_fini(void)
- crypto_unregister_shash(&alg);
- }
-
--subsys_initcall(crc32_mod_init);
-+module_init(crc32_mod_init);
- module_exit(crc32_mod_fini);
-
- MODULE_AUTHOR("Alexander Boyko <alexander_boyko@xyratex.com>");
-diff --git a/crypto/crc32c_generic.c b/crypto/crc32c_generic.c
-index ad26f15d4c7b..7283066ecc98 100644
---- a/crypto/crc32c_generic.c
-+++ b/crypto/crc32c_generic.c
-@@ -165,7 +165,7 @@ static void __exit crc32c_mod_fini(void)
- crypto_unregister_shash(&alg);
- }
-
--subsys_initcall(crc32c_mod_init);
-+module_init(crc32c_mod_init);
- module_exit(crc32c_mod_fini);
-
- MODULE_AUTHOR("Clay Haapala <chaapala@cisco.com>");
-diff --git a/crypto/crct10dif_generic.c b/crypto/crct10dif_generic.c
-index d90c0070710e..d08048ae5552 100644
---- a/crypto/crct10dif_generic.c
-+++ b/crypto/crct10dif_generic.c
-@@ -112,7 +112,7 @@ static void __exit crct10dif_mod_fini(void)
- crypto_unregister_shash(&alg);
- }
-
--subsys_initcall(crct10dif_mod_init);
-+module_init(crct10dif_mod_init);
- module_exit(crct10dif_mod_fini);
-
- MODULE_AUTHOR("Tim Chen <tim.c.chen@linux.intel.com>");
-diff --git a/crypto/crypto_null.c b/crypto/crypto_null.c
-index 9320d4eaa4a8..01630a9c7e01 100644
---- a/crypto/crypto_null.c
-+++ b/crypto/crypto_null.c
-@@ -220,7 +220,7 @@ static void __exit crypto_null_mod_fini(void)
- crypto_unregister_skcipher(&skcipher_null);
- }
-
--subsys_initcall(crypto_null_mod_init);
-+module_init(crypto_null_mod_init);
- module_exit(crypto_null_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/ctr.c b/crypto/ctr.c
-index 52cdf2c5605f..ec8f8b67473a 100644
---- a/crypto/ctr.c
-+++ b/crypto/ctr.c
-@@ -384,7 +384,7 @@ static void __exit crypto_ctr_module_exit(void)
- ARRAY_SIZE(crypto_ctr_tmpls));
- }
-
--subsys_initcall(crypto_ctr_module_init);
-+module_init(crypto_ctr_module_init);
- module_exit(crypto_ctr_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/cts.c b/crypto/cts.c
-index 6b6087dbb62a..9441da797bb9 100644
---- a/crypto/cts.c
-+++ b/crypto/cts.c
-@@ -423,7 +423,7 @@ static void __exit crypto_cts_module_exit(void)
- crypto_unregister_template(&crypto_cts_tmpl);
- }
-
--subsys_initcall(crypto_cts_module_init);
-+module_init(crypto_cts_module_init);
- module_exit(crypto_cts_module_exit);
-
- MODULE_LICENSE("Dual BSD/GPL");
-diff --git a/crypto/deflate.c b/crypto/deflate.c
-index aab089cde1bf..94ec3b36a8e8 100644
---- a/crypto/deflate.c
-+++ b/crypto/deflate.c
-@@ -334,7 +334,7 @@ static void __exit deflate_mod_fini(void)
- crypto_unregister_scomps(scomp, ARRAY_SIZE(scomp));
- }
-
--subsys_initcall(deflate_mod_init);
-+module_init(deflate_mod_init);
- module_exit(deflate_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/des_generic.c b/crypto/des_generic.c
-index d7a88b4fa611..ebec1fb08c45 100644
---- a/crypto/des_generic.c
-+++ b/crypto/des_generic.c
-@@ -990,7 +990,7 @@ static void __exit des_generic_mod_fini(void)
- crypto_unregister_algs(des_algs, ARRAY_SIZE(des_algs));
- }
-
--subsys_initcall(des_generic_mod_init);
-+module_init(des_generic_mod_init);
- module_exit(des_generic_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/dh.c b/crypto/dh.c
-index ce77fb4ee8b3..09a44de4209d 100644
---- a/crypto/dh.c
-+++ b/crypto/dh.c
-@@ -236,7 +236,7 @@ static void dh_exit(void)
- crypto_unregister_kpp(&dh);
- }
-
--subsys_initcall(dh_init);
-+module_init(dh_init);
- module_exit(dh_exit);
- MODULE_ALIAS_CRYPTO("dh");
- MODULE_LICENSE("GPL");
-diff --git a/crypto/drbg.c b/crypto/drbg.c
-index 2a5b16bb000c..8115531bf749 100644
---- a/crypto/drbg.c
-+++ b/crypto/drbg.c
-@@ -2038,7 +2038,7 @@ static void __exit drbg_exit(void)
- crypto_unregister_rngs(drbg_algs, (ARRAY_SIZE(drbg_cores) * 2));
- }
-
--subsys_initcall(drbg_init);
-+module_init(drbg_init);
- module_exit(drbg_exit);
- #ifndef CRYPTO_DRBG_HASH_STRING
- #define CRYPTO_DRBG_HASH_STRING ""
-diff --git a/crypto/ecb.c b/crypto/ecb.c
-index de839129d151..0732715c8d91 100644
---- a/crypto/ecb.c
-+++ b/crypto/ecb.c
-@@ -101,7 +101,7 @@ static void __exit crypto_ecb_module_exit(void)
- crypto_unregister_template(&crypto_ecb_tmpl);
- }
-
--subsys_initcall(crypto_ecb_module_init);
-+module_init(crypto_ecb_module_init);
- module_exit(crypto_ecb_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/ecdh.c b/crypto/ecdh.c
-index 890092bd8989..bf6300175b9c 100644
---- a/crypto/ecdh.c
-+++ b/crypto/ecdh.c
-@@ -166,7 +166,7 @@ static void ecdh_exit(void)
- crypto_unregister_kpp(&ecdh);
- }
-
--subsys_initcall(ecdh_init);
-+module_init(ecdh_init);
- module_exit(ecdh_exit);
- MODULE_ALIAS_CRYPTO("ecdh");
- MODULE_LICENSE("GPL");
-diff --git a/crypto/echainiv.c b/crypto/echainiv.c
-index e71d1bc8d850..77e607fdbfb7 100644
---- a/crypto/echainiv.c
-+++ b/crypto/echainiv.c
-@@ -174,7 +174,7 @@ static void __exit echainiv_module_exit(void)
- crypto_unregister_template(&echainiv_tmpl);
- }
-
--subsys_initcall(echainiv_module_init);
-+module_init(echainiv_module_init);
- module_exit(echainiv_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/fcrypt.c b/crypto/fcrypt.c
-index 4e8704405a3b..77286ea28865 100644
---- a/crypto/fcrypt.c
-+++ b/crypto/fcrypt.c
-@@ -414,7 +414,7 @@ static void __exit fcrypt_mod_fini(void)
- crypto_unregister_alg(&fcrypt_alg);
- }
-
--subsys_initcall(fcrypt_mod_init);
-+module_init(fcrypt_mod_init);
- module_exit(fcrypt_mod_fini);
-
- MODULE_LICENSE("Dual BSD/GPL");
-diff --git a/crypto/fips.c b/crypto/fips.c
-index 9dfed122d6da..9d627c1cf8bc 100644
---- a/crypto/fips.c
-+++ b/crypto/fips.c
-@@ -74,5 +74,5 @@ static void __exit fips_exit(void)
- crypto_proc_fips_exit();
- }
-
--subsys_initcall(fips_init);
-+module_init(fips_init);
- module_exit(fips_exit);
-diff --git a/crypto/gcm.c b/crypto/gcm.c
-index 33f45a980967..eea16e726ede 100644
---- a/crypto/gcm.c
-+++ b/crypto/gcm.c
-@@ -1246,7 +1246,7 @@ static void __exit crypto_gcm_module_exit(void)
- ARRAY_SIZE(crypto_gcm_tmpls));
- }
-
--subsys_initcall(crypto_gcm_module_init);
-+module_init(crypto_gcm_module_init);
- module_exit(crypto_gcm_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/ghash-generic.c b/crypto/ghash-generic.c
-index e6307935413c..d9f192b953b2 100644
---- a/crypto/ghash-generic.c
-+++ b/crypto/ghash-generic.c
-@@ -149,7 +149,7 @@ static void __exit ghash_mod_exit(void)
- crypto_unregister_shash(&ghash_alg);
- }
-
--subsys_initcall(ghash_mod_init);
-+module_init(ghash_mod_init);
- module_exit(ghash_mod_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/hmac.c b/crypto/hmac.c
-index a68c1266121f..ab84027abe38 100644
---- a/crypto/hmac.c
-+++ b/crypto/hmac.c
-@@ -257,7 +257,7 @@ static void __exit hmac_module_exit(void)
- crypto_unregister_template(&hmac_tmpl);
- }
-
--subsys_initcall(hmac_module_init);
-+module_init(hmac_module_init);
- module_exit(hmac_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/jitterentropy-kcapi.c b/crypto/jitterentropy-kcapi.c
-index 6ea1a270b8dc..787dccca3715 100644
---- a/crypto/jitterentropy-kcapi.c
-+++ b/crypto/jitterentropy-kcapi.c
-@@ -198,7 +198,7 @@ static void __exit jent_mod_exit(void)
- crypto_unregister_rng(&jent_alg);
- }
-
--subsys_initcall(jent_mod_init);
-+module_init(jent_mod_init);
- module_exit(jent_mod_exit);
-
- MODULE_LICENSE("Dual BSD/GPL");
-diff --git a/crypto/keywrap.c b/crypto/keywrap.c
-index a155c88105ea..a5cfe610d8f4 100644
---- a/crypto/keywrap.c
-+++ b/crypto/keywrap.c
-@@ -310,7 +310,7 @@ static void __exit crypto_kw_exit(void)
- crypto_unregister_template(&crypto_kw_tmpl);
- }
-
--subsys_initcall(crypto_kw_init);
-+module_init(crypto_kw_init);
- module_exit(crypto_kw_exit);
-
- MODULE_LICENSE("Dual BSD/GPL");
-diff --git a/crypto/khazad.c b/crypto/khazad.c
-index b50aa8a3ab4c..873eb5ded6d7 100644
---- a/crypto/khazad.c
-+++ b/crypto/khazad.c
-@@ -875,7 +875,7 @@ static void __exit khazad_mod_fini(void)
- }
-
-
--subsys_initcall(khazad_mod_init);
-+module_init(khazad_mod_init);
- module_exit(khazad_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/lrw.c b/crypto/lrw.c
-index fa302f3f161e..cc5c89246193 100644
---- a/crypto/lrw.c
-+++ b/crypto/lrw.c
-@@ -437,7 +437,7 @@ static void __exit crypto_module_exit(void)
- crypto_unregister_template(&crypto_tmpl);
- }
-
--subsys_initcall(crypto_module_init);
-+module_init(crypto_module_init);
- module_exit(crypto_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/lz4.c b/crypto/lz4.c
-index 1e35134d0a98..c160dfdbf2e0 100644
---- a/crypto/lz4.c
-+++ b/crypto/lz4.c
-@@ -164,7 +164,7 @@ static void __exit lz4_mod_fini(void)
- crypto_unregister_scomp(&scomp);
- }
-
--subsys_initcall(lz4_mod_init);
-+module_init(lz4_mod_init);
- module_exit(lz4_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/lz4hc.c b/crypto/lz4hc.c
-index 4a220b628fe7..583b5e013d7a 100644
---- a/crypto/lz4hc.c
-+++ b/crypto/lz4hc.c
-@@ -165,7 +165,7 @@ static void __exit lz4hc_mod_fini(void)
- crypto_unregister_scomp(&scomp);
- }
-
--subsys_initcall(lz4hc_mod_init);
-+module_init(lz4hc_mod_init);
- module_exit(lz4hc_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/lzo-rle.c b/crypto/lzo-rle.c
-index 4c82bf18440f..ea9c75b1db49 100644
---- a/crypto/lzo-rle.c
-+++ b/crypto/lzo-rle.c
-@@ -167,7 +167,7 @@ static void __exit lzorle_mod_fini(void)
- crypto_unregister_scomp(&scomp);
- }
-
--subsys_initcall(lzorle_mod_init);
-+module_init(lzorle_mod_init);
- module_exit(lzorle_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/lzo.c b/crypto/lzo.c
-index 4a6ac8f247d0..218567d717d6 100644
---- a/crypto/lzo.c
-+++ b/crypto/lzo.c
-@@ -167,7 +167,7 @@ static void __exit lzo_mod_fini(void)
- crypto_unregister_scomp(&scomp);
- }
-
--subsys_initcall(lzo_mod_init);
-+module_init(lzo_mod_init);
- module_exit(lzo_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/md4.c b/crypto/md4.c
-index 9a1a228a0c69..9965ec40d9f9 100644
---- a/crypto/md4.c
-+++ b/crypto/md4.c
-@@ -232,7 +232,7 @@ static void __exit md4_mod_fini(void)
- crypto_unregister_shash(&alg);
- }
-
--subsys_initcall(md4_mod_init);
-+module_init(md4_mod_init);
- module_exit(md4_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/md5.c b/crypto/md5.c
-index 221c2c0932f8..94dd78144ba3 100644
---- a/crypto/md5.c
-+++ b/crypto/md5.c
-@@ -244,7 +244,7 @@ static void __exit md5_mod_fini(void)
- crypto_unregister_shash(&alg);
- }
-
--subsys_initcall(md5_mod_init);
-+module_init(md5_mod_init);
- module_exit(md5_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/michael_mic.c b/crypto/michael_mic.c
-index 538ae7933795..46195e0d0f4d 100644
---- a/crypto/michael_mic.c
-+++ b/crypto/michael_mic.c
-@@ -178,7 +178,7 @@ static void __exit michael_mic_exit(void)
- }
-
-
--subsys_initcall(michael_mic_init);
-+module_init(michael_mic_init);
- module_exit(michael_mic_exit);
-
- MODULE_LICENSE("GPL v2");
-diff --git a/crypto/morus1280.c b/crypto/morus1280.c
-index f8734c6576af..0747732d5b78 100644
---- a/crypto/morus1280.c
-+++ b/crypto/morus1280.c
-@@ -532,7 +532,7 @@ static void __exit crypto_morus1280_module_exit(void)
- crypto_unregister_aead(&crypto_morus1280_alg);
- }
-
--subsys_initcall(crypto_morus1280_module_init);
-+module_init(crypto_morus1280_module_init);
- module_exit(crypto_morus1280_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/morus640.c b/crypto/morus640.c
-index ae5aa9482cb4..1617a1eb8be1 100644
---- a/crypto/morus640.c
-+++ b/crypto/morus640.c
-@@ -523,7 +523,7 @@ static void __exit crypto_morus640_module_exit(void)
- crypto_unregister_aead(&crypto_morus640_alg);
- }
-
--subsys_initcall(crypto_morus640_module_init);
-+module_init(crypto_morus640_module_init);
- module_exit(crypto_morus640_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/nhpoly1305.c b/crypto/nhpoly1305.c
-index 9ab4e07cde4d..ec831a5594d8 100644
---- a/crypto/nhpoly1305.c
-+++ b/crypto/nhpoly1305.c
-@@ -244,7 +244,7 @@ static void __exit nhpoly1305_mod_exit(void)
- crypto_unregister_shash(&nhpoly1305_alg);
- }
-
--subsys_initcall(nhpoly1305_mod_init);
-+module_init(nhpoly1305_mod_init);
- module_exit(nhpoly1305_mod_exit);
-
- MODULE_DESCRIPTION("NHPoly1305 ε-almost-∆-universal hash function");
-diff --git a/crypto/ofb.c b/crypto/ofb.c
-index 133ff4c7f2c6..34b6e1f426f7 100644
---- a/crypto/ofb.c
-+++ b/crypto/ofb.c
-@@ -95,7 +95,7 @@ static void __exit crypto_ofb_module_exit(void)
- crypto_unregister_template(&crypto_ofb_tmpl);
- }
-
--subsys_initcall(crypto_ofb_module_init);
-+module_init(crypto_ofb_module_init);
- module_exit(crypto_ofb_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/pcbc.c b/crypto/pcbc.c
-index 31b3ce948474..2fa03fc576fe 100644
---- a/crypto/pcbc.c
-+++ b/crypto/pcbc.c
-@@ -191,7 +191,7 @@ static void __exit crypto_pcbc_module_exit(void)
- crypto_unregister_template(&crypto_pcbc_tmpl);
- }
-
--subsys_initcall(crypto_pcbc_module_init);
-+module_init(crypto_pcbc_module_init);
- module_exit(crypto_pcbc_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c
-index 0e9ce329fd47..d47cfc47b1b1 100644
---- a/crypto/pcrypt.c
-+++ b/crypto/pcrypt.c
-@@ -512,7 +512,7 @@ static void __exit pcrypt_exit(void)
- crypto_unregister_template(&pcrypt_tmpl);
- }
-
--subsys_initcall(pcrypt_init);
-+module_init(pcrypt_init);
- module_exit(pcrypt_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/poly1305_generic.c b/crypto/poly1305_generic.c
-index adc40298c749..2a06874204e8 100644
---- a/crypto/poly1305_generic.c
-+++ b/crypto/poly1305_generic.c
-@@ -318,7 +318,7 @@ static void __exit poly1305_mod_exit(void)
- crypto_unregister_shash(&poly1305_alg);
- }
-
--subsys_initcall(poly1305_mod_init);
-+module_init(poly1305_mod_init);
- module_exit(poly1305_mod_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/rmd128.c b/crypto/rmd128.c
-index faf4252c4b85..5f4472256e27 100644
---- a/crypto/rmd128.c
-+++ b/crypto/rmd128.c
-@@ -318,7 +318,7 @@ static void __exit rmd128_mod_fini(void)
- crypto_unregister_shash(&alg);
- }
-
--subsys_initcall(rmd128_mod_init);
-+module_init(rmd128_mod_init);
- module_exit(rmd128_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/rmd160.c b/crypto/rmd160.c
-index b33309916d4f..737645344d1c 100644
---- a/crypto/rmd160.c
-+++ b/crypto/rmd160.c
-@@ -362,7 +362,7 @@ static void __exit rmd160_mod_fini(void)
- crypto_unregister_shash(&alg);
- }
-
--subsys_initcall(rmd160_mod_init);
-+module_init(rmd160_mod_init);
- module_exit(rmd160_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/rmd256.c b/crypto/rmd256.c
-index 2a643250c9a5..0e9d30676a01 100644
---- a/crypto/rmd256.c
-+++ b/crypto/rmd256.c
-@@ -337,7 +337,7 @@ static void __exit rmd256_mod_fini(void)
- crypto_unregister_shash(&alg);
- }
-
--subsys_initcall(rmd256_mod_init);
-+module_init(rmd256_mod_init);
- module_exit(rmd256_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/rmd320.c b/crypto/rmd320.c
-index 2f062574fc8c..3ae1df5bb48c 100644
---- a/crypto/rmd320.c
-+++ b/crypto/rmd320.c
-@@ -386,7 +386,7 @@ static void __exit rmd320_mod_fini(void)
- crypto_unregister_shash(&alg);
- }
-
--subsys_initcall(rmd320_mod_init);
-+module_init(rmd320_mod_init);
- module_exit(rmd320_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/rsa.c b/crypto/rsa.c
-index 4cdbec95d077..07ab51798537 100644
---- a/crypto/rsa.c
-+++ b/crypto/rsa.c
-@@ -278,7 +278,7 @@ static void rsa_exit(void)
- crypto_unregister_akcipher(&rsa);
- }
-
--subsys_initcall(rsa_init);
-+module_init(rsa_init);
- module_exit(rsa_exit);
- MODULE_ALIAS_CRYPTO("rsa");
- MODULE_LICENSE("GPL");
-diff --git a/crypto/salsa20_generic.c b/crypto/salsa20_generic.c
-index c81a44404086..faed244be316 100644
---- a/crypto/salsa20_generic.c
-+++ b/crypto/salsa20_generic.c
-@@ -203,7 +203,7 @@ static void __exit salsa20_generic_mod_fini(void)
- crypto_unregister_skcipher(&alg);
- }
-
--subsys_initcall(salsa20_generic_mod_init);
-+module_init(salsa20_generic_mod_init);
- module_exit(salsa20_generic_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/seed.c b/crypto/seed.c
-index a75ac50fa4fd..c6ba8438be43 100644
---- a/crypto/seed.c
-+++ b/crypto/seed.c
-@@ -470,7 +470,7 @@ static void __exit seed_fini(void)
- crypto_unregister_alg(&seed_alg);
- }
-
--subsys_initcall(seed_init);
-+module_init(seed_init);
- module_exit(seed_fini);
-
- MODULE_DESCRIPTION("SEED Cipher Algorithm");
-diff --git a/crypto/seqiv.c b/crypto/seqiv.c
-index 3f2fad615d26..ed1b0e9f2436 100644
---- a/crypto/seqiv.c
-+++ b/crypto/seqiv.c
-@@ -211,7 +211,7 @@ static void __exit seqiv_module_exit(void)
- crypto_unregister_template(&seqiv_tmpl);
- }
-
--subsys_initcall(seqiv_module_init);
-+module_init(seqiv_module_init);
- module_exit(seqiv_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/serpent_generic.c b/crypto/serpent_generic.c
-index ec4ec89ad108..7c3382facc82 100644
---- a/crypto/serpent_generic.c
-+++ b/crypto/serpent_generic.c
-@@ -664,7 +664,7 @@ static void __exit serpent_mod_fini(void)
- crypto_unregister_algs(srp_algs, ARRAY_SIZE(srp_algs));
- }
-
--subsys_initcall(serpent_mod_init);
-+module_init(serpent_mod_init);
- module_exit(serpent_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/sha1_generic.c b/crypto/sha1_generic.c
-index 1b806d4584b2..2af64ef81f40 100644
---- a/crypto/sha1_generic.c
-+++ b/crypto/sha1_generic.c
-@@ -92,7 +92,7 @@ static void __exit sha1_generic_mod_fini(void)
- crypto_unregister_shash(&alg);
- }
-
--subsys_initcall(sha1_generic_mod_init);
-+module_init(sha1_generic_mod_init);
- module_exit(sha1_generic_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/sha256_generic.c b/crypto/sha256_generic.c
-index 5844e9a469e8..1e5ba6649e8d 100644
---- a/crypto/sha256_generic.c
-+++ b/crypto/sha256_generic.c
-@@ -301,7 +301,7 @@ static void __exit sha256_generic_mod_fini(void)
- crypto_unregister_shashes(sha256_algs, ARRAY_SIZE(sha256_algs));
- }
-
--subsys_initcall(sha256_generic_mod_init);
-+module_init(sha256_generic_mod_init);
- module_exit(sha256_generic_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/sha3_generic.c b/crypto/sha3_generic.c
-index 60fd2be609d8..7ed98367d4fb 100644
---- a/crypto/sha3_generic.c
-+++ b/crypto/sha3_generic.c
-@@ -294,7 +294,7 @@ static void __exit sha3_generic_mod_fini(void)
- crypto_unregister_shashes(algs, ARRAY_SIZE(algs));
- }
-
--subsys_initcall(sha3_generic_mod_init);
-+module_init(sha3_generic_mod_init);
- module_exit(sha3_generic_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c
-index e34d09dd9971..ebc262d76bfb 100644
---- a/crypto/sha512_generic.c
-+++ b/crypto/sha512_generic.c
-@@ -218,7 +218,7 @@ static void __exit sha512_generic_mod_fini(void)
- crypto_unregister_shashes(sha512_algs, ARRAY_SIZE(sha512_algs));
- }
-
--subsys_initcall(sha512_generic_mod_init);
-+module_init(sha512_generic_mod_init);
- module_exit(sha512_generic_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/sm3_generic.c b/crypto/sm3_generic.c
-index e227bcada2a2..c0cf87ae7ef6 100644
---- a/crypto/sm3_generic.c
-+++ b/crypto/sm3_generic.c
-@@ -199,7 +199,7 @@ static void __exit sm3_generic_mod_fini(void)
- crypto_unregister_shash(&sm3_alg);
- }
-
--subsys_initcall(sm3_generic_mod_init);
-+module_init(sm3_generic_mod_init);
- module_exit(sm3_generic_mod_fini);
-
- MODULE_LICENSE("GPL v2");
-diff --git a/crypto/sm4_generic.c b/crypto/sm4_generic.c
-index 71ffb343709a..c18eebfd5edd 100644
---- a/crypto/sm4_generic.c
-+++ b/crypto/sm4_generic.c
-@@ -237,7 +237,7 @@ static void __exit sm4_fini(void)
- crypto_unregister_alg(&sm4_alg);
- }
-
--subsys_initcall(sm4_init);
-+module_init(sm4_init);
- module_exit(sm4_fini);
-
- MODULE_DESCRIPTION("SM4 Cipher Algorithm");
-diff --git a/crypto/streebog_generic.c b/crypto/streebog_generic.c
-index 63663c3bab7e..b82fc3d79aa1 100644
---- a/crypto/streebog_generic.c
-+++ b/crypto/streebog_generic.c
-@@ -1128,7 +1128,7 @@ static void __exit streebog_mod_fini(void)
- crypto_unregister_shashes(algs, ARRAY_SIZE(algs));
- }
-
--subsys_initcall(streebog_mod_init);
-+module_init(streebog_mod_init);
- module_exit(streebog_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
-index 798253f05203..1ea2d5007ff5 100644
---- a/crypto/tcrypt.c
-+++ b/crypto/tcrypt.c
-@@ -3053,7 +3053,7 @@ static int __init tcrypt_mod_init(void)
- */
- static void __exit tcrypt_mod_fini(void) { }
-
--subsys_initcall(tcrypt_mod_init);
-+module_init(tcrypt_mod_init);
- module_exit(tcrypt_mod_fini);
-
- module_param(alg, charp, 0);
-diff --git a/crypto/tea.c b/crypto/tea.c
-index 786b589e1399..b70b441c7d1e 100644
---- a/crypto/tea.c
-+++ b/crypto/tea.c
-@@ -274,7 +274,7 @@ MODULE_ALIAS_CRYPTO("tea");
- MODULE_ALIAS_CRYPTO("xtea");
- MODULE_ALIAS_CRYPTO("xeta");
-
--subsys_initcall(tea_mod_init);
-+module_init(tea_mod_init);
- module_exit(tea_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/tgr192.c b/crypto/tgr192.c
-index 40020f8adc46..f8e1d9f9938f 100644
---- a/crypto/tgr192.c
-+++ b/crypto/tgr192.c
-@@ -677,7 +677,7 @@ MODULE_ALIAS_CRYPTO("tgr192");
- MODULE_ALIAS_CRYPTO("tgr160");
- MODULE_ALIAS_CRYPTO("tgr128");
-
--subsys_initcall(tgr192_mod_init);
-+module_init(tgr192_mod_init);
- module_exit(tgr192_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/twofish_generic.c b/crypto/twofish_generic.c
-index 4f7c033224f9..e5bfc21c36cf 100644
---- a/crypto/twofish_generic.c
-+++ b/crypto/twofish_generic.c
-@@ -192,7 +192,7 @@ static void __exit twofish_mod_fini(void)
- crypto_unregister_alg(&alg);
- }
-
--subsys_initcall(twofish_mod_init);
-+module_init(twofish_mod_init);
- module_exit(twofish_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/vmac.c b/crypto/vmac.c
-index f50a85060b39..5f436dfdfc61 100644
---- a/crypto/vmac.c
-+++ b/crypto/vmac.c
-@@ -690,7 +690,7 @@ static void __exit vmac_module_exit(void)
- crypto_unregister_template(&vmac64_tmpl);
- }
-
--subsys_initcall(vmac_module_init);
-+module_init(vmac_module_init);
- module_exit(vmac_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/wp512.c b/crypto/wp512.c
-index 1b8e502d999f..149e577fb772 100644
---- a/crypto/wp512.c
-+++ b/crypto/wp512.c
-@@ -1168,7 +1168,7 @@ MODULE_ALIAS_CRYPTO("wp512");
- MODULE_ALIAS_CRYPTO("wp384");
- MODULE_ALIAS_CRYPTO("wp256");
-
--subsys_initcall(wp512_mod_init);
-+module_init(wp512_mod_init);
- module_exit(wp512_mod_fini);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/xcbc.c b/crypto/xcbc.c
-index 0bb26e8f6f5a..6d7dc0fa6784 100644
---- a/crypto/xcbc.c
-+++ b/crypto/xcbc.c
-@@ -270,7 +270,7 @@ static void __exit crypto_xcbc_module_exit(void)
- crypto_unregister_template(&crypto_xcbc_tmpl);
- }
-
--subsys_initcall(crypto_xcbc_module_init);
-+module_init(crypto_xcbc_module_init);
- module_exit(crypto_xcbc_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/xts.c b/crypto/xts.c
-index 33cf726df4ac..2f948328cabb 100644
---- a/crypto/xts.c
-+++ b/crypto/xts.c
-@@ -363,7 +363,7 @@ static void __exit crypto_module_exit(void)
- crypto_unregister_template(&crypto_tmpl);
- }
-
--subsys_initcall(crypto_module_init);
-+module_init(crypto_module_init);
- module_exit(crypto_module_exit);
-
- MODULE_LICENSE("GPL");
-diff --git a/crypto/zstd.c b/crypto/zstd.c
-index 2c04055e407f..9a76b3ed8b8b 100644
---- a/crypto/zstd.c
-+++ b/crypto/zstd.c
-@@ -257,7 +257,7 @@ static void __exit zstd_mod_fini(void)
- crypto_unregister_scomp(&scomp);
- }
-
--subsys_initcall(zstd_mod_init);
-+module_init(zstd_mod_init);
- module_exit(zstd_mod_fini);
-
- MODULE_LICENSE("GPL");
---
-2.21.0
-
diff --git a/crypto-ghash-fix-unaligned-memory-access-in-ghash_setkey.patch b/crypto-ghash-fix-unaligned-memory-access-in-ghash_setkey.patch
new file mode 100644
index 000000000..f0de198b4
--- /dev/null
+++ b/crypto-ghash-fix-unaligned-memory-access-in-ghash_setkey.patch
@@ -0,0 +1,142 @@
+From patchwork Thu May 30 17:50:39 2019
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Eric Biggers <ebiggers@kernel.org>
+X-Patchwork-Id: 10969147
+Return-Path:
+ <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
+Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
+ [172.30.200.125])
+ by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 39D0814C0
+ for <patchwork-linux-arm@patchwork.kernel.org>;
+ Thu, 30 May 2019 17:51:56 +0000 (UTC)
+Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
+ by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28A9728C00
+ for <patchwork-linux-arm@patchwork.kernel.org>;
+ Thu, 30 May 2019 17:51:56 +0000 (UTC)
+Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
+ id 1C78028C0A; Thu, 30 May 2019 17:51:56 +0000 (UTC)
+X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
+ pdx-wl-mail.web.codeaurora.org
+X-Spam-Level:
+X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED,
+ DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1
+Received: from bombadil.infradead.org (bombadil.infradead.org
+ [198.137.202.133])
+ (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
+ (No client certificate requested)
+ by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B197628C0C
+ for <patchwork-linux-arm@patchwork.kernel.org>;
+ Thu, 30 May 2019 17:51:55 +0000 (UTC)
+DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
+ d=lists.infradead.org; s=bombadil.20170209; h=Sender:
+ Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:
+ List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To
+ :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:
+ Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:
+ List-Owner; bh=CNSxoFvnqNOKLw5IF2bRVNsbx0OBmDMrD3iLmG0w6/0=; b=Ut1/1rp209fwMB
+ BGNwLQoUhOy0VzSHRlu9bynYddVY64Hme75tVBdecGOwpejga50uQ/qqonHcT3zY9UNHPxqnWJkCc
+ +cCFO73krVE6DPfSoeSSgYyEFxj1vKbrqvaZEmJMf63dXY+kDQQUFaKrXemNEwe1w4IGhfvH0kdPX
+ P5qiWS+vtPES3xiX9Ib4CoHYfZK1PK15mpoa3UdxsDUDCbWh0JB6PDhA8Z4hyKk05QDdHyeZ0IW/m
+ Y+xI4v4HT4nNquQDAZ6pcvD5eo3z+F7JrIWxliKzK4tpbnuufutuh1uEgZE8xkY4nKNPN8oefkcuK
+ ItWkVJ8LzibR3g7ToZcg==;
+Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
+ by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
+ id 1hWPDQ-0000dL-32; Thu, 30 May 2019 17:51:48 +0000
+Received: from mail.kernel.org ([198.145.29.99])
+ by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
+ id 1hWPDN-0000d1-N0
+ for linux-arm-kernel@lists.infradead.org; Thu, 30 May 2019 17:51:46 +0000
+Received: from ebiggers-linuxstation.mtv.corp.google.com (unknown
+ [104.132.1.77])
+ (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
+ (No client certificate requested)
+ by mail.kernel.org (Postfix) with ESMTPSA id 298D925EBD;
+ Thu, 30 May 2019 17:51:45 +0000 (UTC)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
+ s=default; t=1559238705;
+ bh=i3XOSxLt0gd25Lvgu66PwiGPL7WdnuFqSIPbfSPRNvs=;
+ h=From:To:Cc:Subject:Date:From;
+ b=rdLpfIoVgc/waPa/9jjiNG++x8Ie13iqFnrqFxGMBVvq5z5bOtk5kqjgmoUd9EqNh
+ xaTAvep02q+Ww1Bxy9imO7Z98/KYj5jqMwhBXRwW10U8QdMwnmPyXc4nz19bRSP2XJ
+ Xaix7O+I2Qi5LiV+n1IAEWeN19gjYBYLSopFY8Cw=
+From: Eric Biggers <ebiggers@kernel.org>
+To: linux-crypto@vger.kernel.org
+Subject: [PATCH] crypto: ghash - fix unaligned memory access in ghash_setkey()
+Date: Thu, 30 May 2019 10:50:39 -0700
+Message-Id: <20190530175039.195574-1-ebiggers@kernel.org>
+X-Mailer: git-send-email 2.22.0.rc1.257.g3120a18244-goog
+MIME-Version: 1.0
+X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
+X-CRM114-CacheID: sfid-20190530_105145_765710_080A4ED4
+X-CRM114-Status: GOOD ( 12.92 )
+X-BeenThere: linux-arm-kernel@lists.infradead.org
+X-Mailman-Version: 2.1.21
+Precedence: list
+List-Id: <linux-arm-kernel.lists.infradead.org>
+List-Unsubscribe:
+ <http://lists.infradead.org/mailman/options/linux-arm-kernel>,
+ <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
+List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
+List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
+List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
+List-Subscribe:
+ <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
+ <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
+Cc: stable@vger.kernel.org, Peter Robinson <pbrobinson@gmail.com>,
+ linux-arm-kernel@lists.infradead.org
+Content-Type: text/plain; charset="us-ascii"
+Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
+Errors-To:
+ linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
+X-Virus-Scanned: ClamAV using ClamSMTP
+
+From: Eric Biggers <ebiggers@google.com>
+
+Changing ghash_mod_init() to be subsys_initcall made it start running
+before the alignment fault handler has been installed on ARM. In kernel
+builds where the keys in the ghash test vectors happened to be
+misaligned in the kernel image, this exposed the longstanding bug that
+ghash_setkey() is incorrectly casting the key buffer (which can have any
+alignment) to be128 for passing to gf128mul_init_4k_lle().
+
+Fix this by memcpy()ing the key to a temporary buffer.
+
+Don't fix it by setting an alignmask on the algorithm instead because
+that would unnecessarily force alignment of the data too.
+
+Fixes: 2cdc6899a88e ("crypto: ghash - Add GHASH digest algorithm for GCM")
+Reported-by: Peter Robinson <pbrobinson@gmail.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Eric Biggers <ebiggers@google.com>
+---
+ crypto/ghash-generic.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/crypto/ghash-generic.c b/crypto/ghash-generic.c
+index e6307935413c1..c8a347798eae6 100644
+--- a/crypto/ghash-generic.c
++++ b/crypto/ghash-generic.c
+@@ -34,6 +34,7 @@ static int ghash_setkey(struct crypto_shash *tfm,
+ const u8 *key, unsigned int keylen)
+ {
+ struct ghash_ctx *ctx = crypto_shash_ctx(tfm);
++ be128 k;
+
+ if (keylen != GHASH_BLOCK_SIZE) {
+ crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
+@@ -42,7 +43,12 @@ static int ghash_setkey(struct crypto_shash *tfm,
+
+ if (ctx->gf128)
+ gf128mul_free_4k(ctx->gf128);
+- ctx->gf128 = gf128mul_init_4k_lle((be128 *)key);
++
++ BUILD_BUG_ON(sizeof(k) != GHASH_BLOCK_SIZE);
++ memcpy(&k, key, GHASH_BLOCK_SIZE); /* avoid violating alignment rules */
++ ctx->gf128 = gf128mul_init_4k_lle(&k);
++ memzero_explicit(&k, GHASH_BLOCK_SIZE);
++
+ if (!ctx->gf128)
+ return -ENOMEM;
+
diff --git a/kernel.spec b/kernel.spec
index 42baab9c0..db2d729df 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -579,7 +579,7 @@ Patch524: net-vhost_net-fix-possible-infinite-loop.patch
Patch526: s390-mark-__cpacf_check_opcode-and-cpacf_query_func-as-__always_inline.patch
Patch527: v2-powerpc-mm-mark-more-tlb-functions-as-__always_inline.patch
-Patch530: 0001-Revert-crypto-run-initcalls-for-generic-implementati.patch
+Patch530: crypto-ghash-fix-unaligned-memory-access-in-ghash_setkey.patch
# END OF PATCH DEFINITIONS