1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

Kernel: Move syscall precondition validates to MM

Move these to MM to simplify the flow of the syscall handler.

While here, also make sure we hold the process space lock for
the duration of the validation to avoid potential issues where
another thread attempts to modify the process space during the
validation. This will allow us to move the validation out of the
big process lock scope in a future change.

Additionally utilize the new no_lock variants of functions to avoid
unnecessary recursive process space spinlock acquisitions.
This commit is contained in:
Brian Gianforcaro 2021-07-18 09:31:28 -07:00 committed by Gunnar Beutner
parent af543328ea
commit 27e1120dff
3 changed files with 50 additions and 35 deletions

View file

@ -189,6 +189,8 @@ public:
}
static Region* find_user_region_from_vaddr(Space&, VirtualAddress);
static Region* find_user_region_from_vaddr_no_lock(Space&, VirtualAddress);
static void validate_syscall_preconditions(Space&, RegisterState&);
void dump_kernel_regions();