Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1462547pxf; Fri, 19 Mar 2021 07:43:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHhXFAIknvzVRd0c8J6SmdPp45yKEnABNy3IFCF8KnfvE7B8Yh5r6gqwwWtahSrKDaY72p X-Received: by 2002:a17:906:4c85:: with SMTP id q5mr4668134eju.375.1616164998518; Fri, 19 Mar 2021 07:43:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616164998; cv=none; d=google.com; s=arc-20160816; b=pWh/6imVOc9ONrtLGvE73whFCeyCdBXlYub3nyaadzh+IZ+HuMz30j9zFkGqT2sORc pbQVnTLohkSnWC+2p2nTpXlf9KhNEI3pbVaT82uQEyzc318giJ/YWIgvQIYdHQCkgkIm //2DJNhxpIFx7NbHjosIx/GjvZFrF8PlDHwpoqp2vzqahPV91BHKw5JyGwaHqXt60I+a X9HLRNCDSOkaancL0TG070HIEJ9ajAbs3x+Jpc4cLDSDeQ2YO7rEJpxa8lTZZvm0N5Fs W+tb9zL1D5zCy5cADC8wOZdldU7/xZDrbMgNsSFullcT4xm5UWfAKNGA6RZ4GiNMQamQ qErQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dCC3AVfnj1w2eD4KT8qv23tgUysFvODW8V6tvYzpnj0=; b=C+0N+YEPDT8Wt8WhUBOtj20zESBZLeGOvqWE6EMaxInF68WEp6GA1+In7AA36vAUXU ZF82AI47ejQisE953UNwtfDuqbd4tjAjsefJoD9v6F2w+9Xr/OhYz5b8JD55k9z0RJIG tKUYdbnF33KgDwVykOULt9VwjzfV3NpD77GveP1a4HZuGUZC+1UuRroSG1odYp5Zmm5T XoXNQNGxJzqoO1Ii2G/12e1V5tNYGbHy7knOuHIimMRiFKm3cLJxlxvJkox0Z1+QmI4D s9O3huu5EpxL6+mw4zRvCDMK0BaSzzBh/2k4VvtB9jlFbCm+1MmIDhxhf4IoMi0A6mHC xAJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axtens.net header.s=google header.b=Kcj5V4JO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb24si4375302edb.482.2021.03.19.07.42.56; Fri, 19 Mar 2021 07:43:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@axtens.net header.s=google header.b=Kcj5V4JO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbhCSOlv (ORCPT + 99 others); Fri, 19 Mar 2021 10:41:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230254AbhCSOlV (ORCPT ); Fri, 19 Mar 2021 10:41:21 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E858C06174A for ; Fri, 19 Mar 2021 07:41:21 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id g10so3052926plt.8 for ; Fri, 19 Mar 2021 07:41:21 -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=dCC3AVfnj1w2eD4KT8qv23tgUysFvODW8V6tvYzpnj0=; b=Kcj5V4JO6UXzdOoeJYTdGv3hGZ0yiAZ4YA1dMGC+BWrEwefW0Qhg42b9QG27UfIZz+ uf8r2JJzyEWmiIGbkR+DyB3Cyv7gPflBIA9aFiPnFfODIyrgnN84967czC0raJWhAown P0aP8rySNsA8usPv4NxILaGKNQmu0E7Ap02sM= 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=dCC3AVfnj1w2eD4KT8qv23tgUysFvODW8V6tvYzpnj0=; b=nAUaBTRDrHV/lE4pRBJM5zHNXpdwGuYJ/igwzaAQaNFTcX5gcF6uoelZns9siNumyf kESjaEDCnSuc+bBcm6B0A81Zec827vCnVa/+nyL4BGKvXDknuZuY50LCYsGDR8tKGugV iL8paSkrwcV6tg8lH9wcv7SoCjQCEI1k/dqMSeHoFbC5GJfR+fr8ea+iQ3YyODNQDbyc OPzViXqTjL8x2UXhAVxbvhVk1cQunWQ3bLHkX3sSsnsv59WeoSHrZctPaRCYk7oTuJq8 GttOXJ5Dt1Ngzy8rW7/X15Ty0saXcnrRImpEKKneiyVSmCK8Vjl2mfTR89fW7U1vfMn7 iwjw== X-Gm-Message-State: AOAM532YCuS630ylVnDZjoBjOTCkUCxgdHG4THTTveMjmJ3WCw0V3UU9 pfWanXCxI/ldCwy/OQBlZ9RO73+yNxPooQ== X-Received: by 2002:a17:902:ac93:b029:e6:548b:d61 with SMTP id h19-20020a170902ac93b02900e6548b0d61mr14570825plr.80.1616164880480; Fri, 19 Mar 2021 07:41:20 -0700 (PDT) Received: from localhost (2001-44b8-111e-5c00-674e-5c6f-efc9-136d.static.ipv6.internode.on.net. [2001:44b8:111e:5c00:674e:5c6f:efc9:136d]) by smtp.gmail.com with ESMTPSA id o197sm5984619pfd.42.2021.03.19.07.41.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 07:41:20 -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@csgroup.eu, aneesh.kumar@linux.ibm.com, bsingharora@gmail.com Cc: Daniel Axtens Subject: [PATCH v11 4/6] kasan: Document support on 32-bit powerpc Date: Sat, 20 Mar 2021 01:40:56 +1100 Message-Id: <20210319144058.772525-5-dja@axtens.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210319144058.772525-1-dja@axtens.net> References: <20210319144058.772525-1-dja@axtens.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Suggested-by: Christophe Leroy Reviewed-by: Christophe Leroy Signed-off-by: Daniel Axtens --- Documentation/dev-tools/kasan.rst | 8 ++++++-- Documentation/powerpc/kasan.txt | 12 ++++++++++++ 2 files changed, 18 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 a8c3e0cff88d..2cfd5d9068c0 100644 --- a/Documentation/dev-tools/kasan.rst +++ b/Documentation/dev-tools/kasan.rst @@ -36,7 +36,8 @@ 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 32-bit powerpc kernels. +Tag-based KASAN modes are supported only for arm64. Usage ----- @@ -334,7 +335,10 @@ CONFIG_KASAN_VMALLOC 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. +riscv, 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.27.0