lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 9 Dec 2020 16:14:03 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Neal Cardwell <ncardwell.kernel@...il.com>
Cc:     David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
        Neal Cardwell <ncardwell@...gle.com>,
        Ingemar Johansson <ingemar.s.johansson@...csson.com>,
        Yuchung Cheng <ycheng@...gle.com>,
        Soheil Hassas Yeganeh <soheil@...gle.com>,
        Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net] tcp: fix cwnd-limited bug for TSO deferral where we
 send nothing

On Tue,  8 Dec 2020 22:57:59 -0500 Neal Cardwell wrote:
> From: Neal Cardwell <ncardwell@...gle.com>
> 
> When cwnd is not a multiple of the TSO skb size of N*MSS, we can get
> into persistent scenarios where we have the following sequence:
> 
> (1) ACK for full-sized skb of N*MSS arrives
>   -> tcp_write_xmit() transmit full-sized skb with N*MSS
>   -> move pacing release time forward
>   -> exit tcp_write_xmit() because pacing time is in the future  
> 
> (2) TSQ callback or TCP internal pacing timer fires
>   -> try to transmit next skb, but TSO deferral finds remainder of  
>      available cwnd is not big enough to trigger an immediate send
>      now, so we defer sending until the next ACK.
> 
> (3) repeat...
> 
> So we can get into a case where we never mark ourselves as
> cwnd-limited for many seconds at a time, even with
> bulk/infinite-backlog senders, because:
> 
> o In case (1) above, every time in tcp_write_xmit() we have enough
> cwnd to send a full-sized skb, we are not fully using the cwnd
> (because cwnd is not a multiple of the TSO skb size). So every time we
> send data, we are not cwnd limited, and so in the cwnd-limited
> tracking code in tcp_cwnd_validate() we mark ourselves as not
> cwnd-limited.
> 
> o In case (2) above, every time in tcp_write_xmit() that we try to
> transmit the "remainder" of the cwnd but defer, we set the local
> variable is_cwnd_limited to true, but we do not send any packets, so
> sent_pkts is zero, so we don't call the cwnd-limited logic to update
> tp->is_cwnd_limited.
> 
> Fixes: ca8a22634381 ("tcp: make cwnd-limited checks measurement-based, and gentler")
> Reported-by: Ingemar Johansson <ingemar.s.johansson@...csson.com>
> Signed-off-by: Neal Cardwell <ncardwell@...gle.com>
> Signed-off-by: Yuchung Cheng <ycheng@...gle.com>
> Acked-by: Soheil Hassas Yeganeh <soheil@...gle.com>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>

Applied, thank you!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ