Re: [PATCH] locking/atomics: don't alias ____ptr
From: Ingo Molnar
Date: Wed Jun 28 2017 - 12:57:19 EST
* Mark Rutland <mark.rutland@xxxxxxx> wrote:
> > And instead of adding
> >
> > #include <asm/atomic-instrumented.h>
> >
> > to the architecture code, we rather do
> >
> > # mv arch/xxx/include/asm/atomic.h mv arch/xxx/include/asm/arch_atomic.h
> > # echo '#include <asm-generic/atomic.h>' >arch/xxx/include/asm/atomic.h
> >
> > # mv include/asm-generic/atomic.h include/asm-generic/atomic_up.h
> >
> > and create a new include/asm-generic/atomic.h
> >
> > #ifndef __ASM_GENERIC_ATOMIC_H
> > #define __ASM_GENERIC_ATOMIC_H
> >
> > #ifdef CONFIG_ATOMIC_INSTRUMENTED_H
> > #include <asm-generic/atomic_instrumented.h>
> > #else
> > #include <asm-generic/atomic_up.h>
> > #endif
> >
> > #endif
>
> Given we're gonig to clean things up, we may as well avoid the backwards
> include of <asm-generic/atomic_instrumented.h>, whcih was only there as
> a bodge:
So, since the final v4.12 release is so close, I've put the following KASAN
commits aside into tip:WIP.locking/atomics:
4b47cc154eed: locking/atomic/x86, asm-generic: Add comments for atomic instrumentation
35787d9d7ca4: locking/atomics, asm-generic: Add KASAN instrumentation to atomic operations
68c1ed1fdb0a: kasan: Allow kasan_check_read/write() to accept pointers to volatiles
f1c3049f6729: locking/atomic/x86: Switch atomic.h to use atomic-instrumented.h
d079eebb3958: locking/atomic: Add asm-generic/atomic-instrumented.h
007d185b4462: locking/atomic/x86: Use 's64 *' for 'old' argument of atomic64_try_cmpxchg()
ba1c9f83f633: locking/atomic/x86: Un-macro-ify atomic ops implementation
(Note, I had to rebase these freshly, to decouple them from a refcount_t commit
that we need.)
and won't send them to Linus unless the cleanups are done and acked by Thomas.
Thanks,
Ingo