mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 10:14:58 +00:00
Kernel: Fix 64-bit address truncation in MemoryManager::ensure_pte()
This commit is contained in:
parent
ed25a6ad0d
commit
f0c4941beb
2 changed files with 3 additions and 2 deletions
|
@ -552,7 +552,8 @@ PageTableEntry* MemoryManager::ensure_pte(PageDirectory& page_directory, Virtual
|
|||
pde.set_global(&page_directory == m_kernel_page_directory.ptr());
|
||||
// Use page_directory_table_index and page_directory_index as key
|
||||
// This allows us to release the page table entry when no longer needed
|
||||
auto result = page_directory.m_page_tables.set(vaddr.get() & ~0x1fffff, move(page_table));
|
||||
auto result = page_directory.m_page_tables.set(vaddr.get() & ~(FlatPtr)0x1fffff, move(page_table));
|
||||
// If you're hitting this VERIFY on x86_64 chances are a 64-bit pointer was truncated somewhere
|
||||
VERIFY(result == AK::HashSetResult::InsertedNewEntry);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue