The patch titled
brk randomization: compute RLIMIT_DATA properly
has been added to the -mm tree. Its filename is
i386-and-x86_64-randomize-brk-fix-2.patch
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
------------------------------------------------------
Subject: brk randomization: compute RLIMIT_DATA properly
From: Jiri Kosina <[EMAIL PROTECTED]>
In cases of heap area placed at randomly-generated offset from mm->end_data
(arch_randomize_brk()), we need to subtract the value of the offset for
setrlimit(RLIMIT_DATA) to work properly -- otherwise we count the
unoccupied memory between mm->end_data and mm->start_brk as occupied.
Tested-by: Sami Farin <[EMAIL PROTECTED]>
Acked-by: Hugh Dickins <[EMAIL PROTECTED]>
Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
Cc: Arjan van de Ven <[EMAIL PROTECTED]>
Cc: Thomas Gleixner <[EMAIL PROTECTED]>
Cc: Ingo Molnar <[EMAIL PROTECTED]>
Cc: Roland McGrath <[EMAIL PROTECTED]>
Cc: Jakub Jelinek <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
mm/mmap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN mm/mmap.c~i386-and-x86_64-randomize-brk-fix-2 mm/mmap.c
--- a/mm/mmap.c~i386-and-x86_64-randomize-brk-fix-2
+++ a/mm/mmap.c
@@ -251,7 +251,8 @@ asmlinkage unsigned long sys_brk(unsigne
* not page aligned -Ram Gupta
*/
rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur;
- if (rlim < RLIM_INFINITY && brk - mm->start_data > rlim)
+ if (rlim < RLIM_INFINITY && (brk - mm->start_brk) +
+ (mm->end_data - mm->start_data) > rlim)
goto out;
newbrk = PAGE_ALIGN(brk);
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
origin.patch
git-hid.patch
make-wistron-btns-recognize-special-keys-on-medion-wim2160-notebooks.patch
first-stab-at-elantech-touchpad-driver-for-26226-testers.patch
fujitsu-application-panel-driver.patch
fujitsu-application-panel-driver-space-savings.patch
git-ipwireless_cs.patch
i386-and-x86_64-randomize-brk.patch
i386-and-x86_64-randomize-brk-fix.patch
i386-and-x86_64-randomize-brk-fix-2.patch
rtc-convert-mutex-to-bitfield.patch
pie-executable-randomization.patch
pie-executable-randomization-checkpatch-fixes.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html