runtime_loader: explicitly randomize rld_heap and _rld_debug_ positions

This commit is contained in:
Pawel Dziepak 2013-04-16 02:44:47 +02:00
parent db1ca60528
commit 9f3bd49737
2 changed files with 3 additions and 3 deletions

View File

@ -1031,7 +1031,7 @@ rldelf_init(void)
runtime_loader_debug_area *area;
area_id areaID = _kern_create_area(RUNTIME_LOADER_DEBUG_AREA_NAME,
(void **)&area, B_ANY_ADDRESS, size, B_NO_LOCK,
(void **)&area, B_RANDOMIZED_ANY_ADDRESS, size, B_NO_LOCK,
B_READ_AREA | B_WRITE_AREA);
if (areaID < B_OK) {
FATAL("Failed to create debug area.\n");

View File

@ -178,8 +178,8 @@ static status_t
add_area(size_t size)
{
void *base;
area_id area = _kern_create_area("rld heap", &base, B_ANY_ADDRESS, size,
B_NO_LOCK, B_READ_AREA | B_WRITE_AREA);
area_id area = _kern_create_area("rld heap", &base,
B_RANDOMIZED_ANY_ADDRESS, size, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA);
if (area < B_OK)
return area;