x86 boot loader: check gKernelArgs.arch_args.pgtables overflow
This commit is contained in:
parent
ed489ba831
commit
4ce1f197fa
@ -161,6 +161,11 @@ get_next_page_table()
|
|||||||
static uint32*
|
static uint32*
|
||||||
add_page_table(addr_t base)
|
add_page_table(addr_t base)
|
||||||
{
|
{
|
||||||
|
if (gKernelArgs.arch_args.num_pgtables == MAX_BOOT_PTABLES) {
|
||||||
|
panic("gKernelArgs.arch_args.pgtables overflow");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
base = ROUNDDOWN(base, B_PAGE_SIZE * 1024);
|
base = ROUNDDOWN(base, B_PAGE_SIZE * 1024);
|
||||||
|
|
||||||
// Get new page table and clear it out
|
// Get new page table and clear it out
|
||||||
|
Loading…
Reference in New Issue
Block a user