
From: Felix Fu <fuzhen5@huawei.com> hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8RJ1I CVE: NA -------------------------------- add Kconfig NOKASLR_MEM_RANGE support. allow users to mark at most 4 memory regions as unavailable for kaslr Signed-off-by: Felix Fu <fuzhen5@huawei.com> --- init/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/init/Kconfig b/init/Kconfig index 9209fc5b39b9..732f2a32cc08 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -2037,3 +2037,11 @@ config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE # <asm/syscall_wrapper.h>. config ARCH_HAS_SYSCALL_WRAPPER def_bool n + +config NOKASLR_MEM_RANGE + bool "Allow users to mark at most 4 memory regions as unavailable for kaslr" + depends on RANDOMIZE_BASE + default n + help + Say y here and add kernel parameters as nokaslr=nn[KMG]-ss[KMG] to avoid kaslr + place kernel image in such memory regions \ No newline at end of file -- 2.34.1