mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
Kernel: Don't consider kernel memory regions for syscall origin check
We should never enter the syscall handler from a kernel address.
This commit is contained in:
parent
d71f64b97f
commit
c6b7b98b64
3 changed files with 6 additions and 6 deletions
|
@ -190,7 +190,7 @@ void syscall_handler(TrapFrame* trap)
|
|||
handle_crash(regs, "Bad stack on syscall entry", SIGSTKFLT);
|
||||
}
|
||||
|
||||
auto* calling_region = MM.find_region_from_vaddr(process.space(), VirtualAddress(regs.eip));
|
||||
auto* calling_region = MM.find_user_region_from_vaddr(process.space(), VirtualAddress(regs.eip));
|
||||
if (!calling_region) {
|
||||
dbgln("Syscall from {:p} which has no associated region", regs.eip);
|
||||
handle_crash(regs, "Syscall from unknown region", SIGSEGV);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue