Kernel: Disallow syscalls from writeable memory

Processes will now crash with SIGSEGV if they attempt making a syscall
from PROT_WRITE memory.

This neat idea comes from OpenBSD. :^)
This commit is contained in:
Andreas Kling 2019-11-29 16:15:30 +01:00
parent ea52fe528a
commit e56daf547c
Notes: sideshowbarker 2024-07-19 11:02:00 +09:00
5 changed files with 27 additions and 5 deletions

View file

@ -289,7 +289,6 @@ Region* MemoryManager::user_region_from_vaddr(Process& process, VirtualAddress v
Region* MemoryManager::region_from_vaddr(Process& process, VirtualAddress vaddr)
{
ASSERT_INTERRUPTS_DISABLED();
if (auto* region = kernel_region_from_vaddr(vaddr))
return region;
return user_region_from_vaddr(process, vaddr);