mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-04 02:23:10 +00:00
Got basic tty driver & implemented Stack Smash Protector
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Stack Smash Protector
|
||||
* Source: https://wiki.osdev.org/Stack_Smashing_Protector
|
||||
*/
|
||||
#include <kernel.h>
|
||||
|
||||
// TODO: Make this randomized
|
||||
#define STACK_CHK_GUARD 0x27a1abd8
|
||||
|
||||
uintptr_t __stack_chk_guard = STACK_CHK_GUARD;
|
||||
__noreturn void __stack_chk_fail(void) {
|
||||
panic("Stack smashing detected!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user