Kernel: on stack smashing detection, do not trigger a normal panic

That triggers stack traces, which we do not want in a stack smash fail situation
This commit is contained in:
apio 2022-10-16 19:04:24 +02:00
parent 9b39d618de
commit e34045a78c

View File

@ -1,9 +1,14 @@
#define MODULE "stack"
#include "panic/Panic.h"
#include "log/Log.h"
#include "misc/hang.h"
#include "render/TextRenderer.h"
#include <stdint.h>
extern "C" void __stack_chk_fail()
{
panic("Stack smashing detected");
KernelLog::enable_log_backend(Backend::Console);
TextRenderer::reset();
kerrorln("stack smashing detected");
hang();
}