VMM: Add a few memsets
This seems to fix exec() making weird page tables!!
This commit is contained in:
parent
671f2a2de3
commit
755242719c
@ -12,6 +12,7 @@ AddressSpace AddressSpace::create()
|
|||||||
{
|
{
|
||||||
AddressSpace result;
|
AddressSpace result;
|
||||||
result.m_pml4 = (PageTable*)PMM::request_page();
|
result.m_pml4 = (PageTable*)PMM::request_page();
|
||||||
|
memset(result.m_pml4, 0, PAGE_SIZE);
|
||||||
VMM::install_kernel_page_directory_into_address_space(result);
|
VMM::install_kernel_page_directory_into_address_space(result);
|
||||||
return move(result);
|
return move(result);
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,8 @@ void VMM::install_kernel_page_directory_into_address_space(AddressSpace& space)
|
|||||||
|
|
||||||
if (!space_last_pdp_pde.present)
|
if (!space_last_pdp_pde.present)
|
||||||
{
|
{
|
||||||
space_last_pdp = (PageTable*)PMM::request_page();
|
space_last_pdp = (PageTable*)PMM::request_page(); // FIXME: Add out-of-memory checks.
|
||||||
|
memset(space_last_pdp, 0, PAGE_SIZE);
|
||||||
|
|
||||||
space_last_pdp_pde.present = true;
|
space_last_pdp_pde.present = true;
|
||||||
space_last_pdp_pde.read_write = true;
|
space_last_pdp_pde.read_write = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user