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:   Thu, 22 Feb 2018 14:05:18 +0900
From:   Byungchul Park <byungchul.park@....com>
To:     paulmck@...ux.vnet.ibm.com
Cc:     jiangshanlai@...il.com, josh@...htriplett.org, rostedt@...dmis.org,
        mathieu.desnoyers@...icios.com, linux-kernel@...r.kernel.org,
        kernel-team@....com
Subject: Re: [QUESTION] srcu: Remove the SCAN2 state

On 2/22/2018 11:11 AM, Paul E. McKenney wrote:
> On Thu, Feb 22, 2018 at 08:57:27AM +0900, Byungchul Park wrote:
>> Hello,
>>
>> I'm sorry for bothering you, and I seem to be obviously missing
>> something, but I'm really wondering why we check try_check_zero()
>> again in the state, SCAN1, for the previous srcu_idx.
>>
>> I mean, since we've already checked try_check_zero() in the previous
>> grace period and gotten 'true' as a return value, all readers who see
>> the flipped idx via srcu_flip() won't update the src_{lock,unlock}_count
>> for the previous idx until it gets flipped back again.
>>
>> Is there any reasons we check try_check_zero() again in the state, SCAN1?
>> Is there any problems if the following patch's applied?
> 
> Indeed there are!  Removing the second scan exposes us to a nasty race
> condition where a reader is preempted (or interrupted or whatever) just

Indeed! I missed the cases. It should be as it is.

Thanks a lot for pointing it out.

> after fetching its counter.  A detailed explanation for an essentially

-- 
Thanks,
Byungchul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ