ARM: 9166/1: Support KFENCE for ARM
authorWang Kefeng <wangkefeng.wang@huawei.com>
Fri, 3 Dec 2021 09:26:33 +0000 (10:26 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 17 Dec 2021 11:34:38 +0000 (11:34 +0000)
commit75969686ec0df23157afe24dc818d7bddb087d78
tree75c494737cde3df0c91fcacb3de1d67ff5a89108
parent3c341b217414d1d63718438f2b2fa588cf2b73fc
ARM: 9166/1: 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>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/Kconfig
arch/arm/include/asm/kfence.h [new file with mode: 0644]
arch/arm/mm/fault.c