Revert "mm: randomize lower bits of brk"

This reverts commit 2994f3aa26.
This commit is contained in:
Ksawlii 2024-12-13 19:44:19 +01:00
parent db7496cd5f
commit 83ca0706a0

View file

@ -372,9 +372,9 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
{
/* Is the current task 32bit ? */
if (!IS_ENABLED(CONFIG_64BIT) || is_compat_task())
return mm->brk + get_random_long() % SZ_32M;
return randomize_page(mm->brk, SZ_32M);
return mm->brk + get_random_long() % SZ_1G;
return randomize_page(mm->brk, SZ_1G);
}
unsigned long arch_mmap_rnd(void)