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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 998B1C64E7B for ; Tue, 1 Dec 2020 16:18:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E502022244 for ; Tue, 1 Dec 2020 16:18:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=axtens.net header.i=@axtens.net header.b="IHx2W6Gs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E502022244 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=axtens.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5652F8D0006; Tue, 1 Dec 2020 11:18:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 539FF8D0001; Tue, 1 Dec 2020 11:18:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3DBDE8D0006; Tue, 1 Dec 2020 11:18:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0253.hostedemail.com [216.40.44.253]) by kanga.kvack.org (Postfix) with ESMTP id 27D308D0001 for ; Tue, 1 Dec 2020 11:18:06 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F0C8082499A8 for ; Tue, 1 Dec 2020 16:18:05 +0000 (UTC) X-FDA: 77545220130.12.grain23_3909eb4273ab Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 2340B18025872 for ; Tue, 1 Dec 2020 16:16:55 +0000 (UTC) X-HE-Tag: grain23_3909eb4273ab X-Filterd-Recvd-Size: 5212 Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Dec 2020 16:16:54 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id w16so1448112pga.9 for ; Tue, 01 Dec 2020 08:16:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B3cGCHzxS7oj9LZKxlOIS4CcjJY/Vd95YR2IG8LQpYg=; b=IHx2W6Gs1iR719luXIlgneTcg2D0BEi//HtPJ+UbArGz1pUuPZAAj+eGlslDU6pYhi /IFmMrXQa5kzgg3OOhe0nCzXtB3zOZM/i2vpDixY7zz3EyccyiUM/qox7gQ/uoVzFZSV xZuVzmh/W9/uwtD8kUV+XZxJx439LBWHXVFZk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B3cGCHzxS7oj9LZKxlOIS4CcjJY/Vd95YR2IG8LQpYg=; b=SbvfU64rPAZ67xyWDHoYqoIltRIt9sGBvMcndbhQ8kz+kyTFjb/I2aXqnxxBvuxbwi T1r6Yo7+8skfg/UyIIqY1VfsPgu7FH7p/YuJuCamEiaEkIQ6I8Wx4FS920hSnfPBMT+4 RMYaPEVYOCw9J9sthds+ewB5h2w38K7rAT8lzqZnQc9Bl3gok1rrj37+wgC/XywLygSw YURQyMO32s/RIjEoNCQhNPqI8UghygrKqLniP24LAiS/ZSwMHNjfXDs48BKKDKP2ihdV piZtF7hDyupB1OLs7DHcBuwxleCBYkcFgrevIwMFqPiwjBj0+0Y4Yqt8CE5bNdjmDVdf 3TAQ== X-Gm-Message-State: AOAM533iiDhMPZPY/EhazO5cpWcfGaM8xJxYQ3gbVNK6W4A1GwRUyKUa mVf0mJRiiOqnw9YgDpevrALd2w== X-Google-Smtp-Source: ABdhPJwrA3YHSUmJRi5GEZqfh2/A24D2qfQRXKs0pu9yHzHzLmvDKS+8BCRbVAmsWDRGY8s2k7jCOw== X-Received: by 2002:aa7:868e:0:b029:197:cc73:6f15 with SMTP id d14-20020aa7868e0000b0290197cc736f15mr3168859pfo.18.1606839413794; Tue, 01 Dec 2020 08:16:53 -0800 (PST) Received: from localhost (2001-44b8-111e-5c00-f932-2db6-916f-25e2.static.ipv6.internode.on.net. [2001:44b8:111e:5c00:f932:2db6:916f:25e2]) by smtp.gmail.com with ESMTPSA id p14sm64656pgm.69.2020.12.01.08.16.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2020 08:16:53 -0800 (PST) From: Daniel Axtens To: 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 Cc: Daniel Axtens Subject: [PATCH v9 4/6] kasan: Document support on 32-bit powerpc Date: Wed, 2 Dec 2020 03:16:30 +1100 Message-Id: <20201201161632.1234753-5-dja@axtens.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201201161632.1234753-1-dja@axtens.net> References: <20201201161632.1234753-1-dja@axtens.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000116, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: KASAN is supported on 32-bit powerpc and the docs should reflect this. Document s390 support while we're at it. Suggested-by: Christophe Leroy Reviewed-by: Christophe Leroy 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 diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/= 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 sup= ported since Clang 11. Tag-based KASAN is only supported in Clang. =20 Currently generic KASAN is supported for the x86_64, arm64, xtensa, s390= and -riscv architectures, and tag-based KASAN is supported only for arm64. +riscv architectures. It is also supported on 32-bit powerpc kernels. Tag= -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/kasa= n.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 above= the +fixmap area and occupies one eighth of the total kernel virtual memory s= pace. + +Instrumentation of the vmalloc area is optional, unless built with modul= es, +in which case it is required. --=20 2.25.1