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 1B469C64E7A for ; Tue, 1 Dec 2020 16:56:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 854382151B for ; Tue, 1 Dec 2020 16:56:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 854382151B 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 DB4328D0003; Tue, 1 Dec 2020 11:56:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D63B48D0001; Tue, 1 Dec 2020 11:56:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C52DC8D0003; Tue, 1 Dec 2020 11:56:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0075.hostedemail.com [216.40.44.75]) by kanga.kvack.org (Postfix) with ESMTP id AE4588D0001 for ; Tue, 1 Dec 2020 11:56:40 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 6D3AA824999B for ; Tue, 1 Dec 2020 16:56:40 +0000 (UTC) X-FDA: 77545317360.15.stew05_1f0c296273ac Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 3BC2B1814B0C7 for ; Tue, 1 Dec 2020 16:56:40 +0000 (UTC) X-HE-Tag: stew05_1f0c296273ac X-Filterd-Recvd-Size: 4659 Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Dec 2020 16:56:39 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4ClpCl6dGbz9v3p7; Tue, 1 Dec 2020 17:56: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 aAkh48jFRr4H; Tue, 1 Dec 2020 17:56: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 4ClpCl58BYz9v3nc; Tue, 1 Dec 2020 17:56:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C8E668B7C1; Tue, 1 Dec 2020 17:56:36 +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 ItWmq8r7Upbe; Tue, 1 Dec 2020 17:56:35 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 97D2C8B7B9; Tue, 1 Dec 2020 17:56:33 +0100 (CET) Subject: Re: [PATCH v9 4/6] kasan: Document support on 32-bit powerpc 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-5-dja@axtens.net> From: Christophe Leroy Message-ID: <421d8685-afef-eaa8-5207-280d951be594@csgroup.eu> Date: Tue, 1 Dec 2020 17:56:29 +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-5-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: > KASAN is supported on 32-bit powerpc and the docs should reflect this. >=20 > Document s390 support while we're at it. >=20 > Suggested-by: Christophe Leroy > Reviewed-by: Christophe Leroy My new address is > Signed-off-by: Daniel Axtens > --- > Documentation/dev-tools/kasan.rst | 7 +++++-- > Documentation/powerpc/kasan.txt | 12 ++++++++++++ > 2 files changed, 17 insertions(+), 2 deletions(-) > create mode 100644 Documentation/powerpc/kasan.txt >=20 > diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tool= s/kasan.rst > index 2b68addaadcd..eaf868094a8e 100644 > --- a/Documentation/dev-tools/kasan.rst > +++ b/Documentation/dev-tools/kasan.rst > @@ -19,7 +19,8 @@ out-of-bounds accesses for global variables is only s= upported since Clang 11. > Tag-based KASAN is only supported in Clang. > =20 > Currently generic KASAN is supported for the x86_64, arm64, xtensa, s= 390 and > -riscv architectures, and tag-based KASAN is supported only for arm64. > +riscv architectures. It is also supported on 32-bit powerpc kernels. T= ag-based > +KASAN is supported only on arm64. > =20 > Usage > ----- > @@ -255,7 +256,9 @@ CONFIG_KASAN_VMALLOC > ~~~~~~~~~~~~~~~~~~~~ > =20 > With ``CONFIG_KASAN_VMALLOC``, KASAN can cover vmalloc space at the > -cost of greater memory usage. Currently this is only supported on x86. > +cost of greater memory usage. Currently this supported on x86, s390 > +and 32-bit powerpc. It is optional, except on 32-bit powerpc kernels > +with module support, where it is required. > =20 > This works by hooking into vmalloc and vmap, and dynamically > allocating real shadow memory to back the mappings. > diff --git a/Documentation/powerpc/kasan.txt b/Documentation/powerpc/ka= san.txt > new file mode 100644 > index 000000000000..26bb0e8bb18c > --- /dev/null > +++ b/Documentation/powerpc/kasan.txt > @@ -0,0 +1,12 @@ > +KASAN is supported on powerpc on 32-bit only. > + > +32 bit support > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +KASAN is supported on both hash and nohash MMUs on 32-bit. > + > +The shadow area sits at the top of the kernel virtual memory space abo= ve the > +fixmap area and occupies one eighth of the total kernel virtual memory= space. > + > +Instrumentation of the vmalloc area is optional, unless built with mod= ules, > +in which case it is required. >=20