LoongArch: Add basic STACKPROTECTOR support
authorHuacai Chen <chenhuacai@loongson.cn>
Sat, 10 Dec 2022 14:40:15 +0000 (22:40 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 14 Dec 2022 00:41:53 +0000 (08:41 +0800)
commit09f33601bf940f955c10a6e75a1c1b7bcadee5e2
tree423542be6f130680ebf31b6f679af26cb764775a
parent7db54bfe44a662c8f2c10277bccfa02c2f4c719c
LoongArch: Add basic STACKPROTECTOR support

Add basic stack protector support similar to other architectures. A
constant canary value is set at boot time, and with help of compiler's
-fstack-protector we can detect stack corruption.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/Kconfig
arch/loongarch/include/asm/stackprotector.h [new file with mode: 0644]
arch/loongarch/kernel/asm-offsets.c
arch/loongarch/kernel/process.c
arch/loongarch/kernel/switch.S