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 61C92C64E7A for ; Tue, 1 Dec 2020 16:50:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04A7B206B7 for ; Tue, 1 Dec 2020 16:50:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390632AbgLAQuV (ORCPT ); Tue, 1 Dec 2020 11:50:21 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:13973 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387673AbgLAQuU (ORCPT ); Tue, 1 Dec 2020 11:50:20 -0500 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: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 01/12/2020 à 17:16, Daniel Axtens a écrit : > For annoying architectural reasons, it's very difficult to support inline > instrumentation on powerpc64. > > 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'.) > > Signed-off-by: Daniel Axtens > --- > lib/Kconfig.kasan | 4 ++++ > 1 file changed, 4 insertions(+) > > 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 > > +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=kernel-address) > > @@ -108,6 +111,7 @@ config KASAN_OUTLINE > > 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 >