mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
* We did loose tasking and only have a paging skeleton, but hey it took like 4 months so i'm happy that there's something :p
16 lines
308 B
C
16 lines
308 B
C
/*
|
|
* Stack Smash Protector
|
|
* Source: https://wiki.osdev.org/Stack_Smashing_Protector
|
|
*/
|
|
#include <kernel.h>
|
|
|
|
#ifndef STACK_CHK_GUARD
|
|
#error "STACK_CHK_GUARD not defined!"
|
|
#endif
|
|
|
|
uintptr_t __stack_chk_guard = STACK_CHK_GUARD;
|
|
__noreturn void __stack_chk_fail(void) {
|
|
panic("Stack smashing detected!");
|
|
}
|
|
|