summaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2024-07-06 01:02:10 +0800
committerPalmer Dabbelt <palmer@rivosinc.com>2024-09-15 20:15:40 -0700
commit5c178472af247c7b50f962495bb7462ba453b9fb (patch)
treecd6616a4bd6d0912fdcbf799d50e6cd759d56230 /arch/riscv
parentd6a1928134a1c626ff369129d7a80951b2949a48 (diff)
riscv: define ILLEGAL_POINTER_VALUE for 64bit
This is used in poison.h for poison pointer offset. Based on current SV39, SV48 and SV57 vm layout, 0xdead000000000000 is a proper value that is not mappable, this can avoid potentially turning an oops to an expolit. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Fixes: fbe934d69eb7 ("RISC-V: Build Infrastructure") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240705170210.3236-1-jszhang@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/Kconfig5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 4871220061c4..31d941792369 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -320,6 +320,11 @@ config GENERIC_HWEIGHT
config FIX_EARLYCON_MEM
def_bool MMU
+config ILLEGAL_POINTER_VALUE
+ hex
+ default 0 if 32BIT
+ default 0xdead000000000000 if 64BIT
+
config PGTABLE_LEVELS
int
default 5 if 64BIT