mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 05:57:35 +00:00
Kernel: No lock validate_user_stack variant, switch to Space as argument
The entire process is not needed, just require the user to pass in the Space. Also provide no_lock variant to use when you already have the VM/Space lock acquired, to avoid unnecessary recursive spinlock acquisitions.
This commit is contained in:
parent
59b6169b51
commit
308396bca1
5 changed files with 16 additions and 7 deletions
|
@ -200,7 +200,7 @@ NEVER_INLINE void syscall_handler(TrapFrame* trap)
|
|||
#else
|
||||
userspace_sp = VirtualAddress { regs.userspace_rsp };
|
||||
#endif
|
||||
if (!MM.validate_user_stack(process, userspace_sp)) {
|
||||
if (!MM.validate_user_stack(process.space(), userspace_sp)) {
|
||||
dbgln("Invalid stack pointer: {:p}", userspace_sp);
|
||||
handle_crash(regs, "Bad stack on syscall entry", SIGSTKFLT);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue