mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:18:12 +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
|
@ -1419,7 +1419,7 @@ ErrorOr<void> Thread::make_thread_specific_region(Badge<Process>)
|
|||
if (!process().m_master_tls_region)
|
||||
return {};
|
||||
|
||||
auto* region = TRY(process().address_space().allocate_region({}, thread_specific_region_size(), PAGE_SIZE, "Thread-specific", PROT_READ | PROT_WRITE));
|
||||
auto* region = TRY(process().address_space().allocate_region(Memory::RandomizeVirtualAddress::Yes, {}, thread_specific_region_size(), PAGE_SIZE, "Thread-specific", PROT_READ | PROT_WRITE));
|
||||
|
||||
m_thread_specific_range = region->range();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue