Commit d5935537 authored by Kefeng Wang's avatar Kefeng Wang Committed by Palmer Dabbelt

riscv: Improve stack randomisation on RV64

This enlarges the bits availiable for stack randomisation on RV64 from
the default of 8MiB to 1GiB, to match arm64 and x86.

Also, update the documentation to reflect our support for stack
randomisation.
Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
[Palmer: commit text]
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
parent efe1e08b
......@@ -22,7 +22,7 @@
| openrisc: | TODO |
| parisc: | ok |
| powerpc: | ok |
| riscv: | TODO |
| riscv: | ok |
| s390: | ok |
| sh: | TODO |
| sparc: | TODO |
......
......@@ -42,6 +42,9 @@
*/
#define ELF_ET_DYN_BASE ((TASK_SIZE / 3) * 2)
#ifdef CONFIG_64BIT
#define STACK_RND_MASK (0x3ffff >> (PAGE_SHIFT - 12))
#endif
/*
* This yields a mask that user programs can use to figure out what
* instruction set this CPU supports. This could be done in user space,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment