diff options
| author | Cambda Zhu <[email protected]> | 2020-12-08 17:19:10 +0800 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2020-12-14 17:34:54 -0800 |
| commit | 6d4634d1b09172a9f5863d8c4cec8f82fbecdf15 (patch) | |
| tree | a82f821173acdbffd6a8a7eae71c2e9f794cecd7 /scripts/gcc-plugins/cyc_complexity_plugin.c | |
| parent | ebf322822cc93259316480266afeb889dd65522a (diff) | |
net: Limit logical shift left of TCP probe0 timeout
For each TCP zero window probe, the icsk_backoff is increased by one and
its max value is tcp_retries2. If tcp_retries2 is greater than 63, the
probe0 timeout shift may exceed its max bits. On x86_64/ARMv8/MIPS, the
shift count would be masked to range 0 to 63. And on ARMv7 the result is
zero. If the shift count is masked, only several probes will be sent
with timeout shorter than TCP_RTO_MAX. But if the timeout is zero, it
needs tcp_retries2 times probes to end this false timeout. Besides,
bitwise shift greater than or equal to the width is an undefined
behavior.
This patch adds a limit to the backoff. The max value of max_when is
TCP_RTO_MAX and the min value of timeout base is TCP_RTO_MIN. The limit
is the backoff from TCP_RTO_MIN to TCP_RTO_MAX.
Signed-off-by: Cambda Zhu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions