1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:47:35 +00:00

Kernel: Don't try to dump invalid code memory in page fault handler.

This commit is contained in:
Andreas Kling 2019-01-30 20:18:50 +01:00
parent 3ebbefd916
commit 2a7af0eacf

View file

@ -263,6 +263,7 @@ void exception_14_handler(RegisterDumpWithExceptionCode& regs)
dbgprintf("eax=%x ebx=%x ecx=%x edx=%x\n", regs.eax, regs.ebx, regs.ecx, regs.edx);
dbgprintf("ebp=%x esp=%x esi=%x edi=%x\n", regs.ebp, esp, regs.esi, regs.edi);
if (current->validate_read((void*)regs.eip, 8)) {
byte* codeptr = (byte*)regs.eip;
dbgprintf("code: %b %b %b %b %b %b %b %b\n",
codeptr[0],
@ -274,6 +275,7 @@ void exception_14_handler(RegisterDumpWithExceptionCode& regs)
codeptr[6],
codeptr[7]
);
}
};
if (current->isRing0()) {