Skip to contentSkip to conversation

tcp: syncookies: mark cookie_secret read_mostly

PATCH Applied Florian Westphal 2 participants 2 messages Aug 26, 2014 – Aug 27, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcp: syncookies: mark cookie_secret read_mostly

only written once.

---
 net/ipv4/syncookies.c | 2 +-
 net/ipv6/syncookies.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
net/ipv4/syncookies.c +1 -1
index c0c7568..0431a8f 100644
@@ -25,7 +25,7 @@
 
 extern int sysctl_tcp_syncookies;
 
-static u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS];
+static u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS] __read_mostly;
 
 #define COOKIEBITS 24	/* Upper bits store count */
 #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)
net/ipv6/syncookies.c +1 -1
index 83cea1d..c643dc9 100644
@@ -24,7 +24,7 @@
 #define COOKIEBITS 24	/* Upper bits store count */
 #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)
 
-static u32 syncookie6_secret[2][16-4+SHA_DIGEST_WORDS];
+static u32 syncookie6_secret[2][16-4+SHA_DIGEST_WORDS] __read_mostly;
 
 /* RFC 2460, Section 8.3:
  * [ipv6 tcp] MSS must be computed as the maximum packet size minus 60 [..]
Signature · 1 line
1.8.1.5