Skip to content
Snippets Groups Projects
Commit a0f7085f authored by Jinjie Ruan's avatar Jinjie Ruan Committed by Huacai Chen
Browse files

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: default avatarKees Cook <kees@kernel.org>
Signed-off-by: default avatarJinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 08f417db
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment