From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f199.google.com (mail-pf0-f199.google.com [209.85.192.199]) by kanga.kvack.org (Postfix) with ESMTP id 430D9831ED for ; Wed, 8 Mar 2017 10:49:08 -0500 (EST) Received: by mail-pf0-f199.google.com with SMTP id o126so63399584pfb.2 for ; Wed, 08 Mar 2017 07:49:08 -0800 (PST) Received: from foss.arm.com (foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id k80si3608578pfk.272.2017.03.08.07.49.07 for ; Wed, 08 Mar 2017 07:49:07 -0800 (PST) Date: Wed, 8 Mar 2017 15:48:55 +0000 From: Mark Rutland Subject: Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Message-ID: <20170308154854.GC13133@leverpostej> References: <20170306125851.GL6500@twins.programming.kicks-ass.net> <20170306130107.GK6536@twins.programming.kicks-ass.net> <20170306162018.GC18519@leverpostej> <20170306203500.GR6500@twins.programming.kicks-ass.net> <20170308152027.GA13133@leverpostej> <20170308154357.GB13133@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Dmitry Vyukov Cc: Will Deacon , Peter Zijlstra , Andrew Morton , Andrey Ryabinin , Ingo Molnar , kasan-dev , "linux-mm@kvack.org" , LKML , "x86@kernel.org" On Wed, Mar 08, 2017 at 04:45:58PM +0100, Dmitry Vyukov wrote: > On Wed, Mar 8, 2017 at 4:43 PM, Mark Rutland wrote: > > On Wed, Mar 08, 2017 at 04:27:11PM +0100, Dmitry Vyukov wrote: > >> On Wed, Mar 8, 2017 at 4:20 PM, Mark Rutland wrote: > >> > As in my other reply, I'd prefer that we wrapped the (arch-specific) > >> > atomic implementations such that we can instrument them explicitly in a > >> > core header. That means that the implementation and semantics of the > >> > atomics don't change at all. > >> > > >> > Note that we could initially do this just for x86 and arm64), e.g. by > >> > having those explicitly include an > >> > at the end of their . > >> > >> How exactly do you want to do this incrementally? > >> I don't feel ready to shuffle all archs, but doing x86 in one patch > >> and then arm64 in another looks tractable. > > > > I guess we'd have three patches: one adding the header and any core > > infrastructure, followed by separate patches migrating arm64 and x86 > > over. > > But if we add e.g. atomic_read() which forwards to arch_atomic_read() > to , it will break all archs that don't rename its > atomic_read() to arch_atomic_read(). ... as above, that'd be handled by placing this in an file, that we only include at the end of the arch implementation. So we'd only include that on arm64 and x86, without needing to change the names elsewhere. Thanks, Mark. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org