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] [day] [month] [year] [list]
Date:   Tue, 27 Nov 2018 14:32:25 -0800
From:   Eric Dumazet <edumazet@...gle.com>
To:     Eric Dumazet <eric.dumazet@...il.com>
Cc:     Neal Cardwell <ncardwell@...gle.com>,
        David Miller <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Jean-Louis Dupond <jean-louis@...ond.be>,
        Yuchung Cheng <ycheng@...gle.com>
Subject: Re: [PATCH v2 net-next 4/4] tcp: implement coalescing on backlog queue

On Tue, Nov 27, 2018 at 2:13 PM Eric Dumazet <eric.dumazet@...il.com> wrote:
>
>
>
> On 11/27/2018 01:58 PM, Neal Cardwell wrote:
>
> > I wonder if technically perhaps the logic should skip coalescing if
> > the tail or skb has the TCP_FLAG_URG bit set? It seems if skbs are
> > coalesced, and some have urgent data and some do not, then the
> > TCP_FLAG_URG bit will be accumulated into the tail header, but there
> > will be no way to ensure the correct urgent offsets for the one or
> > more skbs with urgent data are passed along.
>
> Yes, I guess I need to fix that, thanks.
>
> I will simply make sure both thtail->urg and th->urg are not set.
>
> I could only test thtail->urg, but that would require copying th->urg_ptr and th->urg,
> and quite frankly we should not spend cycles on URG stuff.

pseudo code added in V3

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 9fa7516fb5c33277be4ba3a667ff61202d8dd445..4904250a9aac5001410f9454258cbb8978bb8202
100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1668,6 +1668,8 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)
            TCP_SKB_CB(tail)->ip_dsfield != TCP_SKB_CB(skb)->ip_dsfield ||
+            ((TCP_SKB_CB(tail)->tcp_flags |
+            TCP_SKB_CB(skb)->tcp_flags) & TCPHDR_URG) ||
+           ((TCP_SKB_CB(tail)->tcp_flags ^
+             TCP_SKB_CB(skb)->tcp_flags) & (TCPHDR_ECE | TCPHDR_CWR)) ||
 #ifdef CONFIG_TLS_DEVICE
            tail->decrypted != skb->decrypted ||
 #endif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ