summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-12 02:14:26 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-17 19:26:07 +0200
commit7d20bbe34d188a3bd88244bf589c7098ab4de8b6 (patch)
treea835afb420eb31365b4ce259f9008afd840bad41
parent958f87064455504d461e7a5b0e8baf6a6c2729f0 (diff)
noise: handshake constants can be read-only after init
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--src/noise.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/noise.c b/src/noise.c
index f4d4deb..72b57cc 100644
--- a/src/noise.c
+++ b/src/noise.c
@@ -24,8 +24,8 @@
static const u8 handshake_name[37] = "Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s";
static const u8 identifier_name[34] = "WireGuard v1 zx2c4 Jason@zx2c4.com";
-static u8 handshake_init_hash[NOISE_HASH_LEN] __read_mostly;
-static u8 handshake_init_chaining_key[NOISE_HASH_LEN] __read_mostly;
+static u8 handshake_init_hash[NOISE_HASH_LEN] __ro_after_init;
+static u8 handshake_init_chaining_key[NOISE_HASH_LEN] __ro_after_init;
static atomic64_t keypair_counter = ATOMIC64_INIT(0);
void __init noise_init(void)