mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 17:58:49 +00:00
Hang if we GPF in ring 0.
This commit is contained in:
parent
56c1f9db8e
commit
1a801e5737
Notes:
sideshowbarker
2024-07-19 18:46:38 +09:00
Author: https://github.com/awesomekling
Commit: 1a801e5737
2 changed files with 7 additions and 0 deletions
|
@ -37,6 +37,8 @@ public:
|
||||||
Ring3 = 3,
|
Ring3 = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool isRing0() const { return m_ring == Ring0; }
|
||||||
|
|
||||||
static Task* fromPID(pid_t);
|
static Task* fromPID(pid_t);
|
||||||
static Task* fromIPCHandle(IPC::Handle);
|
static Task* fromIPCHandle(IPC::Handle);
|
||||||
static Task* kernelTask();
|
static Task* kernelTask();
|
||||||
|
|
|
@ -79,6 +79,11 @@ void exception_13_handler()
|
||||||
kprintf("eax=%x ebx=%x ecx=%x edx=%x\n", regs.eax, regs.ebx, regs.ecx, regs.edx);
|
kprintf("eax=%x ebx=%x ecx=%x edx=%x\n", regs.eax, regs.ebx, regs.ecx, regs.edx);
|
||||||
kprintf("ebp=%x esp=%x esi=%x edi=%x\n", regs.ebp, regs.esp, regs.esi, regs.edi);
|
kprintf("ebp=%x esp=%x esi=%x edi=%x\n", regs.ebp, regs.esp, regs.esi, regs.edi);
|
||||||
|
|
||||||
|
if (current->isRing0()) {
|
||||||
|
kprintf("Oh shit, we've crashed in ring 0 :(\n");
|
||||||
|
HANG;
|
||||||
|
}
|
||||||
|
|
||||||
current->setState(Task::Crashing);
|
current->setState(Task::Crashing);
|
||||||
if (!scheduleNewTask()) {
|
if (!scheduleNewTask()) {
|
||||||
kprintf("Failed to schedule a new task :(\n");
|
kprintf("Failed to schedule a new task :(\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue