rpms/kernel/devel kernel.spec, 1.2037.2.1, 1.2037.2.2 linux-2.6-execshield.patch, 1.117, 1.117.8.1
Chuck Ebbert
cebbert at fedoraproject.org
Mon Jun 28 07:12:43 UTC 2010
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv5805
Modified Files:
Tag: private-f14-2_6_34
kernel.spec linux-2.6-execshield.patch
Log Message:
Copy fix for BZ#220892 from F-13.
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.2037.2.1
retrieving revision 1.2037.2.2
diff -u -p -r1.2037.2.1 -r1.2037.2.2
--- kernel.spec 25 Jun 2010 08:33:55 -0000 1.2037.2.1
+++ kernel.spec 28 Jun 2010 07:12:42 -0000 1.2037.2.2
@@ -1993,6 +1993,9 @@ fi
# || ||
%changelog
+* Mon Jun 28 2010 Chuck Ebbert <cebbert at redhat.com>
+- Copy fix for BZ#220892 from F-13.
+
* Fri Jun 25 2010 Kyle McMartin <kyle at redhat.com>
- drm-i915-fix-edp-panels.patch: copy from rawhide.
linux-2.6-execshield.patch:
arch/x86/include/asm/desc.h | 25 ++++++
arch/x86/include/asm/mmu.h | 7 +
arch/x86/include/asm/paravirt.h | 6 +
arch/x86/include/asm/paravirt_types.h | 3
arch/x86/include/asm/processor.h | 3
arch/x86/kernel/cpu/common.c | 14 +++
arch/x86/kernel/paravirt.c | 3
arch/x86/kernel/process_32.c | 48 ++++++++++++
arch/x86/kernel/traps.c | 129 +++++++++++++++++++++++++++++++--
arch/x86/mm/mmap.c | 5 +
arch/x86/mm/setup_nx.c | 6 +
arch/x86/mm/tlb.c | 7 +
arch/x86/vdso/vdso32-setup.c | 2
arch/x86/xen/enlighten.c | 21 +++++
fs/binfmt_elf.c | 21 ++++-
include/linux/mm.h | 8 +-
include/linux/mm_types.h | 3
include/linux/resource.h | 5 +
include/linux/sched.h | 7 +
kernel/sysctl.c | 28 +++++++
mm/mmap.c | 130 +++++++++++++++++++++++++++++++---
mm/mprotect.c | 10 ++
mm/mremap.c | 5 -
23 files changed, 468 insertions(+), 28 deletions(-)
Index: linux-2.6-execshield.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-execshield.patch,v
retrieving revision 1.117
retrieving revision 1.117.8.1
diff -u -p -r1.117 -r1.117.8.1
--- linux-2.6-execshield.patch 30 Mar 2010 04:24:01 -0000 1.117
+++ linux-2.6-execshield.patch 28 Jun 2010 07:12:42 -0000 1.117.8.1
@@ -3,31 +3,7 @@ From: Kyle McMartin <kyle at phobos.i.jkkm.
Date: Mon, 29 Mar 2010 23:20:18 -0400
Subject: execshield
----
- arch/x86/include/asm/desc.h | 25 +++++++
- arch/x86/include/asm/mmu.h | 7 ++
- arch/x86/include/asm/paravirt.h | 6 ++
- arch/x86/include/asm/paravirt_types.h | 3 +
- arch/x86/include/asm/processor.h | 3 +
- arch/x86/kernel/cpu/common.c | 14 ++++
- arch/x86/kernel/paravirt.c | 3 +
- arch/x86/kernel/process_32.c | 48 ++++++++++++
- arch/x86/kernel/traps.c | 129 ++++++++++++++++++++++++++++++---
- arch/x86/mm/mmap.c | 5 +-
- arch/x86/mm/setup_nx.c | 6 ++
- arch/x86/mm/tlb.c | 7 ++
- arch/x86/vdso/vdso32-setup.c | 2 +-
- arch/x86/xen/enlighten.c | 21 ++++++
- fs/binfmt_elf.c | 21 +++++-
- include/linux/mm.h | 8 ++-
- include/linux/mm_types.h | 3 +
- include/linux/resource.h | 5 +-
- include/linux/sched.h | 7 ++
- kernel/sysctl.c | 28 +++++++
- mm/mmap.c | 123 +++++++++++++++++++++++++++++--
- mm/mprotect.c | 10 +++-
- mm/mremap.c | 4 +-
- 23 files changed, 461 insertions(+), 27 deletions(-)
+cebbert at redhat.com: added fix for bz#220892
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h
index 617bd56..526248d 100644
@@ -821,12 +797,18 @@ index 75557c6..8173284 100644
if (file && file->f_op && file->f_op->get_unmapped_area)
get_area = file->f_op->get_unmapped_area;
addr = get_area(file, addr, len, pgoff, flags);
-@@ -1532,8 +1556,76 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
+@@ -1532,8 +1556,83 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
return arch_rebalance_pgtables(addr, len);
}
+EXPORT_SYMBOL(get_unmapped_area_prot);
+
++static bool should_randomize(void)
++{
++ return (current->flags & PF_RANDOMIZE) &&
++ !(current->personality & ADDR_NO_RANDOMIZE);
++}
++
+#define SHLIB_BASE 0x00110000
+
+unsigned long
@@ -845,7 +827,8 @@ index 75557c6..8173284 100644
+ return addr;
+
+ if (!addr)
-+ addr = randomize_range(SHLIB_BASE, 0x01000000, len);
++ addr = !should_randomize() ? SHLIB_BASE :
++ randomize_range(SHLIB_BASE, 0x01000000, len);
+
+ if (addr) {
+ addr = PAGE_ALIGN(addr);
@@ -873,7 +856,7 @@ index 75557c6..8173284 100644
+ * Up until the brk area we randomize addresses
+ * as much as possible:
+ */
-+ if (addr >= 0x01000000) {
++ if (addr >= 0x01000000 && should_randomize()) {
+ tmp = randomize_range(0x01000000,
+ PAGE_ALIGN(max(mm->start_brk,
+ (unsigned long)0x08000000)), len);
@@ -899,7 +882,7 @@ index 75557c6..8173284 100644
/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */
struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
-@@ -1608,6 +1700,16 @@ out:
+@@ -1608,6 +1707,16 @@ out:
return prev ? prev->vm_next : vma;
}
@@ -916,7 +899,7 @@ index 75557c6..8173284 100644
/*
* Verify that the stack growth is acceptable and
* update accounting. This is shared with both the
-@@ -1624,7 +1726,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
+@@ -1624,7 +1733,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
return -ENOMEM;
/* Stack limit test */
@@ -925,7 +908,7 @@ index 75557c6..8173284 100644
return -ENOMEM;
/* mlock limit tests */
-@@ -1936,10 +2038,14 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
+@@ -1936,10 +2045,14 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
if (new->vm_ops && new->vm_ops->open)
new->vm_ops->open(new);
@@ -942,7 +925,7 @@ index 75557c6..8173284 100644
err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
/* Success. */
-@@ -2223,6 +2329,7 @@ void exit_mmap(struct mm_struct *mm)
+@@ -2223,6 +2336,7 @@ void exit_mmap(struct mm_struct *mm)
free_pgtables(tlb, vma, FIRST_USER_ADDRESS, 0);
tlb_finish_mmu(tlb, 0, end);
More information about the scm-commits
mailing list