Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5691249ybv; Tue, 11 Feb 2020 21:48:19 -0800 (PST) X-Google-Smtp-Source: APXvYqzgYF3RkTnqxjArghqkrN+SYn/1BtNhHSYnqFis/eQqoJIT/rUy/7XX7n9EbM86zOY7pP+/ X-Received: by 2002:a9d:6e02:: with SMTP id e2mr8154266otr.194.1581486498935; Tue, 11 Feb 2020 21:48:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581486498; cv=none; d=google.com; s=arc-20160816; b=Ns1f6e7F8nREn5PQ8XXn0RyQlAjL5ZeQ91A+NWjMD0jBvIG5FQHqs/1nw2YAbYBH1p qbEtWaUDEX/4M1ujsWHBh9BH/hzttQDGxqZrE7ch9zHr3WVzgCkVhY7I5zqP3OcakVKE WVhbddjUfsOQvPKrIcmBYFTE6NbP+y1dlZ3KY9IJdEE6ZXqJ9qF0GdOz2WxnUQyUJmAq Z2kk4BDo6zhIWAgbyGXXUP++QdvHEhMeyiHapyk9+YhsLp/fIaeowoBa/Qk6oEKKf8tq qoxJLvSx8z5Rxw2/Soq8Jil/mpp/vVhdG7naGYQ9kL4bt9tNQrO05/8b5RdqtvWyoriL e1FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CaOpE+RnykMge29WfCqnRai8zpZuPSzzYfJQc7CCb6s=; b=p2Z6gRPE+g4lA6BOWraAVNoaTqqYDY4d7FSo17fVxzrudiJdEA0XgO6oofZ+Qmybyp G+sZAFNP1bBWFccztTW8fSzCiXKXlGdzfXFMxKTgwj1N4FMe+rhEvwoVjJ3LeKYedOld ekxw21e9LIqea3souPd41aBgsGVQB6Ju29GKrcYC63vdwIUubJfnzz+ZCy+ERB5tTTKe SkbbRrL7+oBIRCxlLMSTQr+3NUlGAORcQcM/0OfeI9YOJvvRnJz/4aYNb1fByJWQ5qja 5osti1UlIkuXAetihDNQuB7rymcBxAFNyfgoS+Bat24g5wJq6YedSlJfrw3AOMT9Y/P0 B+xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axtens.net header.s=google header.b=DumKrTfg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si2711732oif.167.2020.02.11.21.48.07; Tue, 11 Feb 2020 21:48:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@axtens.net header.s=google header.b=DumKrTfg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728200AbgBLFrk (ORCPT + 99 others); Wed, 12 Feb 2020 00:47:40 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:39229 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbgBLFrj (ORCPT ); Wed, 12 Feb 2020 00:47:39 -0500 Received: by mail-pf1-f194.google.com with SMTP id 84so658923pfy.6 for ; Tue, 11 Feb 2020 21:47:39 -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=CaOpE+RnykMge29WfCqnRai8zpZuPSzzYfJQc7CCb6s=; b=DumKrTfg6Pqfw9FrH+l5y8HVJp2QumCRHOGDX7JDwWlRy3JJ1NsWvcygtvbhXQXQXX 77Qc41YkGfOUkwaBIJHLaCstScOHwiBM55UPUwjKsDUo67xZsvFLMv2Ykxrnr6UzEpSX T80Z/ivcAMzC80gn7Oq03L2DEu6lw7qTZQ76s= 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=CaOpE+RnykMge29WfCqnRai8zpZuPSzzYfJQc7CCb6s=; b=HI34J/Q38BqSLMcfExUG/e063m53dV0RNhGaeef9G+Ykb4YLGoY7S0m+QKCtiDeoqz fk4K1zNSWsyEeVGIgWf1Pqbuc/VidlS/pb2e1bBQOO+xmEcBU/42HFiVMP3pLGlSaIhH NXp/nCb2WUiPL5qlYYoWEgvt/LmpobXnRF4eR8cOSvzG4VT3jxZC0pi0hVxOZjbYvMb3 GjhLW0heOUoOXgE7+zESjE851Ciro0HTQbMyIxqBFoHDekggqaf9yt8/qgJqGXK5mIo/ OatA/wJYENkteU+EcZyRBA8xqMEnYMFIaxe2dAEaL6ZjWkSrSB5x7ElGVeKQFJIUaHNM ljKw== X-Gm-Message-State: APjAAAUqkgRryOKDUTeNzBO667mX4cP2Lhj9/z5e8D+WxDXSlSvexZMc 3VeqrnTV6foRqaB5oWIM7LSwiaOEVmI= X-Received: by 2002:a63:c601:: with SMTP id w1mr10154971pgg.449.1581486458953; Tue, 11 Feb 2020 21:47:38 -0800 (PST) Received: from localhost (2001-44b8-1113-6700-65dc-9b98-63a7-c7a4.static.ipv6.internode.on.net. [2001:44b8:1113:6700:65dc:9b98:63a7:c7a4]) by smtp.gmail.com with ESMTPSA id h13sm5424371pjc.9.2020.02.11.21.47.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 21:47:38 -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 v6 2/4] kasan: Document support on 32-bit powerpc Date: Wed, 12 Feb 2020 16:47:22 +1100 Message-Id: <20200212054724.7708-3-dja@axtens.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200212054724.7708-1-dja@axtens.net> References: <20200212054724.7708-1-dja@axtens.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Changes since v5: - rebase - riscv has now got support. - document s390 support while we're at it - clarify when kasan_vmalloc support is required --- 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..012ef3d91d1f 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. -- 2.20.1