banan-os/kernel/kernel/Memory
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
..
DMARegion.cpp Kernel: Map DMA and PCI MMIO as uncached 2024-07-30 11:10:08 +03:00
FileBackedRegion.cpp Kernel: Implement proper memory region splitting 2025-11-13 04:20:53 +02:00
Heap.cpp Kernel: Don't ignore modules passed with multiboot2 2025-07-02 00:17:42 +03:00
MemoryBackedRegion.cpp Kernel: Implement proper memory region splitting 2025-11-13 04:20:53 +02:00
MemoryRegion.cpp Kernel/LibC: Implement MMAP_FIXED_NOREPLACE 2025-11-12 00:06:36 +02:00
PhysicalRange.cpp Kernel: Fix bitmap byte index calculation in PMM 2026-01-04 01:16:43 +02:00
SharedMemoryObject.cpp Kernel: Implement proper memory region splitting 2025-11-13 04:20:53 +02:00
VirtualRange.cpp Kernel: Rework syscall memory validation and locking 2026-01-16 16:09:38 +02:00
kmalloc.cpp Kernel: Remove obsolete kprint 2025-11-22 06:21:50 +02:00