Kernel: Mark the stack check guard as READONLY_AFTER_INIT

This makes it harder for an exploit to replace the kernel's randomized
canary value since the memory containing it will be mapped read-only.
This commit is contained in:
Andreas Kling 2021-07-27 14:47:42 +02:00
parent 84d3428ab3
commit 8f6bc7fd10

View file

@ -68,7 +68,7 @@ extern ctor_func_t start_ctors[];
extern ctor_func_t end_ctors[];
extern size_t __stack_chk_guard;
size_t __stack_chk_guard;
READONLY_AFTER_INIT size_t __stack_chk_guard;
extern "C" u8 start_of_safemem_text[];
extern "C" u8 end_of_safemem_text[];