mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +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
Notes:
sideshowbarker
2024-07-18 08:43:13 +09:00
Author: https://github.com/bgianfo
Commit: 308396bca1
Pull-request: https://github.com/SerenityOS/serenity/pull/8864
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/gunnarbeutner ✅
Reviewed-by: https://github.com/tomuta ✅
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