riscv: define ILLEGAL_POINTER_VALUE for 64bit
PATCH v2 1/1 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.
---
Since v1:
- fix typo:s/SV59/SV57
arch/riscv/Kconfig | 5 +++++ 1 file changed, 5 insertions(+)
arch/riscv/Kconfig +5 -0
@@ -313,6 +313,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
Signature · 1 line
2.43.0
Quoted 4 lines · Jisheng Zhang
This is used in
poison.hfor poison pointer offset. Based on current SV39, SV48 and SV57 vm layout,0xdead000000000000is a proper value that is not mappable, this can avoid potentially turning an oops to an expolit.
Maybe I also need to cc stable? This is a secure hole fix patch.
Quoted 34 lines
Signed-off-by Jisheng Zhang <[email protected]>---
Since v1:
- fix typo:s/SV59/SV57arch/riscv/Kconfig | 5 +++++ 1 file changed, 5 insertions(+)arch/riscv/Kconfig +5
-0@@ -313,6 +313,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 64BITSignature · 7 lines
2.43.0 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Palmer Dabbelt
maintainerQuoted 7 lines · On Fri, 05 Jul 2024 17:50:10 PDT (-0700), [email protected] wrote:
Quoted 4 lines · Jisheng Zhang
This is used in
poison.hfor poison pointer offset. Based on current SV39, SV48 and SV57 vm layout,0xdead000000000000is a proper value that is not mappable, this can avoid potentially turning an oops to an expolit.Maybe I also need to cc stable? This is a secure hole fix patch.
Ya, and I guess it's just been broken forever? I stuck a
it should show up on for-next, assuming the tests pass...
Quoted 35 lines
Quoted 35 lines
Signed-off-by Jisheng Zhang <[email protected]>---
Since v1:
- fix typo:s/SV59/SV57arch/riscv/Kconfig | 5 +++++ 1 file changed, 5 insertions(+)arch/riscv/Kconfig +5
-1@@ -313,6 +313,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 --2.43.0
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:
Hello:
This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:
Quoted 8 lines · On Sat, 6 Jul 2024 01:02:10 +0800 you wrote:
This is used in
poison.hfor poison pointer offset. Based on current SV39, SV48 and SV57 vm layout,0xdead000000000000is a proper value that is not mappable, this can avoid potentially turning an oops to an expolit.Signed-off-by Jisheng Zhang <[email protected]>[...]
Here is the summary with links:
- [v2] riscv: define ILLEGAL_POINTER_VALUE for 64bit
https://git.kernel.org/riscv/c/5c178472af24
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html