From patchwork Wed May 18 10:07:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Mackerras X-Patchwork-Id: 1632727 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=Vzb0X3AS; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L37z20FDMz9sG5 for ; Wed, 18 May 2022 20:10:22 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4L37z16YVqz3c8h for ; Wed, 18 May 2022 20:10:21 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=Vzb0X3AS; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4L37wt2GN3z3bwr for ; Wed, 18 May 2022 20:08:30 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=Vzb0X3AS; dkim-atps=neutral Received: by gandalf.ozlabs.org (Postfix) id 4L37ws3W8Tz4xbP; Wed, 18 May 2022 20:08:29 +1000 (AEST) Delivered-To: linuxppc-dev@ozlabs.org Received: by gandalf.ozlabs.org (Postfix, from userid 1003) id 4L37ws3QT8z4xVP; Wed, 18 May 2022 20:08:29 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ozlabs.org; s=201707; t=1652868509; bh=0y/CsNgHYNPNSLEUxoH5VBFJEOQxxlCgSaFEdcA0DjQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vzb0X3ASEW2/VkUMbHcdMvePK+RhmBpgMGaYb7hekeNJ/hJCRkBnOEvpnBF5Y7IEQ C9e20MPwfLNUFQ7X4tnyW7Zhwb7XLvK7oH2vzoILPqEpNEbOHgVD+k6PxG60UGL+nR hE7WRUFaaOcCtWk5rsLGPOmlRp9Drfm4AvetEqfCcBk08tle8X8ak+XyN0uKEUFn5d Ym0NGGD++Cih9QwwHuncVlwYVQDU3eWc+yQbIOD83TssEW+vhbHcjAvWUyumOMrFpJ +pk37sAxmn0gBk1orAKf9bMDJ6w3Engi/KqlJsVG++DZZM+0EoS0zIJeHn6NCjLD5X 7Gi8em9FYuBSw== Date: Wed, 18 May 2022 20:07:46 +1000 From: Paul Mackerras To: linuxppc-dev@ozlabs.org Subject: [PATCH v2 6/6] Documentation/kasan: Update details of KASAN on powerpc Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Axtens Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Daniel Axtens Signed-off-by: Paul Mackerras --- Documentation/dev-tools/kasan.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst index 8089c559d339..448995c11bee 100644 --- a/Documentation/dev-tools/kasan.rst +++ b/Documentation/dev-tools/kasan.rst @@ -36,7 +36,9 @@ Both software KASAN modes work with SLUB and SLAB memory allocators, while the hardware tag-based KASAN currently only supports SLUB. Currently, generic KASAN is supported for the x86_64, arm, arm64, xtensa, s390, -and riscv architectures, and tag-based KASAN modes are supported only for arm64. +and riscv architectures. It is also supported on powerpc for 32-bit kernels and +for 64-bit kernels running under the Radix MMU. Tag-based KASAN modes are +supported only for arm64. Usage ----- @@ -351,6 +353,9 @@ With ``CONFIG_KASAN_VMALLOC``, KASAN can cover vmalloc space at the cost of greater memory usage. Currently, this is supported on x86, riscv, s390, and powerpc. +It is optional, except on 64-bit powerpc kernels, and 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.