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-next>] [day] [month] [year] [list]
Message-Id: <75F60345-2612-4EF8-A7C3-8F0E1E6215B3@gmail.com>
Date:	Thu, 4 Aug 2016 12:01:02 +0800
From:	Liang Ge <lungothrin@...il.com>
To:	edumazet@...gle.com, herbert@...dor.apana.org.au,
	高昌利 <xiaosuo@...il.com>
Cc:	netdev@...r.kernel.org
Subject: [PATCH] tcp-tso: fix faulty logic in tcp_tso_should_defer


code does not match comment

	head = tcp_write_queue_head(sk);
	skb_mstamp_get(&now);
	age = skb_mstamp_us_delta(&now, &head->skb_mstamp);
	/* If next ACK is likely to come too late (half srtt), do not defer */
	if (age < (tp->srtt_us >> 4))
		goto send_now;

This bug will cause TSO packets being transmitted too early, and force
software to tear them apart.

When ack clocking is likely to broke, this check will try to push out
some EXTRA probe the first chance possible. Some transmission has
already happened due to Eric's work.

This patch fix the check.
---
 net/ipv4/tcp_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index b26aa87..7082964 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1833,7 +1833,7 @@ static bool tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb,
 	skb_mstamp_get(&now);
 	age = skb_mstamp_us_delta(&now, &head->skb_mstamp);
 	/* If next ACK is likely to come too late (half srtt), do not defer */
-	if (age < (tp->srtt_us >> 4))
+	if (age > (tp->srtt_us >> 4))
 		goto send_now;
 
 	/* Ok, it looks like it is advisable to defer. */
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ