Re: [PATCHv4 02/12] atomics/x86: reduce arch_cmpxchg64*() instrumentation
From: Thomas Gleixner
Date: Mon Jul 16 2018 - 15:24:13 EST
On Mon, 16 Jul 2018, Mark Rutland wrote:
> Currently x86's arch_cmpxchg64() and arch_cmpxchg64_local() are
> instrumented twice, as they call into instrumented atomics rather than
> their arch_ equivalents.
>
> A call to cmpxchg64() results in:
>
> cmpxchg64()
> kasan_check_write()
> arch_cmpxchg64()
> cmpxchg()
> kasan_check_write()
> arch_cmpxchg()
>
> Let's fix this up and call the arch_ equivalents, resulting in:
>
> cmpxchg64()
> kasan_check_write()
> arch_cmpxchg64()
> arch_cmpxchg()
>
> Signed-off-by: Mark Rutland <mark.rutland@xxxxxxx>
> Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> Acked-by: Will Deacon <will.deacon@xxxxxxx>
Acked-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>