banan-os/kernel
Bananymous 1143dc3cae Kernel: Rework syscall memory validation and locking
Process's memory regions are now behind an rwlock instead of using the
full process lock. This allows most pointer validations to not block as
write operations to memory regions are rare.

Thread's userspace stack is now part of process's memory regions. This
simplifies code that explicitly looped over threads to see if the
accessed address was inside a thread's stack.

Only drawback of this is that MemoryRegions don't support guard pages,
so userspace stackoverflow will be handeled as cleanly as it was prior
to this.

This patch also fixes some unnecessary locking of the process lock and
moves locking to the internal helper functions instead of asserting that
the lock is held. Also we now make sure loaded ELF regions are in sorted
order as we previously expected.
2026-01-16 16:09:38 +02:00
..
arch Kernel: Only save/load sse state when it is used 2026-01-11 03:06:39 +02:00
font BuildSystem: building for 32-bit works now 2023-04-02 05:03:17 +03:00
include/kernel Kernel: Rework syscall memory validation and locking 2026-01-16 16:09:38 +02:00
kernel Kernel: Rework syscall memory validation and locking 2026-01-16 16:09:38 +02:00
klibc LibC: Define ESHUTDOWN 2025-11-02 21:09:48 +02:00
CMakeLists.txt Kernel: optimize yielding 2026-01-11 01:31:09 +02:00
icxxabi.cpp Kernel: Fix cxxabi for function static variable guards 2024-07-14 01:53:50 +03:00
ubsan.cpp Kenrel: Add __builtin_unreachable support for UBSAN 2024-09-22 17:14:36 +03:00