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=-10.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,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 24E86C2B9F4 for ; Thu, 17 Jun 2021 06:55:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E4F87613F3 for ; Thu, 17 Jun 2021 06:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229714AbhFQG54 (ORCPT ); Thu, 17 Jun 2021 02:57:56 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:49406 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbhFQG5y (ORCPT ); Thu, 17 Jun 2021 02:57:54 -0400 Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4G5CW62V8YzBDt2; Thu, 17 Jun 2021 08:55:46 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dKW6sfhlMRMC; Thu, 17 Jun 2021 08:55:46 +0200 (CEST) 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 4G5CW61XjmzBDLt; Thu, 17 Jun 2021 08:55:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 176178B804; Thu, 17 Jun 2021 08:55:46 +0200 (CEST) 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 3xwBsrTEU-ED; Thu, 17 Jun 2021 08:55:46 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3D8EB8B801; Thu, 17 Jun 2021 08:55:45 +0200 (CEST) Subject: Re: [PATCH v14 2/4] kasan: allow architectures to provide an outline readiness check To: Daniel Axtens , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, elver@google.com, akpm@linux-foundation.org, andreyknvl@gmail.com Cc: linuxppc-dev@lists.ozlabs.org, aneesh.kumar@linux.ibm.com, bsingharora@gmail.com, "Aneesh Kumar K . V" References: <20210617063956.94061-1-dja@axtens.net> <20210617063956.94061-3-dja@axtens.net> From: Christophe Leroy Message-ID: <853a39a4-5ec3-08a9-87d0-d599e8828e8b@csgroup.eu> Date: Thu, 17 Jun 2021 08:55:40 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210617063956.94061-3-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 17/06/2021 à 08:39, Daniel Axtens a écrit : > Allow architectures to define a kasan_arch_is_ready() hook that bails > out of any function that's about to touch the shadow unless the arch > says that it is ready for the memory to be accessed. This is fairly > uninvasive and should have a negligible performance penalty. > > This will only work in outline mode, so an arch must specify > ARCH_DISABLE_KASAN_INLINE if it requires this. > > Cc: Balbir Singh > Cc: Aneesh Kumar K.V > Suggested-by: Christophe Leroy > Signed-off-by: Daniel Axtens > > -- > > Both previous RFCs for ppc64 - by 2 different people - have > needed this trick! See: > - https://lore.kernel.org/patchwork/patch/592820/ # ppc64 hash series > - https://patchwork.ozlabs.org/patch/795211/ # ppc radix series > > I haven't been able to exercise the arch hook error for !GENERIC as I > don't have a particularly modern aarch64 toolchain or a lot of experience > cross-compiling with clang. But it does fire for GENERIC + INLINE on x86. Modern toolchains are available here https://mirrors.edge.kernel.org/pub/tools/crosstool/