mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
Kernel: Unbreak ASLR in the new RegionTree world
Functions that allocate and/or place a Region now take a parameter that tells it whether to randomize unspecified addresses.
This commit is contained in:
parent
e89c9ed2ca
commit
858b196c59
9 changed files with 33 additions and 27 deletions
|
@ -17,7 +17,7 @@ ErrorOr<FlatPtr> Process::sys$map_time_page()
|
|||
|
||||
auto& vmobject = TimeManagement::the().time_page_vmobject();
|
||||
|
||||
auto* region = TRY(address_space().allocate_region_with_vmobject({}, PAGE_SIZE, PAGE_SIZE, vmobject, 0, "Kernel time page"sv, PROT_READ, true));
|
||||
auto* region = TRY(address_space().allocate_region_with_vmobject(Memory::RandomizeVirtualAddress::Yes, {}, PAGE_SIZE, PAGE_SIZE, vmobject, 0, "Kernel time page"sv, PROT_READ, true));
|
||||
return region->vaddr().get();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue