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]
Date:   Fri, 24 Mar 2017 04:16:50 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Alexander Duyck <alexander.duyck@...il.com>
Cc:     Netdev <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Samudrala, Sridhar" <sridhar.samudrala@...el.com>,
        Eric Dumazet <edumazet@...gle.com>,
        David Miller <davem@...emloft.net>,
        Linux API <linux-api@...r.kernel.org>
Subject: Re: [net-next PATCH v2 5/8] net: Track start of busy loop instead
 of when it should end

On Thu, 2017-03-23 at 22:55 -0700, Alexander Duyck wrote:

> Right, but time_after assumes roll over.  When you are using a time
> value based off of local_clock() >> 10, you don't ever roll over when
> you do addition.  Just the clock rolls over.  At least on 64 bit
> systems.
> 
> So if local time approaches something like all 1's, and we have
> shifted it by 10 it is then the max it can ever reach is
> 0x003FFFFFFFFFFFFF.  I can add our loop time to that and it won't roll
> over.  In the mean time the busy_loop_us_ can never exceed whatever I
> added to that so we are now locked into a loop.  I realize I am
> probably being pedantic, and it will have an exceedingly small rate of
> occurrence, but it is still an issue.

Do you realize that a 64bit clock wont rollover before the host has
reached 584 years of uptime ?



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ