Home
last modified time | relevance | path

Searched hist:a0f7085f6a63f19f83f2644ce2da49a8d3cf7c0f (Results 1 – 2 of 2) sorted by relevance

/linux/arch/loongarch/kernel/
H A Dsyscall.cdiff a0f7085f6a63f19f83f2644ce2da49a8d3cf7c0f Sat Jul 20 16:40:58 CEST 2024 Jinjie Ruan <ruanjinjie@huawei.com> 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>
/linux/arch/loongarch/
H A DKconfigdiff a0f7085f6a63f19f83f2644ce2da49a8d3cf7c0f Sat Jul 20 16:40:58 CEST 2024 Jinjie Ruan <ruanjinjie@huawei.com> 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>