Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/3] tcp: avoid integer wraps in the RTT estimator and the RTO
@ 2026-11-18  0:50 Chris Mason
  2026-11-18  0:50 ` [PATCH net 1/3] tcp: don't let __tcp_set_rto() return 0 Chris Mason
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Mason @ 2026-11-18  0:50 UTC (permalink / raw)
  To: mason, edumazet, ncardwell, kuniyu, davem, kuba, pabeni, horms,
	willemb, josef, netdev

Hi everyone,

These three patches keep large RTT samples from wrapping the u32 fields
of the TCP RTT estimator.

Patch 1: __tcp_set_rto() never returns 0, so that the backoff recovers
from any state of the RTT estimator.

Patch 2: tcp_rtt_estimator() clamps each sample to 120 s, so that
srtt_us, mdev_us, rttvar_us and the sum in __tcp_set_rto() can't wrap.
This covers the ACK, SACK and TSecr samples.

Patch 3: tcp_rtt_tsopt_us() rejects a TSecr sample above 120 s.

Thanks to Eric for suggesting patches 1 and 2.  This is on top of
v7.4-rc3.

Chris Mason (3):
  tcp: don't let __tcp_set_rto() return 0
  tcp: clamp RTT samples in tcp_rtt_estimator()
  tcp: reject RTT samples from TSecr above 120 s

 include/net/tcp.h    | 11 ++++++++++-
 net/ipv4/tcp_input.c | 12 +++++++-----
 2 files changed, 17 insertions(+), 6 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-18  0:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18  0:50 [PATCH net 0/3] tcp: avoid integer wraps in the RTT estimator and the RTO Chris Mason
2026-11-18  0:50 ` [PATCH net 1/3] tcp: don't let __tcp_set_rto() return 0 Chris Mason
2026-11-18  0:50 ` [PATCH net 2/3] tcp: clamp RTT samples in tcp_rtt_estimator() Chris Mason
2026-11-18  0:50 ` [PATCH net 3/3] tcp: reject RTT samples from TSecr above 120 s Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox