diff options
author | Jinjie Ruan <ruanjinjie@huawei.com> | 2024-07-20 22:40:58 +0800 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2024-07-20 22:40:58 +0800 |
commit | a0f7085f6a63f19f83f2644ce2da49a8d3cf7c0f (patch) | |
tree | 646a6b07f4a6de409ee4b11bb129f8d84ccd3197 /scripts/gdb/linux | |
parent | 08f417db702c5b05150b3851af7186fee96ddd46 (diff) |
LoongArch: Add RANDOMIZE_KSTACK_OFFSET support
Add support of kernel stack offset randomization while handling syscall,
the offset is defaultly limited by KSTACK_OFFSET_MAX().
In order to avoid triggering stack canaries (due to __builtin_alloca())
and slowing down the entry path, use __no_stack_protector attribute to
disable stack protector for do_syscall() at function level.
With this patch, the REPORT_STACK test show that:
`loongarch64 bits of stack entropy: 7`
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'scripts/gdb/linux')
0 files changed, 0 insertions, 0 deletions