From 6a6e5f75ff1256909608645a84e3814016ea78d5 Mon Sep 17 00:00:00 2001 From: Yury Popov Date: Sun, 26 May 2019 20:27:20 +0300 Subject: [PATCH] Ensure intr/syscall handlers fits in per-process PT --- src/process/process.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/process/process.cpp b/src/process/process.cpp index da1870f..a1c5fde 100644 --- a/src/process/process.cpp +++ b/src/process/process.cpp @@ -277,7 +277,9 @@ void Process::startup() { handler &= KB4; sc_wrapper &= KB4; addPage(handler, reinterpret_cast(handler), 1); + addPage(handler + 0x1000, reinterpret_cast(handler + 0x1000), 1); addPage(sc_wrapper, reinterpret_cast(sc_wrapper), 1); + addPage(sc_wrapper + 0x1000, reinterpret_cast(sc_wrapper + 0x1000), 1); GDT::Entry *gdt_ent = reinterpret_cast(uintptr_t(gdt.addr) + 8 * 3); GDT::Entry *gdt_top = reinterpret_cast(uintptr_t(gdt.addr) + gdt.limit);