diff options
author | Enze Li <lienze@kylinos.cn> | 2023-09-06 17:54:16 +0300 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2023-09-06 17:54:16 +0300 |
commit | 6ad3df56bb199134800933df2afcd7df3b03ef33 (patch) | |
tree | 28d3247260414f73d95d16110d4725c62eec38a0 /arch/loongarch/Kconfig | |
parent | 95bb5b617beec0275bcc47b68796b34852fe4ecb (diff) | |
download | linux-6ad3df56bb199134800933df2afcd7df3b03ef33.tar.xz |
LoongArch: Add KFENCE (Kernel Electric-Fence) support
The LoongArch architecture is quite different from other architectures.
When the allocating of KFENCE itself is done, it is mapped to the direct
mapping configuration window [1] by default on LoongArch. It means that
it is not possible to use the page table mapped mode which required by
the KFENCE system and therefore it should be remapped to the appropriate
region.
This patch adds architecture specific implementation details for KFENCE.
In particular, this implements the required interface in <asm/kfence.h>.
Tested this patch by running the testcases and all passed.
[1] https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#virtual-address-space-and-address-translation-mode
Signed-off-by: Enze Li <lienze@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/Kconfig')
-rw-r--r-- | arch/loongarch/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig index 6cda4843f93b..0619ec165424 100644 --- a/arch/loongarch/Kconfig +++ b/arch/loongarch/Kconfig @@ -92,6 +92,7 @@ config LOONGARCH select HAVE_ARCH_AUDITSYSCALL select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_JUMP_LABEL_RELATIVE + select HAVE_ARCH_KFENCE select HAVE_ARCH_KGDB if PERF_EVENTS select HAVE_ARCH_MMAP_RND_BITS if MMU select HAVE_ARCH_SECCOMP_FILTER |