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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 29 Jun 2017 08:47:46 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Mark Rutland <mark.rutland@....com>
cc:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Ingo Molnar <mingo@...nel.org>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Will Deacon <will.deacon@....com>,
        "H. Peter Anvin" <hpa@...or.com>,
        kasan-dev <kasan-dev@...glegroups.com>,
        "x86@...nel.org" <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] locking/atomics: don't alias ____ptr

On Wed, 28 Jun 2017, Thomas Gleixner wrote:
> On Wed, 28 Jun 2017, Mark Rutland wrote:
> > On Wed, Jun 28, 2017 at 05:24:24PM +0200, Thomas Gleixner wrote:
> > 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:
> > 
> > For the UP arches we do:
> > # echo '#include <asm-generic/atomic_up.h>' >arch/xxx/include/asm/atomic.h
> > # mv include/asm-generic/atomic.h include/asm-generic/atomic_up.h
> > 
> > Then we add a <linux/atomic_instrumented.h>:
> > 
> > #ifndef __LINUX_ATOMIC_INSTRUMENTED_H
> > #define __LINUX_ATOMIC INSTRUMENTED_H
> > 
> > #include <asm/atomic.h>
> > 
> > #if CONFIG_ATOMIC_INSTRUMENTED_H
> > <instrumentation>
> > #endif
> > 
> > #endif /* __LINUX_ATOMIC_ARCH_H */
> > 
> > ... and make <linux/atomic.h> incldue that rather than <asm/atomic.h>.
> > 
> > That way the instrumentation's orthogonal to the UP-ness of the arch,
> > and we can fold any other instrumentation in there, or later move it
> > directly into <linux/atomic.h>
> 
> Sounds like a plan.

Actually we should make it slightly different and make asm-generic/atomic.h
the central point for everything.

It should contain the wrapper macro and the central inlines including the
kasan stuff and include either arch/arch_atomic.h or
asm-generic/atomic_up.h.

That way all potential instrumentation happens in the generic header (which
is a NOP for archs which do not support it) and pull in the appropriate
arch specific or generic UP low level implementations.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ