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: <CAJDTihyP96H6XTh5M17uMbMHxz8YjFZ89u0YsBGsRpR+BaEU_Q@mail.gmail.com>
Date:   Mon, 12 Mar 2018 17:13:03 +0800
From:   焦晓冬 <milestonejxd@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Boqun Feng <boqun.feng@...il.com>, linux-kernel@...r.kernel.org,
        Alan Stern <stern@...land.harvard.edu>, will.deacon@....com,
        torvalds@...ux-foundation.org, npiggin@...il.com, mingo@...nel.org,
        mpe@...erman.id.au, oleg@...hat.com, benh@...nel.crashing.org,
        Paul McKenney <paulmck@...ux.vnet.ibm.com>
Subject: Re: smp_mb__after_spinlock requirement too strong?

On Mon, Mar 12, 2018 at 4:56 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Mon, Mar 12, 2018 at 04:56:00PM +0800, Boqun Feng wrote:
>> So I think the purpose of smp_mb__after_spinlock() is to provide RCsc
>> locks, it's just the comments before that may be misleading. We want
>> RCsc locks in schedule code because we want writes in different critical
>> section are ordered even outside the critical sections, for case like:
>>
>>       CPU 0           CPU 1           CPU 2
>>
>>       {A =0 , B = 0}
>>       lock(rq0);
>>       write A=1;
>>       unlock(rq0);
>>
>>                       lock(rq0);
>>                       read A=1;
>>                       write B=2;
>>                       unlock(rq0);
>>
>>                                       read B=2;
>>                                       smp_rmb();
>>                                       read A=1;
>>
>> I think we need to fix the comments rather than loose the requirement.
>> Peter?
>
> Yes, ISTR people relying on schedule() being RCsc, and I just picked a
> bad exmaple.

Hi, Peter,
If the fixed comment could point out where this RCsc is used, it will be great.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ