mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 05:08:56 +00:00
MM: Allocate page tables from a separate set of physical pages.
The old approach only worked because of an overpermissive accident. There's now a concept of supervisor physical pages that can be allocated. They all sit in the low 4 MB of physical memory and are identity mapped, shared between all processes, and only ring 0 can access them.
This commit is contained in:
@@ -336,6 +336,8 @@ int Process::do_exec(const String& path, Vector<String>&& arguments, Vector<Stri
|
||||
bool success = loader.load();
|
||||
if (!success) {
|
||||
m_page_directory = move(old_page_directory);
|
||||
// FIXME: RAII this somehow instead.
|
||||
ASSERT(current == this);
|
||||
MM.enter_process_paging_scope(*this);
|
||||
m_regions = move(old_regions);
|
||||
kprintf("sys$execve: Failure loading %s\n", path.characters());
|
||||
@@ -345,6 +347,8 @@ int Process::do_exec(const String& path, Vector<String>&& arguments, Vector<Stri
|
||||
entry_eip = loader.entry().get();
|
||||
if (!entry_eip) {
|
||||
m_page_directory = move(old_page_directory);
|
||||
// FIXME: RAII this somehow instead.
|
||||
ASSERT(current == this);
|
||||
MM.enter_process_paging_scope(*this);
|
||||
m_regions = move(old_regions);
|
||||
return -ENOEXEC;
|
||||
|
||||
Reference in New Issue
Block a user