fix: ssp is now enabled and it no longer crashes with several prints (so far)

This commit is contained in:
2024-11-16 14:56:05 +01:00
parent 20ba985b34
commit d8d31d959f
4 changed files with 18 additions and 3 deletions

View File

@ -18,6 +18,7 @@ void *alloc_frames(size_t size)
kprintf("type: %d, addr: %p, len: %u, size: %u, \n",
mmmt->type, mmmt->addr, mmmt->len, mmmt->size);
}
PRINT_PTR(mmmt);
}
return NULL;
}

12
src/ssp.c Normal file
View File

@ -0,0 +1,12 @@
#include "kpanic.h"
#include <stdint.h>
#define STACK_CHK_GUARD 0xe2dee396
uintptr_t __stack_chk_guard = STACK_CHK_GUARD;
__attribute__((noreturn)) void __stack_chk_fail(void)
{
kpanic("Stack smashing detected");
}