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:
parent
9b39d618de
commit
e34045a78c
@ -1,9 +1,14 @@
|
|||||||
#define MODULE "stack"
|
#define MODULE "stack"
|
||||||
|
|
||||||
#include "panic/Panic.h"
|
#include "log/Log.h"
|
||||||
|
#include "misc/hang.h"
|
||||||
|
#include "render/TextRenderer.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
extern "C" void __stack_chk_fail()
|
extern "C" void __stack_chk_fail()
|
||||||
{
|
{
|
||||||
panic("Stack smashing detected");
|
KernelLog::enable_log_backend(Backend::Console);
|
||||||
|
TextRenderer::reset();
|
||||||
|
kerrorln("stack smashing detected");
|
||||||
|
hang();
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user