+ x86-dont-randomize-stack-unless-current-personality-permits-it.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     x86: don't randomize stack unless current->personality permits it

has been added to the -mm tree.  Its filename is

     x86-dont-randomize-stack-unless-current-personality-permits-it.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: x86: don't randomize stack unless current->personality permits it
From: Frank van Maarseveen <frankvm@xxxxxxxxxxx>

Do not randomize stack location unless current->personality permits it.

Signed-off-by: Frank van Maarseveen <frankvm@xxxxxxxxxxx>
Acked-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/i386/kernel/process.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN arch/i386/kernel/process.c~x86-dont-randomize-stack-unless-current-personality-permits-it arch/i386/kernel/process.c
--- a/arch/i386/kernel/process.c~x86-dont-randomize-stack-unless-current-personality-permits-it
+++ a/arch/i386/kernel/process.c
@@ -37,6 +37,7 @@
 #include <linux/kallsyms.h>
 #include <linux/ptrace.h>
 #include <linux/random.h>
+#include <linux/personality.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -919,7 +920,7 @@ asmlinkage int sys_get_thread_area(struc
 
 unsigned long arch_align_stack(unsigned long sp)
 {
-	if (randomize_va_space)
+	if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
 		sp -= get_random_int() % 8192;
 	return sp & ~0xf;
 }
_

Patches currently in -mm which might be from frankvm@xxxxxxxxxxx are

x86-dont-randomize-stack-unless-current-personality-permits-it.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux