Kernel: Canonicalize vaddr before using it

This commit is contained in:
2023-10-30 19:20:17 +02:00
parent b80b59ce24
commit 71ecdd7245

View File

@@ -580,8 +580,9 @@ namespace Kernel
vaddr |= (uint64_t)pdpte << 30; vaddr |= (uint64_t)pdpte << 30;
vaddr |= (uint64_t)pde << 21; vaddr |= (uint64_t)pde << 21;
vaddr |= (uint64_t)pte << 12; vaddr |= (uint64_t)pte << 12;
vaddr = canonicalize(vaddr);
ASSERT(reserve_page(vaddr)); ASSERT(reserve_page(vaddr));
return canonicalize(vaddr); return vaddr;
} }
} }
} }