arm64, kfence: enable KFENCE for ARM64

Linux Kernel / Linux Kernel - Marco Elver [] - 26 February 2021 17:41 UTC

Add architecture specific implementation details for KFENCE and enable KFENCE for the arm64 architecture. In particular, this implements the required interface in .

KFENCE requires that attributes for pages from its memory pool can individually be set. Therefore, force the entire linear map to be mapped at page granularity. Doing so may result in extra memory allocated for page tables in case rodata=full is not set; however, currently CONFIG_RODATA_FULL_DEFAULT_ENABLED=y is the default, and the common case is therefore not affected by this change.

[ add missing copyright and description header] Link:


840b23986344 arm64, kfence: enable KFENCE for ARM64
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/kfence.h | 24 ++++++++++++++++++++++++
arch/arm64/mm/fault.c | 4 ++++
arch/arm64/mm/mmu.c | 8 +++++++-
4 files changed, 36 insertions(+), 1 deletion(-)


  • Share