mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 13:48:25 +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:
committed by
Gunnar Beutner
parent
59b6169b51
commit
308396bca1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user