diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-18 02:18:47 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-18 04:21:16 +0200 |
commit | f0ea799b1b0e920e4fd00d977dffa240f527bbee (patch) | |
tree | f86425e432311c170a5d5daf76c52c514ec3c3ef /src/crypto/zinc/chacha20/chacha20.c | |
parent | 79d03265d419bf9021144ad32a40cae8991ced97 (diff) |
crypto: allow for disabling simd in zinc modules
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc/chacha20/chacha20.c')
-rw-r--r-- | src/crypto/zinc/chacha20/chacha20.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/crypto/zinc/chacha20/chacha20.c b/src/crypto/zinc/chacha20/chacha20.c index 2b3644f..ef2404f 100644 --- a/src/crypto/zinc/chacha20/chacha20.c +++ b/src/crypto/zinc/chacha20/chacha20.c @@ -172,13 +172,16 @@ void hchacha20(u8 derived_key[CHACHA20_KEY_SIZE], } EXPORT_SYMBOL(hchacha20); +static bool nosimd __initdata = false; + #ifndef COMPAT_ZINC_IS_A_MODULE int __init chacha20_mod_init(void) #else static int __init mod_init(void) #endif { - chacha20_fpu_init(); + if (!nosimd) + chacha20_fpu_init(); return 0; } @@ -187,6 +190,7 @@ static void __exit mod_exit(void) { } +module_param(nosimd, bool, 0); module_init(mod_init); module_exit(mod_exit); MODULE_LICENSE("GPL v2"); |