ARM: Support KFENCE for ARM 63/281563/1
authorKefeng Wang <wangkefeng.wang@huawei.com>
Mon, 15 Nov 2021 13:48:48 +0000 (21:48 +0800)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 20 Sep 2022 02:56:50 +0000 (11:56 +0900)
commit40496ad8911ab0174aacad32aaf7e374f5c82279
tree5bb72d15f7ac229e21d29089c007fa1679d33143
parent8b6fcae657f78f701ee7dd20cd7df80259b9c245
ARM: Support KFENCE for ARM

Add architecture specific implementation details for KFENCE and enable
KFENCE on ARM. In particular, this implements the required interface in
 <asm/kfence.h>.

KFENCE requires that attributes for pages from its memory pool can
individually be set. Therefore, force the kfence pool to be mapped
at page granularity.

Testing this patch using the testcases in kfence_test.c and all passed
with or without ARM_LPAE.

Acked-by: Marco Elver <elver@google.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Link: https://lore.kernel.org/linux-arm-kernel/20211115134848.171098-4-wangkefeng.wang@huawei.com/
[port for kfence feature to rpi-5.10.95]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ib2afb1c98fb5bf437f68766fe391ac9bc118f6ad
arch/arm/Kconfig
arch/arm/include/asm/kfence.h [new file with mode: 0644]
arch/arm/mm/fault.c