Kernel: Add pointer validation API to page table

This commit is contained in:
2023-09-22 17:20:35 +03:00
parent d1183f0bf6
commit dd0b8c4140
2 changed files with 10 additions and 1 deletions
+7
View File
@@ -110,6 +110,13 @@ namespace Kernel
return *s_current;
}
bool PageTable::is_valid_pointer(uintptr_t pointer)
{
if (!is_canonical(pointer))
return false;
return true;
}
static uint64_t* allocate_zeroed_page_aligned_page()
{
void* page = kmalloc(PAGE_SIZE, PAGE_SIZE, true);