diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-02-26 14:01:24 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-03-02 16:42:29 +0100 |
commit | ea81962ee58922fa9f1eadcebbae893262e5dd03 (patch) | |
tree | 06ddde413aa7a99ab0a41b3bdd5ca264e426a20e /src/crypto/chacha20poly1305.c | |
parent | Kconfig: require DST_CACHE explicitly (diff) | |
download | wireguard-monolithic-historical-ea81962ee58922fa9f1eadcebbae893262e5dd03.tar.xz wireguard-monolithic-historical-ea81962ee58922fa9f1eadcebbae893262e5dd03.zip |
crypto: read only after init
Diffstat (limited to 'src/crypto/chacha20poly1305.c')
-rw-r--r-- | src/crypto/chacha20poly1305.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/crypto/chacha20poly1305.c b/src/crypto/chacha20poly1305.c index 25eb4b4..45825e9 100644 --- a/src/crypto/chacha20poly1305.c +++ b/src/crypto/chacha20poly1305.c @@ -38,11 +38,11 @@ asmlinkage void chacha20_avx512vl(u8 *out, const u8 *in, size_t len, const u32 k asmlinkage void poly1305_blocks_avx512(void *ctx, const u8 *inp, size_t len, u32 padbit); #endif -static bool chacha20poly1305_use_ssse3 __read_mostly; -static bool chacha20poly1305_use_avx __read_mostly; -static bool chacha20poly1305_use_avx2 __read_mostly; -static bool chacha20poly1305_use_avx512 __read_mostly; -static bool chacha20poly1305_use_avx512vl __read_mostly; +static bool chacha20poly1305_use_ssse3 __ro_after_init; +static bool chacha20poly1305_use_avx __ro_after_init; +static bool chacha20poly1305_use_avx2 __ro_after_init; +static bool chacha20poly1305_use_avx512 __ro_after_init; +static bool chacha20poly1305_use_avx512vl __ro_after_init; void __init chacha20poly1305_fpu_init(void) { @@ -74,7 +74,7 @@ asmlinkage void poly1305_blocks_neon(void *ctx, const u8 *inp, size_t len, u32 p asmlinkage void poly1305_emit_neon(void *ctx, u8 mac[16], const u32 nonce[4]); asmlinkage void chacha20_neon(u8 *out, const u8 *in, size_t len, const u32 key[8], const u32 counter[4]); #endif -static bool chacha20poly1305_use_neon __read_mostly; +static bool chacha20poly1305_use_neon __ro_after_init; void __init chacha20poly1305_fpu_init(void) { #if defined(CONFIG_ARM64) |