diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-14 10:48:04 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-14 10:51:17 +0100 |
commit | 31312817475d6b41a30c52b2ca520041e43a0084 (patch) | |
tree | ccf9d1a63989e0db84b30d180091f1170cb0bbee /Kernel | |
parent | 4e2a961a3deb3c738dd3545381fe18602927a8a9 (diff) | |
download | serenity-31312817475d6b41a30c52b2ca520041e43a0084.zip |
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.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Syscall.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp index 62652008a5..54c31b608d 100644 --- a/Kernel/Syscall.cpp +++ b/Kernel/Syscall.cpp @@ -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))) { |