Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp184192pxj; Wed, 16 Jun 2021 23:56:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8r7y/lfn8R8RUV5k3D6rjkNCqZyr49RhSew15N98uaGg8uYk3RqaVC8dxVqvlVpG7k9y5 X-Received: by 2002:a05:6e02:1523:: with SMTP id i3mr2527729ilu.12.1623912992147; Wed, 16 Jun 2021 23:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623912992; cv=none; d=google.com; s=arc-20160816; b=j7I6Ppu9IYyhPaScbKokwLly/gZ5ZfyoRMWXT+X0EEW+Ta6wwY1morJbyKVB4Zvd4+ DS21mC5BNnZqpxIEtJbLwpMpEdVYWxDDN7egrIfVEKX9ocFGIDhK2m8FP11TZnDDtlH2 FwDtvjFoqBTtBTjtqKfuWZSTFt8Dn8RCi4ySn+CqlMuzYCLHKyhR+uVbXYuclWEIgiQt p328k71r3PhZAPeQlyrVryT7vHH/Ij/bNYqHeG+NSyFhGULge8JvqISFMh1MeAR0dmG7 oFtmx/yiazQniIyftGV3A5XvQeBAyDfn4B8hFcL3qcs83J6uX2h0ajiNuCaJBc4Njgjz TfgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=5FZ4SLwJJwY6UvU874TbLYcadVpAshknkx58czx3zrc=; b=ISYEp2Sdi28ZlSHqbwbPLcrsW0YKuQrUGFlOOLVrEJbEJvaCQZgTozDTShuIOprneS oBwiiPe37As4yZVczlqLNu6KbKOmWT0pc6KOfTDzde6Tp2eGwIfnTBZCq/nFuQ970vbq Y931cnT9C4/02Dnt0o3O2m6xrepsEJ92gTcyeZy/OxogbnvWvl/WY7IYXWPiJVjcKnZI RPdAwpQPVOshv//TzhE1lW6T2B8QfhfmAxE4dvC8vqtxer01IzXhAfxV+9Z72ovp8CB3 SWGbYLAghqwc+nAr5YbY2Ky7VuzDWuwQKIrI8DjRKJAc0Ub1PjdEnrEuoNBp4vvnfL+z jeAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si5514867iov.42.2021.06.16.23.56.19; Wed, 16 Jun 2021 23:56:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229683AbhFQG5z (ORCPT + 99 others); Thu, 17 Jun 2021 02:57:55 -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/