summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorChris Mason <mason@kernel.org>2026-11-18 10:51:49 -0500
committerPaolo Abeni <pabeni@redhat.com>2026-11-19 14:47:59 +0100
commit314b35c8173cb5726ae4c3dd401d982e16de9482 (patch)
tree9dca4b1c842573a9b4029dde71b7e5a48714ca9a /tools/perf/scripts/python/bin
parentf22d5042faa6b03df9586074e0322db60973933b (diff)
tcp: bound the rto_min of a route in tcp_rto_min()
For a route with a locked RTAX_RTO_MIN, tcp_rto_min() returns the metric as it is, and that can be any 32-bit number of milliseconds. All other ways to set the minimum RTO have a nonzero floor: the tcp_rto_min_us sysctl, TCP_RTO_MIN_US and TCP_BPF_RTO_MIN. Both ends of that range give us trouble. With an rto_min of 0, tcp_init_metrics() can start a connection with an RTO of 0, if the cached RTT is below one jiffy: icsk_rto = crtt + max(2 * crtt, tcp_rto_min(sk)) = 0 It sets icsk_rto itself, so the lower bound in __tcp_set_rto() does not help here. At the other end, tcp_rto_min_us() and the sum in __tcp_set_rto() are u32 values in usec, so an rto_min of more than about 71 minutes does not fit. Clamp a locked rto_min to the range from one jiffy to TCP_RTO_MAX in tcp_rto_min(). ip_metrics_convert() could reject these values instead, as it does for a locked cwnd of 0. But a route with "rto_min lock 0" is accepted today and mostly works, so that would break existing setups. A route still shows the rto_min that it was given, while TCP uses one jiffy or 120 s. Found by LLM code inspection, and confirmed with LLM generated reproducers on an unmodified kernel. Fixed by LLM, and tested with the reproducers and existing kernel selftests. Fixes: 05bb1fad1cde ("[TCP]: Allow minimum RTO to be configurable via routing metrics.") Signed-off-by: Chris Mason <mason@kernel.org> Reviewed-by: Eric Dumazet <edumazet@kernel.org> Link: https://patch.msgid.link/20261118155144.18393-6-mason@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions