Kernel: Don't share the bottom 2 MiB of kernel mappings with processes

Now that the last 2 users of these mappings (the Prekernel and the APIC
ap boot environment) were removed, these are no longer used.
This commit is contained in:
Idan Horowitz 2021-12-19 18:17:48 +02:00 committed by Brian Gianforcaro
parent 4fc28bfe02
commit fccd0432a1
Notes: sideshowbarker 2024-07-17 22:23:16 +09:00

View File

@ -125,13 +125,6 @@ ErrorOr<NonnullRefPtr<PageDirectory>> PageDirectory::try_create_for_userspace(Vi
MM.unquickmap_page();
}
// Clone bottom 2 MiB of mappings from kernel_page_directory
PageDirectoryEntry buffer;
auto* kernel_pd = MM.quickmap_pd(MM.kernel_page_directory(), 0);
memcpy(&buffer, kernel_pd, sizeof(PageDirectoryEntry));
auto* new_pd = MM.quickmap_pd(*directory, 0);
memcpy(new_pd, &buffer, sizeof(PageDirectoryEntry));
cr3_map().insert(directory->cr3(), directory);
return directory;
}