diff options
author | Dave Jones <davej@redhat.com> | 2012-06-04 12:32:49 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2012-06-04 12:32:49 -0400 |
commit | 48d35dba7a308ba6c6d97d99f7a3bd62b2d8cead (patch) | |
tree | bff2b4fd9ca40f2ec2dbe0530431ff02d288bf6e /shlib_base_randomize.patch | |
parent | 035f913c7c92d6916cf6cb9eaee39910cbbdfbb2 (diff) | |
download | kernel-48d35dba7a308ba6c6d97d99f7a3bd62b2d8cead.tar.gz kernel-48d35dba7a308ba6c6d97d99f7a3bd62b2d8cead.tar.xz kernel-48d35dba7a308ba6c6d97d99f7a3bd62b2d8cead.zip |
Remove 32bit NX emulation. It's time has passed. (and it seems to be broken anyway)
Diffstat (limited to 'shlib_base_randomize.patch')
-rw-r--r-- | shlib_base_randomize.patch | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/shlib_base_randomize.patch b/shlib_base_randomize.patch deleted file mode 100644 index 80e4d644b..000000000 --- a/shlib_base_randomize.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -uNrp kernel-3.2.fc16.orig/arch/x86/mm/mmap.c kernel-3.2.fc16.new/arch/x86/mm/mmap.c ---- kernel-3.2.fc16.orig/arch/x86/mm/mmap.c 2012-03-19 16:47:03.495169091 -0400 -+++ kernel-3.2.fc16.new/arch/x86/mm/mmap.c 2012-03-19 16:50:03.574168052 -0400 -@@ -106,6 +106,10 @@ static unsigned long mmap_legacy_base(vo - return TASK_UNMAPPED_BASE + mmap_rnd(); - } - -+#ifdef CONFIG_X86_32 -+ #define SHLIB_BASE 0x00111000 -+#endif -+ - /* - * This function, called very early during the creation of a new - * process VM image, sets up which VM layout function to use: -@@ -126,8 +126,10 @@ void arch_pick_mmap_layout(struct mm_str - #ifdef CONFIG_X86_32 - if (!(current->personality & READ_IMPLIES_EXEC) - && !(__supported_pte_mask & _PAGE_NX) -- && mmap_is_ia32()) -+ && mmap_is_ia32()) { -+ mm->shlib_base = SHLIB_BASE + mmap_rnd(); - mm->get_unmapped_exec_area = arch_get_unmapped_exec_area; -+ } - #endif - mm->unmap_area = arch_unmap_area_topdown; - } -diff -uNrp kernel-3.2.fc16.orig/include/linux/mm_types.h kernel-3.2.fc16.new/include/linux/mm_types.h ---- kernel-3.2.fc16.orig/include/linux/mm_types.h 2012-03-19 16:46:47.382169153 -0400 -+++ kernel-3.2.fc16.new/include/linux/mm_types.h 2012-03-19 16:50:40.738168219 -0400 -@@ -300,6 +300,7 @@ struct mm_struct { - void (*unmap_area) (struct mm_struct *mm, unsigned long addr); - #endif - unsigned long mmap_base; /* base of mmap area */ -+ unsigned long shlib_base; /* base of lib map area (ASCII armour)*/ - unsigned long task_size; /* size of task vm space */ - unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ - unsigned long free_area_cache; /* first hole of size cached_hole_size or larger */ -diff -uNrp kernel-3.2.fc16.orig/mm/mmap.c kernel-3.2.fc16.new/mm/mmap.c ---- kernel-3.2.fc16.orig/mm/mmap.c 2012-03-19 16:46:15.791169274 -0400 -+++ kernel-3.2.fc16.new/mm/mmap.c 2012-03-19 16:51:37.351166875 -0400 -@@ -1594,8 +1594,6 @@ static bool should_randomize(void) - !(current->personality & ADDR_NO_RANDOMIZE); - } - --#define SHLIB_BASE 0x00110000 -- - unsigned long - arch_get_unmapped_exec_area(struct file *filp, unsigned long addr0, - unsigned long len0, unsigned long pgoff, unsigned long flags) -@@ -1612,8 +1610,8 @@ arch_get_unmapped_exec_area(struct file - return addr; - - if (!addr) -- addr = !should_randomize() ? SHLIB_BASE : -- randomize_range(SHLIB_BASE, 0x01000000, len); -+ addr = !should_randomize() ? mm->shlib_base : -+ randomize_range(mm->shlib_base, 0x01000000, len); - - if (addr) { - addr = PAGE_ALIGN(addr); -@@ -1623,7 +1621,7 @@ arch_get_unmapped_exec_area(struct file - return addr; - } - -- addr = SHLIB_BASE; -+ addr = mm->shlib_base; - for (vma = find_vma(mm, addr); ; vma = vma->vm_next) { - /* At this point: (!vma || addr < vma->vm_end). */ - if (TASK_SIZE - len < addr) |