mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-25 22:14:37 +00:00
Update page table in __stack_chk_fail and __chk_fail functions
This commit is contained in:
parent
56e47f5cef
commit
c197383a74
@ -57,6 +57,8 @@ EXTERNC __constructor __no_stack_protector void __guard_setup(void)
|
|||||||
|
|
||||||
EXTERNC __noreturn __no_stack_protector void __stack_chk_fail(void)
|
EXTERNC __noreturn __no_stack_protector void __stack_chk_fail(void)
|
||||||
{
|
{
|
||||||
|
CPU::PageTable(KernelPageTable);
|
||||||
|
|
||||||
void *Stack = nullptr;
|
void *Stack = nullptr;
|
||||||
#if defined(a64)
|
#if defined(a64)
|
||||||
asmv("movq %%rsp, %0"
|
asmv("movq %%rsp, %0"
|
||||||
@ -76,5 +78,7 @@ EXTERNC __noreturn __no_stack_protector void __stack_chk_fail(void)
|
|||||||
// https://github.com/gcc-mirror/gcc/blob/master/libssp/ssp.c
|
// https://github.com/gcc-mirror/gcc/blob/master/libssp/ssp.c
|
||||||
EXTERNC __noreturn nsa void __chk_fail(void)
|
EXTERNC __noreturn nsa void __chk_fail(void)
|
||||||
{
|
{
|
||||||
|
CPU::PageTable(KernelPageTable);
|
||||||
|
|
||||||
HandleBufferOverflow();
|
HandleBufferOverflow();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user