summaryrefslogtreecommitdiff
path: root/libk/stack_protector.c
diff options
context:
space:
mode:
Diffstat (limited to 'libk/stack_protector.c')
-rw-r--r--libk/stack_protector.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libk/stack_protector.c b/libk/stack_protector.c
index 78d0302..a929ae0 100644
--- a/libk/stack_protector.c
+++ b/libk/stack_protector.c
@@ -1,11 +1,9 @@
#include <kernel/panic.h>
#include <stdint.h>
-#include <stddef.h>
-#define STACK_CHK_GUARD 0x32E3429E
-
-uintptr_t __stack_chk_guard = STACK_CHK_GUARD;
+uintptr_t __stack_chk_guard;
__attribute__((noreturn)) void __stack_chk_fail(void) {
- panic("STACK SMASHING IN KERNEL ADDRESS SPACE");
+ panic("Detected attempted stack manipulation in kernel");
+ while(1);
}