mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-03 00:36:52 +03:00
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:
parent
4fc28bfe02
commit
fccd0432a1
Notes:
sideshowbarker
2024-07-17 22:23:16 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/fccd0432a13 Pull-request: https://github.com/SerenityOS/serenity/pull/11318 Reviewed-by: https://github.com/bgianfo ✅
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user