[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c4a35fe-67eb-6520-b036-bfa2b4267276@virtuozzo.com>
Date: Fri, 16 Jun 2017 18:54:03 +0300
From: Andrey Ryabinin <aryabinin@...tuozzo.com>
To: Dmitry Vyukov <dvyukov@...gle.com>, mark.rutland@....com,
peterz@...radead.org, mingo@...hat.com, will.deacon@....com,
hpa@...or.com
Cc: Andrew Morton <akpm@...ux-foundation.org>,
kasan-dev@...glegroups.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH v3 4/7] x86: switch atomic.h to use atomic-instrumented.h
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.
Otherwise,
Reviewed-by: Andrey Ryabinin <aryabinin@...tuozzo.com>
> WRITE_ONCE(v->counter, i);
> }
>
Powered by blists - more mailing lists