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:   Wed, 26 Apr 2017 16:03:14 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Soheil Hassas Yeganeh <soheil@...gle.com>
Subject: Re: [PATCH net-next 02/10] tcp: do not pass timestamp to
 tcp_rack_detect_loss()

On Tue, 2017-04-25 at 10:15 -0700, Eric Dumazet wrote:
> We can use tp->tcp_mstamp as it contains a recent timestamp.
> 

> @@ -165,12 +164,10 @@ void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, u32 end_seq,
>  void tcp_rack_reo_timeout(struct sock *sk)
>  {
>  	struct tcp_sock *tp = tcp_sk(sk);
> -	struct skb_mstamp now;
>  	u32 timeout, prior_inflight;
>  
> -	skb_mstamp_get(&now);

Oh this is silly, a timer event is not updating tp->tcp_mstamp yet.

I will provide a patch, after tests.

>  	prior_inflight = tcp_packets_in_flight(tp);
> -	tcp_rack_detect_loss(sk, &now, &timeout);
> +	tcp_rack_detect_loss(sk, &timeout);
>  	if (prior_inflight != tcp_packets_in_flight(tp)) {
>  		if (inet_csk(sk)->icsk_ca_state != TCP_CA_Recovery) {
>  			tcp_enter_recovery(sk, false);

Something like :

diff --git a/net/ipv4/tcp_recovery.c b/net/ipv4/tcp_recovery.c
index fdac262e277b2f25492f155bbb295d6d87e31d02..75096becac21f09fd14466b5f87dffe5820325b5 100644
--- a/net/ipv4/tcp_recovery.c
+++ b/net/ipv4/tcp_recovery.c
@@ -167,6 +167,7 @@ void tcp_rack_reo_timeout(struct sock *sk)
 	u32 timeout, prior_inflight;
 
 	prior_inflight = tcp_packets_in_flight(tp);
+	skb_mstamp_get(&tp->tcp_mstamp);
 	tcp_rack_detect_loss(sk, &timeout);
 	if (prior_inflight != tcp_packets_in_flight(tp)) {
 		if (inet_csk(sk)->icsk_ca_state != TCP_CA_Recovery) {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ