From patchwork Thu Jul 2 02:54:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Axtens X-Patchwork-Id: 11637775 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2E453913 for ; Thu, 2 Jul 2020 02:54:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EFEE820781 for ; Thu, 2 Jul 2020 02:54:46 +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="ZP48jJgv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EFEE820781 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 104A68D0012; Wed, 1 Jul 2020 22:54:46 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0B4DE8D0001; Wed, 1 Jul 2020 22:54:46 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE6FF8D0012; Wed, 1 Jul 2020 22:54:45 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0005.hostedemail.com [216.40.44.5]) by kanga.kvack.org (Postfix) with ESMTP id D92298D0001 for ; Wed, 1 Jul 2020 22:54:45 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A75082DFC for ; Thu, 2 Jul 2020 02:54:45 +0000 (UTC) X-FDA: 76991618130.09.shame80_0f0e79826e85 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 832E4180AD801 for ; Thu, 2 Jul 2020 02:54:45 +0000 (UTC) X-Spam-Summary: 1,0,0,8dde603296e0db8a,d41d8cd98f00b204,dja@axtens.net,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1437:1515:1535:1542:1711:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:2740:3138:3139:3140:3141:3142:3353:3865:3866:3867:3868:3870:3871:3872:4250:4321:5007:6119:6261:6653:7903:10004:11026:11232:11473:11658:11914:12043:12048:12297:12438:12517:12519:12555:12895:12986:13141:13200:13229:13230:13894:14096:14181:14394:14721:21080:21444:21451:21627:21740:30054,0,RBL:209.85.215.195:@axtens.net:.lbl8.mailshell.net-62.2.0.100 66.100.201.201;04ygtkhhwyb93y7nab97emu3qjnpqop1gg9ts8p55yc1djgo41ib4eis7iaezdz.qqi5febyx8xx4qewsk3incuntwg739ummuiwhc168sqky73ucbzzxac968kxzck.e-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: shame80_0f0e79826e85 X-Filterd-Recvd-Size: 5136 Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Thu, 2 Jul 2020 02:54:45 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id f3so12747177pgr.2 for ; Wed, 01 Jul 2020 19:54:45 -0700 (PDT) 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=D4Q7wlnC9uinQAfoiYOmKAt3GyYnF0nwS1m28sSQDUo=; b=ZP48jJgvWkI9Wmfys6LSUGRJKCAuUvIJ1CenCS7q4/qaZMUpIwAmGMeKJPT2wS0Wmy yQ4JtPRu7jJcldH2+IBxwZ7U8Dmekr3AiJj8akIHRdks0YXPwYaZJa5DOKZilVmzJlCP F/rL62iMEdh++SSXvJq21IJPk/pF89qIJJacE= 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=D4Q7wlnC9uinQAfoiYOmKAt3GyYnF0nwS1m28sSQDUo=; b=Sg7Op3R2Oo+t6yvUGvB1aJFuDT69k5FQESi79M88+Xb0W/+xbURiVih+Qh5SrO/MlV laGzlOUkkn+oPB5GaEGUvIT/kbtyp9+5l/kYB8xEKOdUU+uKFE3eP6yDso39XSMpw9Cq ogdXBK5gkm8+4ajaAnLMdROQGK7mjg9wwdNAdWr4XH5znrUQe+fRBlxVqF5/9BCwwawQ YJUrg5Emd6aXZEojSuxZ6nR3ogUDFEn/5WNeCXI7aocyYsYJtNqtfMUnBJUCS34+/Wgk icQkoundzxcscM2cxpUgcA7zVwWUy1MT4HEYNYH31TD7qs3XkNT+dNnf6rn7gl2QmNSK QD3Q== X-Gm-Message-State: AOAM531M7GrMuHoOVCc/a7AFFklPEaQbJH9UTwXRgYdDOxyrfMDeRPIU NTCEfi9jC85XmN45YP7hgzMx4Q== X-Google-Smtp-Source: ABdhPJyDd94QLnAKxB+F6OzOYld27r7l1OjUzszJAvVmLhfM9lYgzLjnElqe0vUfemvYhf3Y3Zpv8g== X-Received: by 2002:a63:20d:: with SMTP id 13mr22820110pgc.166.1593658484159; Wed, 01 Jul 2020 19:54:44 -0700 (PDT) Received: from localhost (2001-44b8-1113-6700-3c80-6152-10ca-83bc.static.ipv6.internode.on.net. [2001:44b8:1113:6700:3c80:6152:10ca:83bc]) by smtp.gmail.com with ESMTPSA id h6sm7031275pfo.123.2020.07.01.19.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 19:54:43 -0700 (PDT) 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 v8 2/4] kasan: Document support on 32-bit powerpc Date: Thu, 2 Jul 2020 12:54:30 +1000 Message-Id: <20200702025432.16912-3-dja@axtens.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200702025432.16912-1-dja@axtens.net> References: <20200702025432.16912-1-dja@axtens.net> MIME-Version: 1.0 X-Rspamd-Queue-Id: 832E4180AD801 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: 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 c652d740735d..554cbee1d240 100644 --- a/Documentation/dev-tools/kasan.rst +++ b/Documentation/dev-tools/kasan.rst @@ -22,7 +22,8 @@ global variables yet. Tag-based KASAN is only supported in Clang and requires version 7.0.0 or later. 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. Usage ----- @@ -255,7 +256,9 @@ CONFIG_KASAN_VMALLOC ~~~~~~~~~~~~~~~~~~~~ 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. 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/kasan.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 +============== + +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 space. + +Instrumentation of the vmalloc area is optional, unless built with modules, +in which case it is required.