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]
Message-ID: <CACT4Y+aQqwa1bb0Z2OJ3JLE6V6+6cAaoEiGDZdFBa23RkS6q+g@mail.gmail.com>
Date:   Sat, 17 Jun 2017 11:16:33 +0200
From:   Dmitry Vyukov <dvyukov@...gle.com>
To:     Andrey Ryabinin <aryabinin@...tuozzo.com>
Cc:     Mark Rutland <mark.rutland@....com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Will Deacon <will.deacon@....com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        kasan-dev <kasan-dev@...glegroups.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH v3 4/7] x86: switch atomic.h to use atomic-instrumented.h

On Fri, Jun 16, 2017 at 5:54 PM, Andrey Ryabinin
<aryabinin@...tuozzo.com> wrote:
> On 06/06/2017 01:11 PM, Dmitry Vyukov wrote:
>> Add arch_ prefix to all atomic operations and include
>> <asm-generic/atomic-instrumented.h>. This will allow
>> to add KASAN instrumentation to all atomic ops.
>>
>> Signed-off-by: Dmitry Vyukov <dvyukov@...gle.com>
>> Cc: Mark Rutland <mark.rutland@....com>
>> Cc: Peter Zijlstra <peterz@...radead.org>
>> Cc: Will Deacon <will.deacon@....com>
>> Cc: Andrew Morton <akpm@...ux-foundation.org>
>> Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>
>> Cc: Ingo Molnar <mingo@...hat.com>
>> Cc: kasan-dev@...glegroups.com
>> Cc: linux-mm@...ck.org
>> Cc: linux-kernel@...r.kernel.org
>> Cc: x86@...nel.org
>>
>> ---
>
>
>
>
>> -static __always_inline void atomic_set(atomic_t *v, int i)
>> +static __always_inline void arch_atomic_set(atomic_t *v, int i)
>>  {
>> +     /*
>> +      * We could use WRITE_ONCE_NOCHECK() if it exists, similar to
>> +      * READ_ONCE_NOCHECK() in arch_atomic_read(). But there is no such
>> +      * thing at the moment, and introducing it for this case does not
>> +      * worth it.
>> +      */
>
>
> I'd rather remove this comment. I woudn't say that WRITE_ONCE() here looks confusing
> and needs comment. Also there is no READ_ONCE_NOCHECK() in arch_atomic_read() anymore.

Done.
It also should have gone to the patch that adds comments.


> Otherwise,
>         Reviewed-by: Andrey Ryabinin <aryabinin@...tuozzo.com>
>
>>       WRITE_ONCE(v->counter, i);
>>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ