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] [day] [month] [year] [list]
Date:   Tue, 24 Oct 2017 07:50:27 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     kemi <kemi.wang@...el.com>, Andi Kleen <ak@...ux.intel.com>
Cc:     Jan Kara <jack@...e.cz>, Darrick J Wong <darrick.wong@...cle.com>,
        Eric Biggers <ebiggers@...gle.com>,
        Andreas Gruenbacher <agruenba@...hat.com>,
        Jeff Layton <jlayton@...hat.com>,
        Dave <dave.hansen@...ux.intel.com>,
        Andi Kleen <andi.kleen@...el.com>,
        Tim Chen <tim.c.chen@...el.com>,
        Ying Huang <ying.huang@...el.com>,
        Aaron Lu <aaron.lu@...el.com>,
        Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] buffer: Avoid setting buffer bits that are already set

On 10/23/2017 07:25 PM, kemi wrote:
> 
> 
> On 2017年10月24日 09:21, Andi Kleen wrote:
>> kemi <kemi.wang@...el.com> writes:
>>>
>>> I'll see if I can find some
>>>> time to implement the above in a nice way.
>>>
>>> Agree. Maybe something like test_and_set_bit() would be more suitable.
>>
>> test_and_set_bit is a very different operation for the CPU because
>> it is atomic for both. But we want the initial read to not
>> be atomic.
>>
> 
> I meant to express the meaning of test before setting bit.
> Apologize to make you confused.

That's why I suggested something like set_bit_if_not_set(),
test_and_set_bit() is both already used and has entirely
different semantics.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ