summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-12-19 18:17:48 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-22 00:02:36 -0800
commitfccd0432a13b17a85cea3dbd48ee7999159f31a9 (patch)
treea188be7d9a5668c5b6bf014dfdf3bba54f8e76e6 /Kernel
parent4fc28bfe02f11526d9b63affcda0d8dcafb725b2 (diff)
downloadserenity-fccd0432a13b17a85cea3dbd48ee7999159f31a9.zip
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.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Memory/PageDirectory.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/Kernel/Memory/PageDirectory.cpp b/Kernel/Memory/PageDirectory.cpp
index d75669da65..0e922005f7 100644
--- a/Kernel/Memory/PageDirectory.cpp
+++ b/Kernel/Memory/PageDirectory.cpp
@@ -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;
}