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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 23 Oct 2020 23:26:02 -0700
From:   Arjun Roy <arjunroy@...gle.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Arjun Roy <arjunroy.kdev@...il.com>,
        David Miller <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Soheil Hassas Yeganeh <soheil@...gle.com>,
        Neal Cardwell <ncardwell@...gle.com>
Subject: Re: [net v2] tcp: Prevent low rmem stalls with SO_RCVLOWAT.

On Fri, Oct 23, 2020 at 7:13 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Fri, 23 Oct 2020 11:47:09 -0700 Arjun Roy wrote:
> > From: Arjun Roy <arjunroy@...gle.com>
> >
> > With SO_RCVLOWAT, under memory pressure,
> > it is possible to enter a state where:
> >
> > 1. We have not received enough bytes to satisfy SO_RCVLOWAT.
> > 2. We have not entered buffer pressure (see tcp_rmem_pressure()).
> > 3. But, we do not have enough buffer space to accept more packets.
> >
> > In this case, we advertise 0 rwnd (due to #3) but the application does
> > not drain the receive queue (no wakeup because of #1 and #2) so the
> > flow stalls.
> >
> > Modify the heuristic for SO_RCVLOWAT so that, if we are advertising
> > rwnd<=rcv_mss, force a wakeup to prevent a stall.
> >
> > Without this patch, setting tcp_rmem to 6143 and disabling TCP
> > autotune causes a stalled flow. With this patch, no stall occurs. This
> > is with RPC-style traffic with large messages.
> >
> > Fixes: 03f45c883c6f ("tcp: avoid extra wakeups for SO_RCVLOWAT users")
> > Signed-off-by: Arjun Roy <arjunroy@...gle.com>
> > Acked-by: Soheil Hassas Yeganeh <soheil@...gle.com>
> > Acked-by: Neal Cardwell <ncardwell@...gle.com>
> > Signed-off-by: Eric Dumazet <edumazet@...gle.com>
>
> Applied, thank you!

Ack, thanks for the quick review!

-Arjun

Powered by blists - more mailing lists