summaryrefslogtreecommitdiff
path: root/Kernel/Arch
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2023-01-12 22:06:51 +0200
committerAndrew Kaster <andrewdkaster@gmail.com>2023-03-12 10:21:59 -0600
commit633006926fd26eba7116526c760d2ab7d2a55fe3 (patch)
treece1671b7582463e28db9c6746a17414ddfb6573b /Kernel/Arch
parent9b297c634f82479f3b6851b77f9af9e1486c4546 (diff)
downloadserenity-633006926fd26eba7116526c760d2ab7d2a55fe3.zip
Kernel: Make the Jails' internal design a lot more sane
This is done with 2 major steps: 1. Remove JailManagement singleton and use a structure that resembles what we have with the Process object. This is required later for the second step in this commit, but on its own, is a major change that removes this clunky singleton that had no real usage by itself. 2. Use IntrusiveLists to keep references to Process objects in the same Jail so it will be much more straightforward to iterate on this kind of objects when needed. Previously we locked the entire Process list and we did a simple pointer comparison to check if the checked Process we iterate on is in the same Jail or not, which required taking multiple Spinlocks in a very clumsy and heavyweight way.
Diffstat (limited to 'Kernel/Arch')
-rw-r--r--Kernel/Arch/aarch64/init.cpp3
-rw-r--r--Kernel/Arch/x86_64/init.cpp2
2 files changed, 0 insertions, 5 deletions
diff --git a/Kernel/Arch/aarch64/init.cpp b/Kernel/Arch/aarch64/init.cpp
index 7a690cce94..326b32051e 100644
--- a/Kernel/Arch/aarch64/init.cpp
+++ b/Kernel/Arch/aarch64/init.cpp
@@ -26,7 +26,6 @@
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/Graphics/Console/BootFramebufferConsole.h>
-#include <Kernel/JailManagement.h>
#include <Kernel/KSyms.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Panic.h>
@@ -175,8 +174,6 @@ extern "C" [[noreturn]] void init()
Processor::disable_interrupts();
TimeManagement::initialize(0);
- JailManagement::the();
-
Process::initialize();
Scheduler::initialize();
diff --git a/Kernel/Arch/x86_64/init.cpp b/Kernel/Arch/x86_64/init.cpp
index cc2b2757c2..4188128d9e 100644
--- a/Kernel/Arch/x86_64/init.cpp
+++ b/Kernel/Arch/x86_64/init.cpp
@@ -38,7 +38,6 @@
#include <Kernel/Graphics/Console/VGATextModeConsole.h>
#include <Kernel/Graphics/GraphicsManagement.h>
#include <Kernel/Heap/kmalloc.h>
-#include <Kernel/JailManagement.h>
#include <Kernel/KSyms.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Multiboot.h>
@@ -231,7 +230,6 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init(BootInfo const& boot_info)
__stack_chk_guard = get_fast_random<uintptr_t>();
- JailManagement::the();
Process::initialize();
Scheduler::initialize();