Skip to content

Commit 4210157

Browse files
linuswRussell King
authored and
Russell King
committed
ARM: 9017/2: Enable KASan for ARM
This patch enables the kernel address sanitizer for ARM. XIP_KERNEL has not been tested and is therefore not allowed for now. Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: kasan-dev@googlegroups.com Acked-by: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> # QEMU/KVM/mach-virt/LPAE/8G Tested-by: Florian Fainelli <f.fainelli@gmail.com> # Brahma SoCs Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de> # i.MX6Q Signed-off-by: Abbott Liu <liuwenliang@huawei.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
1 parent 5615f69 commit 4210157

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Documentation/dev-tools/kasan.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ out-of-bounds accesses for global variables is only supported since Clang 11.
1818

1919
Tag-based KASAN is only supported in Clang.
2020

21-
Currently generic KASAN is supported for the x86_64, arm64, xtensa, s390 and
22-
riscv architectures, and tag-based KASAN is supported only for arm64.
21+
Currently generic KASAN is supported for the x86_64, arm, arm64, xtensa, s390
22+
and riscv architectures, and tag-based KASAN is supported only for arm64.
2323

2424
Usage
2525
-----

Documentation/features/debug/KASAN/arch-support.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-----------------------
99
| alpha: | TODO |
1010
| arc: | TODO |
11-
| arm: | TODO |
11+
| arm: | ok |
1212
| arm64: | ok |
1313
| c6x: | TODO |
1414
| csky: | TODO |

arch/arm/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ config ARM
6767
select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6
6868
select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU
6969
select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU
70+
select HAVE_ARCH_KASAN if MMU && !XIP_KERNEL
7071
select HAVE_ARCH_MMAP_RND_BITS if MMU
7172
select HAVE_ARCH_SECCOMP
7273
select HAVE_ARCH_SECCOMP_FILTER if AEABI && !OABI_COMPAT

0 commit comments

Comments
 (0)