mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 16:15:10 +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:
parent
a5ffa2eec7
commit
683185e4aa
5 changed files with 65 additions and 105 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue