packages: kernel/kernel-grsec_fixes.patch, kernel/kernel-grsec_full.patch -...

arekm arekm at pld-linux.org
Sun Sep 19 19:29:49 CEST 2010


Author: arekm                        Date: Sun Sep 19 17:29:49 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- grsec for 2.6.35

---- Files affected:
packages/kernel:
   kernel-grsec_fixes.patch (1.12 -> 1.13) , kernel-grsec_full.patch (1.39 -> 1.40) 

---- Diffs:

================================================================
Index: packages/kernel/kernel-grsec_fixes.patch
diff -u packages/kernel/kernel-grsec_fixes.patch:1.12 packages/kernel/kernel-grsec_fixes.patch:1.13
--- packages/kernel/kernel-grsec_fixes.patch:1.12	Tue Jul  6 15:52:46 2010
+++ packages/kernel/kernel-grsec_fixes.patch	Sun Sep 19 19:29:42 2010
@@ -150,28 +150,6 @@
  	bool "Enable /proc page monitoring" if EMBEDDED
   	help
  	  Various /proc files exist to monitor process memory utilization:
---- linux-2.6.34/drivers/gpu/drm/i915/i915_dma.c~	2010-05-16 23:17:36.000000000 +0200
-+++ linux-2.6.34/drivers/gpu/drm/i915/i915_dma.c	2010-07-06 13:27:42.295120649 +0200
-@@ -1416,7 +1416,7 @@
- 	bool can_switch;
- 
- 	spin_lock(&dev->count_lock);
--	can_switch = (dev->open_count == 0);
-+	can_switch = (atomic_read(&dev->open_count) == 0);
- 	spin_unlock(&dev->count_lock);
- 	return can_switch;
- }
---- linux-2.6.34/drivers/gpu/drm/nouveau/nouveau_state.c~	2010-05-16 23:17:36.000000000 +0200
-+++ linux-2.6.34/drivers/gpu/drm/nouveau/nouveau_state.c	2010-07-06 13:38:37.321928956 +0200
-@@ -391,7 +391,7 @@
- 	bool can_switch;
- 
- 	spin_lock(&dev->count_lock);
--	can_switch = (dev->open_count == 0);
-+	can_switch = (atomic_read(&dev->open_count) == 0);
- 	spin_unlock(&dev->count_lock);
- 	return can_switch;
- }
 --- linux-2.6.34/net/socket.c~	2010-07-06 15:35:03.398523320 +0200
 +++ linux-2.6.34/net/socket.c	2010-07-06 15:35:26.021020905 +0200
 @@ -1573,12 +1573,6 @@

================================================================
Index: packages/kernel/kernel-grsec_full.patch
diff -u packages/kernel/kernel-grsec_full.patch:1.39 packages/kernel/kernel-grsec_full.patch:1.40
--- packages/kernel/kernel-grsec_full.patch:1.39	Tue Jul  6 14:01:12 2010
+++ packages/kernel/kernel-grsec_full.patch	Sun Sep 19 19:29:42 2010
@@ -1,6 +1,6 @@
-diff -urNp linux-2.6.34/arch/alpha/include/asm/dma-mapping.h linux-2.6.34/arch/alpha/include/asm/dma-mapping.h
---- linux-2.6.34/arch/alpha/include/asm/dma-mapping.h	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/alpha/include/asm/dma-mapping.h	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/alpha/include/asm/dma-mapping.h linux-2.6.35.4/arch/alpha/include/asm/dma-mapping.h
+--- linux-2.6.35.4/arch/alpha/include/asm/dma-mapping.h	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/alpha/include/asm/dma-mapping.h	2010-09-17 20:12:09.000000000 -0400
 @@ -3,9 +3,9 @@
  
  #include <linux/dma-attrs.h>
@@ -13,9 +13,9 @@
  {
  	return dma_ops;
  }
-diff -urNp linux-2.6.34/arch/alpha/include/asm/elf.h linux-2.6.34/arch/alpha/include/asm/elf.h
---- linux-2.6.34/arch/alpha/include/asm/elf.h	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/alpha/include/asm/elf.h	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/alpha/include/asm/elf.h linux-2.6.35.4/arch/alpha/include/asm/elf.h
+--- linux-2.6.35.4/arch/alpha/include/asm/elf.h	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/alpha/include/asm/elf.h	2010-09-17 20:12:09.000000000 -0400
 @@ -90,6 +90,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
  
  #define ELF_ET_DYN_BASE		(TASK_UNMAPPED_BASE + 0x1000000)
@@ -30,9 +30,9 @@
  /* $0 is set by ld.so to a pointer to a function which might be 
     registered using atexit.  This provides a mean for the dynamic
     linker to call DT_FINI functions for shared libraries that have
-diff -urNp linux-2.6.34/arch/alpha/include/asm/pgtable.h linux-2.6.34/arch/alpha/include/asm/pgtable.h
---- linux-2.6.34/arch/alpha/include/asm/pgtable.h	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/alpha/include/asm/pgtable.h	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/alpha/include/asm/pgtable.h linux-2.6.35.4/arch/alpha/include/asm/pgtable.h
+--- linux-2.6.35.4/arch/alpha/include/asm/pgtable.h	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/alpha/include/asm/pgtable.h	2010-09-17 20:12:09.000000000 -0400
 @@ -101,6 +101,17 @@ struct vm_area_struct;
  #define PAGE_SHARED	__pgprot(_PAGE_VALID | __ACCESS_BITS)
  #define PAGE_COPY	__pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW)
@@ -51,9 +51,9 @@
  #define PAGE_KERNEL	__pgprot(_PAGE_VALID | _PAGE_ASM | _PAGE_KRE | _PAGE_KWE)
  
  #define _PAGE_NORMAL(x) __pgprot(_PAGE_VALID | __ACCESS_BITS | (x))
-diff -urNp linux-2.6.34/arch/alpha/kernel/module.c linux-2.6.34/arch/alpha/kernel/module.c
---- linux-2.6.34/arch/alpha/kernel/module.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/alpha/kernel/module.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/alpha/kernel/module.c linux-2.6.35.4/arch/alpha/kernel/module.c
+--- linux-2.6.35.4/arch/alpha/kernel/module.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/alpha/kernel/module.c	2010-09-17 20:12:09.000000000 -0400
 @@ -182,7 +182,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs, 
  
  	/* The small sections were sorted to the end of the segment.
@@ -63,9 +63,18 @@
  	got = sechdrs[me->arch.gotsecindex].sh_addr;
  
  	for (i = 0; i < n; i++) {
-diff -urNp linux-2.6.34/arch/alpha/kernel/osf_sys.c linux-2.6.34/arch/alpha/kernel/osf_sys.c
---- linux-2.6.34/arch/alpha/kernel/osf_sys.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/alpha/kernel/osf_sys.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/alpha/kernel/osf_sys.c linux-2.6.35.4/arch/alpha/kernel/osf_sys.c
+--- linux-2.6.35.4/arch/alpha/kernel/osf_sys.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/alpha/kernel/osf_sys.c	2010-09-17 20:12:09.000000000 -0400
+@@ -1170,7 +1170,7 @@ arch_get_unmapped_area_1(unsigned long a
+ 		/* At this point:  (!vma || addr < vma->vm_end). */
+ 		if (limit - len < addr)
+ 			return -ENOMEM;
+-		if (!vma || addr + len <= vma->vm_start)
++		if (check_heap_stack_gap(vma, addr, len))
+ 			return addr;
+ 		addr = vma->vm_end;
+ 		vma = vma->vm_next;
 @@ -1206,6 +1206,10 @@ arch_get_unmapped_area(struct file *filp
  	   merely specific addresses, but regions of memory -- perhaps
  	   this feature should be incorporated into all ports?  */
@@ -88,9 +97,9 @@
  	if (addr != (unsigned long) -ENOMEM)
  		return addr;
  
-diff -urNp linux-2.6.34/arch/alpha/kernel/pci_iommu.c linux-2.6.34/arch/alpha/kernel/pci_iommu.c
---- linux-2.6.34/arch/alpha/kernel/pci_iommu.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/alpha/kernel/pci_iommu.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/alpha/kernel/pci_iommu.c linux-2.6.35.4/arch/alpha/kernel/pci_iommu.c
+--- linux-2.6.35.4/arch/alpha/kernel/pci_iommu.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/alpha/kernel/pci_iommu.c	2010-09-17 20:12:09.000000000 -0400
 @@ -950,7 +950,7 @@ static int alpha_pci_set_mask(struct dev
  	return 0;
  }
@@ -107,9 +116,9 @@
 -struct dma_map_ops *dma_ops = &alpha_pci_ops;
 +const struct dma_map_ops *dma_ops = &alpha_pci_ops;
  EXPORT_SYMBOL(dma_ops);
-diff -urNp linux-2.6.34/arch/alpha/kernel/pci-noop.c linux-2.6.34/arch/alpha/kernel/pci-noop.c
---- linux-2.6.34/arch/alpha/kernel/pci-noop.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/alpha/kernel/pci-noop.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/alpha/kernel/pci-noop.c linux-2.6.35.4/arch/alpha/kernel/pci-noop.c
+--- linux-2.6.35.4/arch/alpha/kernel/pci-noop.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/alpha/kernel/pci-noop.c	2010-09-17 20:12:09.000000000 -0400
 @@ -173,7 +173,7 @@ static int alpha_noop_set_mask(struct de
  	return 0;
  }
@@ -128,9 +137,9 @@
  EXPORT_SYMBOL(dma_ops);
  
  void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
-diff -urNp linux-2.6.34/arch/alpha/mm/fault.c linux-2.6.34/arch/alpha/mm/fault.c
---- linux-2.6.34/arch/alpha/mm/fault.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/alpha/mm/fault.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/alpha/mm/fault.c linux-2.6.35.4/arch/alpha/mm/fault.c
+--- linux-2.6.35.4/arch/alpha/mm/fault.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/alpha/mm/fault.c	2010-09-17 20:12:09.000000000 -0400
 @@ -54,6 +54,124 @@ __load_new_mm_context(struct mm_struct *
  	__reload_thread(pcb);
  }
@@ -287,9 +296,9 @@
  	} else if (!cause) {
  		/* Allow reads even for write-only mappings */
  		if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
-diff -urNp linux-2.6.34/arch/arm/include/asm/elf.h linux-2.6.34/arch/arm/include/asm/elf.h
---- linux-2.6.34/arch/arm/include/asm/elf.h	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/include/asm/elf.h	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/arm/include/asm/elf.h linux-2.6.35.4/arch/arm/include/asm/elf.h
+--- linux-2.6.35.4/arch/arm/include/asm/elf.h	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/include/asm/elf.h	2010-09-17 20:12:09.000000000 -0400
 @@ -111,7 +111,14 @@ int dump_task_regs(struct task_struct *t
     the loader.  We need to make sure that it is out of the way of the program
     that it will "exec", and that there is sufficient room for the brk.  */
@@ -306,20 +315,20 @@
  
  /* When the program starts, a1 contains a pointer to a function to be 
     registered with atexit, as per the SVR4 ABI.  A value of 0 means we 
-diff -urNp linux-2.6.34/arch/arm/include/asm/kmap_types.h linux-2.6.34/arch/arm/include/asm/kmap_types.h
---- linux-2.6.34/arch/arm/include/asm/kmap_types.h	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/include/asm/kmap_types.h	2010-07-01 20:45:13.000000000 -0400
-@@ -20,6 +20,7 @@ enum km_type {
- 	KM_SOFTIRQ1,
+diff -urNp linux-2.6.35.4/arch/arm/include/asm/kmap_types.h linux-2.6.35.4/arch/arm/include/asm/kmap_types.h
+--- linux-2.6.35.4/arch/arm/include/asm/kmap_types.h	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/include/asm/kmap_types.h	2010-09-17 20:12:09.000000000 -0400
+@@ -21,6 +21,7 @@ enum km_type {
  	KM_L1_CACHE,
  	KM_L2_CACHE,
+ 	KM_KDB,
 +	KM_CLEARPAGE,
  	KM_TYPE_NR
  };
  
-diff -urNp linux-2.6.34/arch/arm/include/asm/uaccess.h linux-2.6.34/arch/arm/include/asm/uaccess.h
---- linux-2.6.34/arch/arm/include/asm/uaccess.h	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/include/asm/uaccess.h	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/arm/include/asm/uaccess.h linux-2.6.35.4/arch/arm/include/asm/uaccess.h
+--- linux-2.6.35.4/arch/arm/include/asm/uaccess.h	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/include/asm/uaccess.h	2010-09-17 20:12:09.000000000 -0400
 @@ -403,6 +403,9 @@ extern unsigned long __must_check __strn
  
  static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long n)
@@ -340,10 +349,10 @@
  	if (access_ok(VERIFY_WRITE, to, n))
  		n = __copy_to_user(to, from, n);
  	return n;
-diff -urNp linux-2.6.34/arch/arm/kernel/kgdb.c linux-2.6.34/arch/arm/kernel/kgdb.c
---- linux-2.6.34/arch/arm/kernel/kgdb.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/kernel/kgdb.c	2010-07-01 20:45:13.000000000 -0400
-@@ -203,7 +203,7 @@ void kgdb_arch_exit(void)
+diff -urNp linux-2.6.35.4/arch/arm/kernel/kgdb.c linux-2.6.35.4/arch/arm/kernel/kgdb.c
+--- linux-2.6.35.4/arch/arm/kernel/kgdb.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/kernel/kgdb.c	2010-09-17 20:12:09.000000000 -0400
+@@ -208,7 +208,7 @@ void kgdb_arch_exit(void)
   * and we handle the normal undef case within the do_undefinstr
   * handler.
   */
@@ -352,9 +361,9 @@
  #ifndef __ARMEB__
  	.gdb_bpt_instr		= {0xfe, 0xde, 0xff, 0xe7}
  #else /* ! __ARMEB__ */
-diff -urNp linux-2.6.34/arch/arm/mach-at91/pm.c linux-2.6.34/arch/arm/mach-at91/pm.c
---- linux-2.6.34/arch/arm/mach-at91/pm.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/mach-at91/pm.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/arm/mach-at91/pm.c linux-2.6.35.4/arch/arm/mach-at91/pm.c
+--- linux-2.6.35.4/arch/arm/mach-at91/pm.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/mach-at91/pm.c	2010-09-17 20:12:09.000000000 -0400
 @@ -294,7 +294,7 @@ static void at91_pm_end(void)
  }
  
@@ -364,9 +373,9 @@
  	.valid	= at91_pm_valid_state,
  	.begin	= at91_pm_begin,
  	.enter	= at91_pm_enter,
-diff -urNp linux-2.6.34/arch/arm/mach-davinci/pm.c linux-2.6.34/arch/arm/mach-davinci/pm.c
---- linux-2.6.34/arch/arm/mach-davinci/pm.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/mach-davinci/pm.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/arm/mach-davinci/pm.c linux-2.6.35.4/arch/arm/mach-davinci/pm.c
+--- linux-2.6.35.4/arch/arm/mach-davinci/pm.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/mach-davinci/pm.c	2010-09-17 20:12:09.000000000 -0400
 @@ -110,7 +110,7 @@ static int davinci_pm_enter(suspend_stat
  	return ret;
  }
@@ -376,9 +385,20 @@
  	.enter		= davinci_pm_enter,
  	.valid		= suspend_valid_only_mem,
  };
-diff -urNp linux-2.6.34/arch/arm/mach-omap1/pm.c linux-2.6.34/arch/arm/mach-omap1/pm.c
---- linux-2.6.34/arch/arm/mach-omap1/pm.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/mach-omap1/pm.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/arm/mach-msm/last_radio_log.c linux-2.6.35.4/arch/arm/mach-msm/last_radio_log.c
+--- linux-2.6.35.4/arch/arm/mach-msm/last_radio_log.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/mach-msm/last_radio_log.c	2010-09-17 20:12:09.000000000 -0400
+@@ -47,6 +47,7 @@ static ssize_t last_radio_log_read(struc
+ 	return count;
+ }
+ 
++/* cannot be const, see msm_init_last_radio_log */
+ static struct file_operations last_radio_log_fops = {
+ 	.read = last_radio_log_read
+ };
+diff -urNp linux-2.6.35.4/arch/arm/mach-omap1/pm.c linux-2.6.35.4/arch/arm/mach-omap1/pm.c
+--- linux-2.6.35.4/arch/arm/mach-omap1/pm.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/mach-omap1/pm.c	2010-09-17 20:12:09.000000000 -0400
 @@ -647,7 +647,7 @@ static struct irqaction omap_wakeup_irq 
  
  
@@ -388,10 +408,10 @@
  	.prepare	= omap_pm_prepare,
  	.enter		= omap_pm_enter,
  	.finish		= omap_pm_finish,
-diff -urNp linux-2.6.34/arch/arm/mach-omap2/pm24xx.c linux-2.6.34/arch/arm/mach-omap2/pm24xx.c
---- linux-2.6.34/arch/arm/mach-omap2/pm24xx.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/mach-omap2/pm24xx.c	2010-07-01 20:45:13.000000000 -0400
-@@ -324,7 +324,7 @@ static void omap2_pm_finish(void)
+diff -urNp linux-2.6.35.4/arch/arm/mach-omap2/pm24xx.c linux-2.6.35.4/arch/arm/mach-omap2/pm24xx.c
+--- linux-2.6.35.4/arch/arm/mach-omap2/pm24xx.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/mach-omap2/pm24xx.c	2010-09-17 20:12:09.000000000 -0400
+@@ -325,7 +325,7 @@ static void omap2_pm_finish(void)
  	enable_hlt();
  }
  
@@ -400,10 +420,10 @@
  	.prepare	= omap2_pm_prepare,
  	.enter		= omap2_pm_enter,
  	.finish		= omap2_pm_finish,
-diff -urNp linux-2.6.34/arch/arm/mach-omap2/pm34xx.c linux-2.6.34/arch/arm/mach-omap2/pm34xx.c
---- linux-2.6.34/arch/arm/mach-omap2/pm34xx.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/mach-omap2/pm34xx.c	2010-07-01 20:45:13.000000000 -0400
-@@ -651,7 +651,7 @@ static void omap3_pm_end(void)
+diff -urNp linux-2.6.35.4/arch/arm/mach-omap2/pm34xx.c linux-2.6.35.4/arch/arm/mach-omap2/pm34xx.c
+--- linux-2.6.35.4/arch/arm/mach-omap2/pm34xx.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/mach-omap2/pm34xx.c	2010-09-17 20:12:09.000000000 -0400
+@@ -669,7 +669,7 @@ static void omap3_pm_end(void)
  	return;
  }
  
@@ -412,9 +432,9 @@
  	.begin		= omap3_pm_begin,
  	.end		= omap3_pm_end,
  	.prepare	= omap3_pm_prepare,
-diff -urNp linux-2.6.34/arch/arm/mach-pnx4008/pm.c linux-2.6.34/arch/arm/mach-pnx4008/pm.c
---- linux-2.6.34/arch/arm/mach-pnx4008/pm.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/mach-pnx4008/pm.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/arm/mach-pnx4008/pm.c linux-2.6.35.4/arch/arm/mach-pnx4008/pm.c
+--- linux-2.6.35.4/arch/arm/mach-pnx4008/pm.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/mach-pnx4008/pm.c	2010-09-17 20:12:09.000000000 -0400
 @@ -119,7 +119,7 @@ static int pnx4008_pm_valid(suspend_stat
  	       (state == PM_SUSPEND_MEM);
  }
@@ -424,9 +444,9 @@
  	.enter = pnx4008_pm_enter,
  	.valid = pnx4008_pm_valid,
  };
-diff -urNp linux-2.6.34/arch/arm/mach-pxa/pm.c linux-2.6.34/arch/arm/mach-pxa/pm.c
---- linux-2.6.34/arch/arm/mach-pxa/pm.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/mach-pxa/pm.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/arm/mach-pxa/pm.c linux-2.6.35.4/arch/arm/mach-pxa/pm.c
+--- linux-2.6.35.4/arch/arm/mach-pxa/pm.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/mach-pxa/pm.c	2010-09-17 20:12:09.000000000 -0400
 @@ -96,7 +96,7 @@ void pxa_pm_finish(void)
  		pxa_cpu_pm_fns->finish();
  }
@@ -436,10 +456,10 @@
  	.valid		= pxa_pm_valid,
  	.enter		= pxa_pm_enter,
  	.prepare	= pxa_pm_prepare,
-diff -urNp linux-2.6.34/arch/arm/mach-pxa/sharpsl_pm.c linux-2.6.34/arch/arm/mach-pxa/sharpsl_pm.c
---- linux-2.6.34/arch/arm/mach-pxa/sharpsl_pm.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/mach-pxa/sharpsl_pm.c	2010-07-01 20:45:13.000000000 -0400
-@@ -892,7 +892,7 @@ static void sharpsl_apm_get_power_status
+diff -urNp linux-2.6.35.4/arch/arm/mach-pxa/sharpsl_pm.c linux-2.6.35.4/arch/arm/mach-pxa/sharpsl_pm.c
+--- linux-2.6.35.4/arch/arm/mach-pxa/sharpsl_pm.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/mach-pxa/sharpsl_pm.c	2010-09-17 20:12:09.000000000 -0400
+@@ -891,7 +891,7 @@ static void sharpsl_apm_get_power_status
  }
  
  #ifdef CONFIG_PM
@@ -448,9 +468,9 @@
  	.prepare	= pxa_pm_prepare,
  	.finish		= pxa_pm_finish,
  	.enter		= corgi_pxa_pm_enter,
-diff -urNp linux-2.6.34/arch/arm/mach-sa1100/pm.c linux-2.6.34/arch/arm/mach-sa1100/pm.c
---- linux-2.6.34/arch/arm/mach-sa1100/pm.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/mach-sa1100/pm.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/arm/mach-sa1100/pm.c linux-2.6.35.4/arch/arm/mach-sa1100/pm.c
+--- linux-2.6.35.4/arch/arm/mach-sa1100/pm.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/mach-sa1100/pm.c	2010-09-17 20:12:09.000000000 -0400
 @@ -120,7 +120,7 @@ unsigned long sleep_phys_sp(void *sp)
  	return virt_to_phys(sp);
  }
@@ -460,9 +480,9 @@
  	.enter		= sa11x0_pm_enter,
  	.valid		= suspend_valid_only_mem,
  };
-diff -urNp linux-2.6.34/arch/arm/mm/fault.c linux-2.6.34/arch/arm/mm/fault.c
---- linux-2.6.34/arch/arm/mm/fault.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/mm/fault.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/arm/mm/fault.c linux-2.6.35.4/arch/arm/mm/fault.c
+--- linux-2.6.35.4/arch/arm/mm/fault.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/mm/fault.c	2010-09-17 20:12:09.000000000 -0400
 @@ -167,6 +167,13 @@ __do_user_fault(struct task_struct *tsk,
  	}
  #endif
@@ -511,9 +531,9 @@
  /*
   * First Level Translation Fault Handler
   *
-diff -urNp linux-2.6.34/arch/arm/mm/mmap.c linux-2.6.34/arch/arm/mm/mmap.c
---- linux-2.6.34/arch/arm/mm/mmap.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/mm/mmap.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/arm/mm/mmap.c linux-2.6.35.4/arch/arm/mm/mmap.c
+--- linux-2.6.35.4/arch/arm/mm/mmap.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/mm/mmap.c	2010-09-17 20:12:09.000000000 -0400
 @@ -63,6 +63,10 @@ arch_get_unmapped_area(struct file *filp
  	if (len > TASK_SIZE)
  		return -ENOMEM;
@@ -525,7 +545,13 @@
  	if (addr) {
  		if (do_align)
  			addr = COLOUR_ALIGN(addr, pgoff);
-@@ -75,10 +79,10 @@ arch_get_unmapped_area(struct file *filp
+@@ -70,15 +74,14 @@ arch_get_unmapped_area(struct file *filp
+ 			addr = PAGE_ALIGN(addr);
+ 
+ 		vma = find_vma(mm, addr);
+-		if (TASK_SIZE - len >= addr &&
+-		    (!vma || addr + len <= vma->vm_start))
++		if (TASK_SIZE - len >= addr && check_heap_stack_gap(vma, addr, len))
  			return addr;
  	}
  	if (len > mm->cached_hole_size) {
@@ -539,7 +565,7 @@
  	}
  
  full_search:
-@@ -94,8 +98,8 @@ full_search:
+@@ -94,14 +97,14 @@ full_search:
  			 * Start a new search - just in case we missed
  			 * some holes.
  			 */
@@ -550,9 +576,16 @@
  				mm->cached_hole_size = 0;
  				goto full_search;
  			}
-diff -urNp linux-2.6.34/arch/arm/plat-samsung/pm.c linux-2.6.34/arch/arm/plat-samsung/pm.c
---- linux-2.6.34/arch/arm/plat-samsung/pm.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/arm/plat-samsung/pm.c	2010-07-01 20:45:13.000000000 -0400
+ 			return -ENOMEM;
+ 		}
+-		if (!vma || addr + len <= vma->vm_start) {
++		if (check_heap_stack_gap(vma, addr, len)) {
+ 			/*
+ 			 * Remember the place where we stopped the search:
+ 			 */
+diff -urNp linux-2.6.35.4/arch/arm/plat-samsung/pm.c linux-2.6.35.4/arch/arm/plat-samsung/pm.c
+--- linux-2.6.35.4/arch/arm/plat-samsung/pm.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/arm/plat-samsung/pm.c	2010-09-17 20:12:09.000000000 -0400
 @@ -355,7 +355,7 @@ static void s3c_pm_finish(void)
  	s3c_pm_check_cleanup();
  }
@@ -562,9 +595,9 @@
  	.enter		= s3c_pm_enter,
  	.prepare	= s3c_pm_prepare,
  	.finish		= s3c_pm_finish,
-diff -urNp linux-2.6.34/arch/avr32/include/asm/elf.h linux-2.6.34/arch/avr32/include/asm/elf.h
---- linux-2.6.34/arch/avr32/include/asm/elf.h	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/avr32/include/asm/elf.h	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/avr32/include/asm/elf.h linux-2.6.35.4/arch/avr32/include/asm/elf.h
+--- linux-2.6.35.4/arch/avr32/include/asm/elf.h	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/avr32/include/asm/elf.h	2010-09-17 20:12:09.000000000 -0400
 @@ -84,8 +84,14 @@ typedef struct user_fpu_struct elf_fpreg
     the loader.  We need to make sure that it is out of the way of the program
     that it will "exec", and that there is sufficient room for the brk.  */
@@ -581,9 +614,9 @@
  
  /* This yields a mask that user programs can use to figure out what
     instruction set this CPU supports.  This could be done in user space,
-diff -urNp linux-2.6.34/arch/avr32/include/asm/kmap_types.h linux-2.6.34/arch/avr32/include/asm/kmap_types.h
---- linux-2.6.34/arch/avr32/include/asm/kmap_types.h	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/avr32/include/asm/kmap_types.h	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/avr32/include/asm/kmap_types.h linux-2.6.35.4/arch/avr32/include/asm/kmap_types.h
+--- linux-2.6.35.4/arch/avr32/include/asm/kmap_types.h	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/avr32/include/asm/kmap_types.h	2010-09-17 20:12:09.000000000 -0400
 @@ -22,7 +22,8 @@ D(10)	KM_IRQ0,
  D(11)	KM_IRQ1,
  D(12)	KM_SOFTIRQ0,
@@ -594,9 +627,9 @@
  };
  
  #undef D
-diff -urNp linux-2.6.34/arch/avr32/mach-at32ap/pm.c linux-2.6.34/arch/avr32/mach-at32ap/pm.c
---- linux-2.6.34/arch/avr32/mach-at32ap/pm.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/avr32/mach-at32ap/pm.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/avr32/mach-at32ap/pm.c linux-2.6.35.4/arch/avr32/mach-at32ap/pm.c
+--- linux-2.6.35.4/arch/avr32/mach-at32ap/pm.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/avr32/mach-at32ap/pm.c	2010-09-17 20:12:09.000000000 -0400
 @@ -176,7 +176,7 @@ out:
  	return 0;
  }
@@ -606,9 +639,9 @@
  	.valid	= avr32_pm_valid_state,
  	.enter	= avr32_pm_enter,
  };
-diff -urNp linux-2.6.34/arch/avr32/mm/fault.c linux-2.6.34/arch/avr32/mm/fault.c
---- linux-2.6.34/arch/avr32/mm/fault.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/avr32/mm/fault.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/avr32/mm/fault.c linux-2.6.35.4/arch/avr32/mm/fault.c
+--- linux-2.6.35.4/arch/avr32/mm/fault.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/avr32/mm/fault.c	2010-09-17 20:12:09.000000000 -0400
 @@ -41,6 +41,23 @@ static inline int notify_page_fault(stru
  
  int exception_trace = 1;
@@ -650,9 +683,9 @@
  		if (exception_trace && printk_ratelimit())
  			printk("%s%s[%d]: segfault at %08lx pc %08lx "
  			       "sp %08lx ecr %lu\n",
-diff -urNp linux-2.6.34/arch/blackfin/kernel/kgdb.c linux-2.6.34/arch/blackfin/kernel/kgdb.c
---- linux-2.6.34/arch/blackfin/kernel/kgdb.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/blackfin/kernel/kgdb.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/blackfin/kernel/kgdb.c linux-2.6.35.4/arch/blackfin/kernel/kgdb.c
+--- linux-2.6.35.4/arch/blackfin/kernel/kgdb.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/blackfin/kernel/kgdb.c	2010-09-17 20:12:09.000000000 -0400
 @@ -397,7 +397,7 @@ int kgdb_arch_handle_exception(int vecto
  	return -1;		/* this means that we do not want to exit from the handler */
  }
@@ -662,10 +695,10 @@
  	.gdb_bpt_instr = {0xa1},
  #ifdef CONFIG_SMP
  	.flags = KGDB_HW_BREAKPOINT|KGDB_THR_PROC_SWAP,
-diff -urNp linux-2.6.34/arch/blackfin/mach-common/pm.c linux-2.6.34/arch/blackfin/mach-common/pm.c
---- linux-2.6.34/arch/blackfin/mach-common/pm.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/blackfin/mach-common/pm.c	2010-07-01 20:45:13.000000000 -0400
-@@ -256,7 +256,7 @@ static int bfin_pm_enter(suspend_state_t
+diff -urNp linux-2.6.35.4/arch/blackfin/mach-common/pm.c linux-2.6.35.4/arch/blackfin/mach-common/pm.c
+--- linux-2.6.35.4/arch/blackfin/mach-common/pm.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/blackfin/mach-common/pm.c	2010-09-17 20:12:09.000000000 -0400
+@@ -232,7 +232,7 @@ static int bfin_pm_enter(suspend_state_t
  	return 0;
  }
  
@@ -674,9 +707,9 @@
  	.enter = bfin_pm_enter,
  	.valid	= bfin_pm_valid,
  };
-diff -urNp linux-2.6.34/arch/blackfin/mm/maccess.c linux-2.6.34/arch/blackfin/mm/maccess.c
---- linux-2.6.34/arch/blackfin/mm/maccess.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/blackfin/mm/maccess.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/blackfin/mm/maccess.c linux-2.6.35.4/arch/blackfin/mm/maccess.c
+--- linux-2.6.35.4/arch/blackfin/mm/maccess.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/blackfin/mm/maccess.c	2010-09-17 20:12:09.000000000 -0400
 @@ -16,7 +16,7 @@ static int validate_memory_access_addres
  	return bfin_mem_access_type(addr, size);
  }
@@ -695,9 +728,9 @@
  {
  	unsigned long ldst = (unsigned long)dst;
  	int mem_type;
-diff -urNp linux-2.6.34/arch/frv/include/asm/kmap_types.h linux-2.6.34/arch/frv/include/asm/kmap_types.h
---- linux-2.6.34/arch/frv/include/asm/kmap_types.h	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/frv/include/asm/kmap_types.h	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/frv/include/asm/kmap_types.h linux-2.6.35.4/arch/frv/include/asm/kmap_types.h
+--- linux-2.6.35.4/arch/frv/include/asm/kmap_types.h	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/frv/include/asm/kmap_types.h	2010-09-17 20:12:09.000000000 -0400
 @@ -23,6 +23,7 @@ enum km_type {
  	KM_IRQ1,
  	KM_SOFTIRQ0,
@@ -706,9 +739,40 @@
  	KM_TYPE_NR
  };
  
-diff -urNp linux-2.6.34/arch/ia64/hp/common/hwsw_iommu.c linux-2.6.34/arch/ia64/hp/common/hwsw_iommu.c
---- linux-2.6.34/arch/ia64/hp/common/hwsw_iommu.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/ia64/hp/common/hwsw_iommu.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/frv/mm/elf-fdpic.c linux-2.6.35.4/arch/frv/mm/elf-fdpic.c
+--- linux-2.6.35.4/arch/frv/mm/elf-fdpic.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/frv/mm/elf-fdpic.c	2010-09-17 20:12:09.000000000 -0400
+@@ -73,8 +73,7 @@ unsigned long arch_get_unmapped_area(str
+ 	if (addr) {
+ 		addr = PAGE_ALIGN(addr);
+ 		vma = find_vma(current->mm, addr);
+-		if (TASK_SIZE - len >= addr &&
+-		    (!vma || addr + len <= vma->vm_start))
++		if (TASK_SIZE - len >= addr && check_heap_stack_gap(vma, addr, len))
+ 			goto success;
+ 	}
+ 
+@@ -89,7 +88,7 @@ unsigned long arch_get_unmapped_area(str
+ 			for (; vma; vma = vma->vm_next) {
+ 				if (addr > limit)
+ 					break;
+-				if (addr + len <= vma->vm_start)
++				if (check_heap_stack_gap(vma, addr, len))
+ 					goto success;
+ 				addr = vma->vm_end;
+ 			}
+@@ -104,7 +103,7 @@ unsigned long arch_get_unmapped_area(str
+ 		for (; vma; vma = vma->vm_next) {
+ 			if (addr > limit)
+ 				break;
+-			if (addr + len <= vma->vm_start)
++			if (check_heap_stack_gap(vma, addr, len))
+ 				goto success;
+ 			addr = vma->vm_end;
+ 		}
+diff -urNp linux-2.6.35.4/arch/ia64/hp/common/hwsw_iommu.c linux-2.6.35.4/arch/ia64/hp/common/hwsw_iommu.c
+--- linux-2.6.35.4/arch/ia64/hp/common/hwsw_iommu.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/ia64/hp/common/hwsw_iommu.c	2010-09-17 20:12:09.000000000 -0400
 @@ -17,7 +17,7 @@
  #include <linux/swiotlb.h>
  #include <asm/machvec.h>
@@ -727,9 +791,9 @@
  {
  	if (use_swiotlb(dev))
  		return &swiotlb_dma_ops;
-diff -urNp linux-2.6.34/arch/ia64/hp/common/sba_iommu.c linux-2.6.34/arch/ia64/hp/common/sba_iommu.c
---- linux-2.6.34/arch/ia64/hp/common/sba_iommu.c	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/ia64/hp/common/sba_iommu.c	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/ia64/hp/common/sba_iommu.c linux-2.6.35.4/arch/ia64/hp/common/sba_iommu.c
+--- linux-2.6.35.4/arch/ia64/hp/common/sba_iommu.c	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/ia64/hp/common/sba_iommu.c	2010-09-17 20:12:09.000000000 -0400
 @@ -2097,7 +2097,7 @@ static struct acpi_driver acpi_sba_ioc_d
  	},
  };
@@ -748,9 +812,21 @@
  	.alloc_coherent		= sba_alloc_coherent,
  	.free_coherent		= sba_free_coherent,
  	.map_page		= sba_map_page,
-diff -urNp linux-2.6.34/arch/ia64/include/asm/dma-mapping.h linux-2.6.34/arch/ia64/include/asm/dma-mapping.h
---- linux-2.6.34/arch/ia64/include/asm/dma-mapping.h	2010-05-16 17:17:36.000000000 -0400
-+++ linux-2.6.34/arch/ia64/include/asm/dma-mapping.h	2010-07-01 20:45:13.000000000 -0400
+diff -urNp linux-2.6.35.4/arch/ia64/include/asm/compat.h linux-2.6.35.4/arch/ia64/include/asm/compat.h
+--- linux-2.6.35.4/arch/ia64/include/asm/compat.h	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/ia64/include/asm/compat.h	2010-09-17 20:12:37.000000000 -0400
+@@ -199,7 +199,7 @@ ptr_to_compat(void __user *uptr)
+ }
+ 
+ static __inline__ void __user *
+-compat_alloc_user_space (long len)
++arch_compat_alloc_user_space (long len)
+ {
+ 	struct pt_regs *regs = task_pt_regs(current);
+ 	return (void __user *) (((regs->r12 & 0xffffffff) & -16) - len);
+diff -urNp linux-2.6.35.4/arch/ia64/include/asm/dma-mapping.h linux-2.6.35.4/arch/ia64/include/asm/dma-mapping.h
+--- linux-2.6.35.4/arch/ia64/include/asm/dma-mapping.h	2010-08-26 19:47:12.000000000 -0400
++++ linux-2.6.35.4/arch/ia64/include/asm/dma-mapping.h	2010-09-17 20:12:09.000000000 -0400
 @@ -12,7 +12,7 @@
  
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-grsec_fixes.patch?r1=1.12&r2=1.13&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-grsec_full.patch?r1=1.39&r2=1.40&f=u



More information about the pld-cvs-commit mailing list