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]
Message-ID: <1393352227.2316.144.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Tue, 25 Feb 2014 10:17:07 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Neal Cardwell <ncardwell@...gle.com>
Cc:	Stephen Hemminger <stephen@...workplumber.org>,
	Julian Anastasov <ja@....bg>,
	David Miller <davem@...emloft.net>,
	Yuchung Cheng <ycheng@...gle.com>,
	netdev <netdev@...r.kernel.org>, Larry Brakmo <brakmo@...gle.com>
Subject: Re: [PATCH v6 net-next 2/2] tcp: switch rtt estimations to usec
 resolution

On Tue, 2014-02-25 at 12:46 -0500, Neal Cardwell wrote:

> >
> > -                       ca_ops->pkts_acked(sk, pkts_acked, rtt_us);
> > -               }
> > -       } else if (skb && rtt_update && sack_rtt >= 0 &&
> > -                  sack_rtt > (s32)(now - TCP_SKB_CB(skb)->when)) {
> > +       } else if (skb && rtt_update && sack_rtt_us >= 0 &&
> > +                  sack_rtt_us > skb_mstamp_us_delta(&now, &skb->skb_mstamp)) {
> 
> This gets rid of the (s32) cast for the result of the time
> subtraction. Is that safe?


I think it is safe, because we made sure (sack_rtt_us >= 0) is true.

If skb_mstamp_us_delta() is returning a number bigger than 0x7fffffff
(2147 seconds), I think its better to make the compare to fail.

Thanks !


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ