From db7496cd5f97388a6f0d675bb3d532af1f7a098c Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Fri, 13 Dec 2024 19:44:19 +0100 Subject: [PATCH] Revert "support randomizing the lower bits of brk" This reverts commit e3839126e6ed050aed6bc156e59282c6fae31996. --- mm/mmap.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index 1f7569626..bda4188ef 100755 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -250,13 +250,6 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) newbrk = PAGE_ALIGN(brk); oldbrk = PAGE_ALIGN(mm->brk); - /* properly handle unaligned min_brk as an empty heap */ - if (min_brk & ~PAGE_MASK) { - if (brk == min_brk) - newbrk -= PAGE_SIZE; - if (mm->brk == min_brk) - oldbrk -= PAGE_SIZE; - } if (oldbrk == newbrk) { mm->brk = brk; goto success;