From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D5A5C71156 for ; Tue, 1 Dec 2020 16:49:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A1BE9206B7 for ; Tue, 1 Dec 2020 16:49:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1BE9206B7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgroup.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DE5336B006C; Tue, 1 Dec 2020 11:49:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D95A28D0002; Tue, 1 Dec 2020 11:49:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CAB998D0001; Tue, 1 Dec 2020 11:49:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0087.hostedemail.com [216.40.44.87]) by kanga.kvack.org (Postfix) with ESMTP id B58606B006C for ; Tue, 1 Dec 2020 11:49:41 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 765F2181AC9C6 for ; Tue, 1 Dec 2020 16:49:41 +0000 (UTC) X-FDA: 77545299762.27.thumb42_1800944273ac Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 50F113D669 for ; Tue, 1 Dec 2020 16:49:40 +0000 (UTC) X-HE-Tag: thumb42_1800944273ac X-Filterd-Recvd-Size: 3430 Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Dec 2020 16:49:39 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4Clp3g5df3z9v3p8; Tue, 1 Dec 2020 17:49:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id j-uq1QKA259Q; Tue, 1 Dec 2020 17:49:35 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4Clp3g3h6dz9v3nc; Tue, 1 Dec 2020 17:49:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 419D68B7B9; Tue, 1 Dec 2020 17:49:35 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id iO0R35pfVlZL; Tue, 1 Dec 2020 17:49:35 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B2D858B7BD; Tue, 1 Dec 2020 17:49:29 +0100 (CET) Subject: Re: [PATCH v9 1/6] kasan: allow an architecture to disable inline instrumentation To: Daniel Axtens , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, kasan-dev@googlegroups.com, christophe.leroy@c-s.fr, aneesh.kumar@linux.ibm.com, bsingharora@gmail.com References: <20201201161632.1234753-1-dja@axtens.net> <20201201161632.1234753-2-dja@axtens.net> From: Christophe Leroy Message-ID: Date: Tue, 1 Dec 2020 17:49:21 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201201161632.1234753-2-dja@axtens.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Le 01/12/2020 =C3=A0 17:16, Daniel Axtens a =C3=A9crit=C2=A0: > For annoying architectural reasons, it's very difficult to support inli= ne > instrumentation on powerpc64. >=20 > Add a Kconfig flag to allow an arch to disable inline. (It's a bit > annoying to be 'backwards', but I'm not aware of any way to have > an arch force a symbol to be 'n', rather than 'y'.) >=20 > Signed-off-by: Daniel Axtens > --- > lib/Kconfig.kasan | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan > index 542a9c18398e..31a0b28f6c2b 100644 > --- a/lib/Kconfig.kasan > +++ b/lib/Kconfig.kasan > @@ -9,6 +9,9 @@ config HAVE_ARCH_KASAN_SW_TAGS > config HAVE_ARCH_KASAN_VMALLOC > bool > =20 > +config HAVE_ARCH_NO_KASAN_INLINE Maybe a better name could be: ARCH_DISABLE_KASAN_INLINE > + def_bool n > + > config CC_HAS_KASAN_GENERIC > def_bool $(cc-option, -fsanitize=3Dkernel-address) > =20 > @@ -108,6 +111,7 @@ config KASAN_OUTLINE > =20 > config KASAN_INLINE > bool "Inline instrumentation" > + depends on !HAVE_ARCH_NO_KASAN_INLINE > help > Compiler directly inserts code checking shadow memory before > memory accesses. This is faster than outline (in some workloads >=20