mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:38:11 +00:00
Kernel: Fix bad setup of CoW faults for offset regions
Regions with an offset into their VMObject were incorrectly adding the page offset when indexing into the CoW bitmap.
This commit is contained in:
parent
5b7f8634e3
commit
98b328754e
1 changed files with 1 additions and 2 deletions
|
@ -697,8 +697,7 @@ void MemoryManager::map_region_at_address(PageDirectory& page_directory, Region&
|
|||
if (physical_page) {
|
||||
pte.set_physical_page_base(physical_page->paddr().get());
|
||||
pte.set_present(true); // FIXME: Maybe we should use the is_readable flag here?
|
||||
// FIXME: It seems wrong that the *region* cow map is essentially using *VMO* relative indices.
|
||||
if (region.should_cow(region.first_page_index() + i))
|
||||
if (region.should_cow(i))
|
||||
pte.set_writable(false);
|
||||
else
|
||||
pte.set_writable(region.is_writable());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue