- x86_64-fix-stack-mmap-randomization-for-compat.patch removed from -mm tree

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

 



The patch titled

     x86_64: Fix stack/mmap randomization for compat tasks

has been removed from the -mm tree.  Its filename is

     x86_64-fix-stack-mmap-randomization-for-compat.patch

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.

------------------------------------------------------
Subject: x86_64: Fix stack/mmap randomization for compat tasks
From: "Andi Kleen" <ak@xxxxxxx>


ia32_setup_arg_pages would ignore the passed in random stack top and use its
own static value.

Now it uses the 8bit of randomness native i386 would use too.

This indirectly fixes mmap randomization for 32bit processes too, which
depends on the stack randomization.

Should also give slightly better virtual cache colouring and possibly better
performance with HyperThreading.

Signed-off-by: Andi Kleen <ak@xxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/x86_64/ia32/ia32_binfmt.c |    4 ++--
 include/asm-x86_64/elf.h       |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -puN arch/x86_64/ia32/ia32_binfmt.c~x86_64-fix-stack-mmap-randomization-for-compat arch/x86_64/ia32/ia32_binfmt.c
--- devel/arch/x86_64/ia32/ia32_binfmt.c~x86_64-fix-stack-mmap-randomization-for-compat	2006-05-30 21:24:55.000000000 -0700
+++ devel-akpm/arch/x86_64/ia32/ia32_binfmt.c	2006-05-30 21:24:55.000000000 -0700
@@ -339,7 +339,7 @@ int ia32_setup_arg_pages(struct linux_bi
 	struct mm_struct *mm = current->mm;
 	int i, ret;
 
-	stack_base = IA32_STACK_TOP - MAX_ARG_PAGES * PAGE_SIZE;
+	stack_base = stack_top - MAX_ARG_PAGES * PAGE_SIZE;
 	mm->arg_start = bprm->p + stack_base;
 
 	bprm->p += stack_base;
@@ -357,7 +357,7 @@ int ia32_setup_arg_pages(struct linux_bi
 	{
 		mpnt->vm_mm = mm;
 		mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p;
-		mpnt->vm_end = IA32_STACK_TOP;
+		mpnt->vm_end = stack_top;
 		if (executable_stack == EXSTACK_ENABLE_X)
 			mpnt->vm_flags = VM_STACK_FLAGS |  VM_EXEC;
 		else if (executable_stack == EXSTACK_DISABLE_X)
diff -puN include/asm-x86_64/elf.h~x86_64-fix-stack-mmap-randomization-for-compat include/asm-x86_64/elf.h
--- devel/include/asm-x86_64/elf.h~x86_64-fix-stack-mmap-randomization-for-compat	2006-05-30 21:24:55.000000000 -0700
+++ devel-akpm/include/asm-x86_64/elf.h	2006-05-30 21:24:55.000000000 -0700
@@ -159,7 +159,7 @@ extern int dump_task_fpu (struct task_st
 #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
 
 /* 1GB for 64bit, 8MB for 32bit */
-#define STACK_RND_MASK (is_compat_task() ? 0x7ff : 0x3fffff)
+#define STACK_RND_MASK (test_thread_flag(TIF_IA32) ? 0x7ff : 0x3fffff)
 
 #endif
 
_

Patches currently in -mm which might be from ak@xxxxxxx are

origin.patch
git-acpi.patch
x86_64-dont-warn-for-overflow-in-nommu-case-when-dma_mask-is-32bit-fix.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