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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Apr 2017 10:58:04 +0200
From:   Laurent Dufour <ldufour@...ux.vnet.ibm.com>
To:     Jan Kara <jack@...e.cz>
Cc:     Davidlohr Bueso <dave@...olabs.net>, mingo@...nel.org,
        peterz@...radead.org, akpm@...ux-foundation.org,
        kirill.shutemov@...ux.intel.com, mhocko@...e.com,
        mgorman@...hsingularity.net, linux-kernel@...r.kernel.org,
        Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH 2/6] locking: Introduce range reader/writer lock

On 13/04/2017 10:38, Jan Kara wrote:
> On Thu 13-04-17 10:07:48, Laurent Dufour wrote:
>> On 06/04/2017 18:50, Davidlohr Bueso wrote:
>>> On Thu, 06 Apr 2017, Laurent Dufour wrote:
>>>
>>>> How is 'seqnum' wrapping handled here ?
>>>> I'd rather see something like time_before() here, isn't it ?
>>>
>>> Its a 64bit counter, no overflows.
>>
>> I should have miss something, what prevents this 64bit counter to not
>> overflow ?
>> At some point of time, this counter could reach ~0UL and then 0UL, which
>> is breaking this check.
> 
> Count for yourself how long would it take for the counter to overflow if we
> incremented it say every nanosecond?

I do agree that this will take time, but systems become larger and
having 200 threads hitting a lock like the mmap_sem every nanoseconds,
it will increment faster (still need about 3 years)... if there are 1000
threads, less than 1 year to overflow this counter...
This is not for today, I agree.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ