mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 21:45:08 +00:00
Kernel: Panic on syscall from process with IOPL != 0
If this happens then the kernel is in an undefined state, so we should rather panic than attempt to limp along.
This commit is contained in:
parent
4e2a961a3d
commit
3131281747
1 changed files with 2 additions and 3 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <Kernel/API/Syscall.h>
|
||||
#include <Kernel/Arch/i386/CPU.h>
|
||||
#include <Kernel/Panic.h>
|
||||
#include <Kernel/Process.h>
|
||||
#include <Kernel/Random.h>
|
||||
#include <Kernel/ThreadTracer.h>
|
||||
|
@ -165,9 +166,7 @@ void syscall_handler(TrapFrame* trap)
|
|||
static constexpr u32 iopl_mask = 3u << 12;
|
||||
|
||||
if ((regs.eflags & (iopl_mask)) != 0) {
|
||||
dbgln("Syscall from process with IOPL != 0");
|
||||
handle_crash(regs, "Non-zero IOPL on syscall entry", SIGSEGV);
|
||||
ASSERT_NOT_REACHED();
|
||||
PANIC("Syscall from process with IOPL != 0");
|
||||
}
|
||||
|
||||
if (!MM.validate_user_stack(process, VirtualAddress(regs.userspace_esp))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue