tcp: rate limit synflood warnings further
Subsystems (3)
PATCH 1/1 tcp: rate limit synflood warnings further
From: Willem de Bruijn <[email protected]>
Convert pr_info to net_info_ratelimited to limit the total number of synflood warnings.
Commit 946cedccbd73 ("tcp: Change possible SYN flooding messages") rate limits synflood warnings to one per listener.
Workloads that open many listener sockets can still see a high rate of log messages. Syzkaller is one frequent example.
--- net/ipv4/tcp_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/ipv4/tcp_input.c +2 -2
@@ -6380,8 +6380,8 @@ static bool tcp_syn_flood_action(const struct sock *sk,if (!queue->synflood_warned && net->ipv4.sysctl_tcp_syncookies !=2 &&xchg (&queue->synflood_warned,1 ) ==0 ) -pr_info ("%s: Possible SYN flooding on port %d. %s. Check SNMP counters.\n" , - proto,ntohs (tcp_hdr (skb)->dest), msg); +net_info_ratelimited ("%s: Possible SYN flooding on port %d. %s. Check SNMP counters.\n" , + proto,ntohs (tcp_hdr (skb)->dest), msg);return want_cookie; }
Signature · 1 line
2.19.0.rc2.392.g5ba43deb5a-goog
Quoted 5 lines · Willem de Bruijn
From: Willem de Bruijn <[email protected]>
Convert
pr_infotonet_info_ratelimitedto limit the total number of synflood warnings.
Quoted 7 lines
Commit
946cedccbd73("tcp: Change possible SYN flooding messages") rate limits synflood warnings to one per listener.Workloads that open many listener sockets can still see a high rate of log messages. Syzkaller is one frequent example.
Signed-off-by Willem de Bruijn <[email protected]>
Thanks Willem
From: Willem de Bruijn <[email protected]>
Date: Sun, 9 Sep 2018 19:12:12 -0400
Quoted 5 lines
From: Willem de Bruijn <[email protected]>
Convert
pr_infotonet_info_ratelimitedto limit the total number of synflood warnings.
Quoted 7 lines
Commit
946cedccbd73("tcp: Change possible SYN flooding messages") rate limits synflood warnings to one per listener.Workloads that open many listener sockets can still see a high rate of log messages. Syzkaller is one frequent example.
Signed-off-by Willem de Bruijn <[email protected]>
Applied, thanks Willem.
Is this stable material?
Quoted 12 lines · David Miller
From: Willem de Bruijn <[email protected]>
Date: Sun, 9 Sep 2018 19:12:12 -0400Quoted 8 lines
From: Willem de Bruijn <[email protected]>
Convert
pr_infotonet_info_ratelimitedto limit the total number of synflood warnings.Commit
946cedccbd73("tcp: Change possible SYN flooding messages") rate limits synflood warnings to one per listener.
Quoted 8 lines
Quoted 4 lines
Workloads that open many listener sockets can still see a high rate of log messages. Syzkaller is one frequent example.
Signed-off-by Willem de Bruijn <[email protected]>Applied, thanks Willem.
Is this stable material?
Thanks. Probably not. A process has to keep opening new listeners at high rate while under load. I've only seen syzkaller do that.