From: Paul Mackerras <paulus@ozlabs•org>
To: linuxppc-dev@ozlabs•org
Subject: [PATCH 1/3] kasan: Document support on 32-bit powerpc
Date: Wed, 11 May 2022 17:26:30 +1000 [thread overview]
Message-ID: <YntlJmKGkibTZW2l@cleo> (raw)
In-Reply-To: <Yntk7oERGce44+Sd@cleo>
From: Daniel Axtens <dja@axtens•net>
KASAN is supported on 32-bit powerpc and the docs should reflect this.
Suggested-by: Christophe Leroy <christophe.leroy@csgroup•eu>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup•eu>
Signed-off-by: Daniel Axtens <dja@axtens•net>
Signed-off-by: Paul Mackerras <paulus@ozlabs•org>
---
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 8089c559d339..8e5cd26d59cb 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
-----
@@ -349,7 +350,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.35.3
next prev parent reply other threads:[~2022-05-11 7:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 7:25 [PATCH 0/3] KASAN support for 64-bit Book 3S powerpc Paul Mackerras
2022-05-11 7:26 ` Paul Mackerras [this message]
2022-05-11 7:27 ` [PATCH 2/3] powerpc/mm/kasan: rename kasan_init_32.c to init_32.c Paul Mackerras
2022-05-11 7:28 ` [PATCH 3/3] [RFC] powerpc: Book3S 64-bit outline-only KASAN support Paul Mackerras
2022-05-15 7:33 ` Christophe Leroy
2022-05-17 7:31 ` Paul Mackerras
2022-05-17 8:06 ` Christophe Leroy
2022-05-15 7:59 ` [PATCH 0/3] KASAN support for 64-bit Book 3S powerpc Christophe Leroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YntlJmKGkibTZW2l@cleo \
--to=paulus@ozlabs$(echo .)org \
--cc=linuxppc-dev@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox