Author: arekm                        Date: Wed Mar 23 16:59:29 2011 GMT
Module: packages                      Tag: GRSECURITY_RAW
---- Log message:
http://www.grsecurity.net/~spender/grsecurity-2.2.1-2.6.37.4-201103211735.patch

---- Files affected:
packages/kernel:
   kernel-grsec_full.patch (1.3.2.60 -> 1.3.2.61) 

---- Diffs:

================================================================
Index: packages/kernel/kernel-grsec_full.patch
diff -u packages/kernel/kernel-grsec_full.patch:1.3.2.60 
packages/kernel/kernel-grsec_full.patch:1.3.2.61
--- packages/kernel/kernel-grsec_full.patch:1.3.2.60    Sat Mar 19 22:28:54 2011
+++ packages/kernel/kernel-grsec_full.patch     Wed Mar 23 17:59:09 2011
@@ -3223,7 +3223,7 @@
        }
 diff -urNp linux-2.6.37.4/arch/powerpc/mm/slice.c 
linux-2.6.37.4/arch/powerpc/mm/slice.c
 --- linux-2.6.37.4/arch/powerpc/mm/slice.c     2011-01-04 19:50:19.000000000 
-0500
-+++ linux-2.6.37.4/arch/powerpc/mm/slice.c     2011-01-17 02:41:00.000000000 
-0500
++++ linux-2.6.37.4/arch/powerpc/mm/slice.c     2011-03-21 17:35:08.000000000 
-0400
 @@ -98,7 +98,7 @@ static int slice_area_is_free(struct mm_
        if ((mm->task_size - len) < addr)
                return 0;
@@ -3242,7 +3242,25 @@
                        /*
                         * Remember the place where we stopped the search:
                         */
-@@ -336,7 +336,7 @@ static unsigned long slice_find_area_top
+@@ -313,10 +313,14 @@ static unsigned long slice_find_area_top
+               }
+       }
+ 
+-      addr = mm->mmap_base;
+-      while (addr > len) {
++      if (mm->mmap_base < len)
++              addr = -ENOMEM;
++      else
++              addr = mm->mmap_base - len;
++
++      while (!IS_ERR_VALUE(addr)) {
+               /* Go down by chunk size */
+-              addr = _ALIGN_DOWN(addr - len, 1ul << pshift);
++              addr = _ALIGN_DOWN(addr, 1ul << pshift);
+ 
+               /* Check for hit with different page size */
+               mask = slice_range_to_mask(addr, len);
+@@ -336,7 +340,7 @@ static unsigned long slice_find_area_top
                 * return with success:
                 */
                vma = find_vma(mm, addr);
@@ -3251,7 +3269,16 @@
                        /* remember the address as a hint for next time */
                        if (use_cache)
                                mm->free_area_cache = addr;
-@@ -426,6 +426,11 @@ unsigned long slice_get_unmapped_area(un
+@@ -348,7 +352,7 @@ static unsigned long slice_find_area_top
+                       mm->cached_hole_size = vma->vm_start - addr;
+ 
+               /* try just below the current vma->vm_start */
+-              addr = vma->vm_start;
++              addr = skip_heap_stack_gap(vma, len);
+       }
+ 
+       /*
+@@ -426,6 +430,11 @@ unsigned long slice_get_unmapped_area(un
        if (fixed && addr > (mm->task_size - len))
                return -EINVAL;
  
@@ -3762,7 +3789,7 @@
  static int __init dma_init(void)
 diff -urNp linux-2.6.37.4/arch/sh/mm/mmap.c linux-2.6.37.4/arch/sh/mm/mmap.c
 --- linux-2.6.37.4/arch/sh/mm/mmap.c   2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.4/arch/sh/mm/mmap.c   2011-01-17 02:41:00.000000000 -0500
++++ linux-2.6.37.4/arch/sh/mm/mmap.c   2011-03-21 17:35:08.000000000 -0400
 @@ -74,8 +74,7 @@ unsigned long arch_get_unmapped_area(str
                        addr = PAGE_ALIGN(addr);
  
@@ -3801,7 +3828,21 @@
                        /* remember the address as a hint for next time */
                        return (mm->free_area_cache = addr-len);
                }
-@@ -199,7 +197,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -188,18 +186,18 @@ arch_get_unmapped_area_topdown(struct fi
+       if (unlikely(mm->mmap_base < len))
+               goto bottomup;
+ 
+-      addr = mm->mmap_base-len;
+-      if (do_colour_align)
+-              addr = COLOUR_ALIGN_DOWN(addr, pgoff);
++      addr = mm->mmap_base - len;
+ 
+       do {
++              if (do_colour_align)
++                      addr = COLOUR_ALIGN_DOWN(addr, pgoff);
+               /*
+                * Lookup failure means no vma is above this address,
+                * else if new region fits below vma->vm_start,
                 * return with success:
                 */
                vma = find_vma(mm, addr);
@@ -3810,6 +3851,19 @@
                        /* remember the address as a hint for next time */
                        return (mm->free_area_cache = addr);
                }
+@@ -209,10 +207,8 @@ arch_get_unmapped_area_topdown(struct fi
+                       mm->cached_hole_size = vma->vm_start - addr;
+ 
+               /* try just below the current vma->vm_start */
+-              addr = vma->vm_start-len;
+-              if (do_colour_align)
+-                      addr = COLOUR_ALIGN_DOWN(addr, pgoff);
+-      } while (likely(len < vma->vm_start));
++              addr = skip_heap_stack_gap(vma, len);
++      } while (!IS_ERR_VALUE(addr));
+ 
+ bottomup:
+       /*
 diff -urNp linux-2.6.37.4/arch/sparc/include/asm/atomic_64.h 
linux-2.6.37.4/arch/sparc/include/asm/atomic_64.h
 --- linux-2.6.37.4/arch/sparc/include/asm/atomic_64.h  2011-01-04 
19:50:19.000000000 -0500
 +++ linux-2.6.37.4/arch/sparc/include/asm/atomic_64.h  2011-01-17 
02:41:00.000000000 -0500
@@ -4458,7 +4512,7 @@
                if (flags & MAP_SHARED)
 diff -urNp linux-2.6.37.4/arch/sparc/kernel/sys_sparc_64.c 
linux-2.6.37.4/arch/sparc/kernel/sys_sparc_64.c
 --- linux-2.6.37.4/arch/sparc/kernel/sys_sparc_64.c    2011-01-04 
19:50:19.000000000 -0500
-+++ linux-2.6.37.4/arch/sparc/kernel/sys_sparc_64.c    2011-01-17 
02:41:00.000000000 -0500
++++ linux-2.6.37.4/arch/sparc/kernel/sys_sparc_64.c    2011-03-21 
17:35:08.000000000 -0400
 @@ -124,7 +124,7 @@ unsigned long arch_get_unmapped_area(str
                /* We do not accept a shared mapping if it would violate
                 * cache aliasing constraints.
@@ -4544,7 +4598,21 @@
                        /* remember the address as a hint for next time */
                        return (mm->free_area_cache = addr-len);
                }
-@@ -278,7 +280,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -267,18 +269,18 @@ arch_get_unmapped_area_topdown(struct fi
+       if (unlikely(mm->mmap_base < len))
+               goto bottomup;
+ 
+-      addr = mm->mmap_base-len;
+-      if (do_color_align)
+-              addr = COLOUR_ALIGN_DOWN(addr, pgoff);
++      addr = mm->mmap_base - len;
+ 
+       do {
++              if (do_color_align)
++                      addr = COLOUR_ALIGN_DOWN(addr, pgoff);
+               /*
+                * Lookup failure means no vma is above this address,
+                * else if new region fits below vma->vm_start,
                 * return with success:
                 */
                vma = find_vma(mm, addr);
@@ -4553,7 +4621,20 @@
                        /* remember the address as a hint for next time */
                        return (mm->free_area_cache = addr);
                }
-@@ -385,6 +387,12 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -288,10 +290,8 @@ arch_get_unmapped_area_topdown(struct fi
+                       mm->cached_hole_size = vma->vm_start - addr;
+ 
+               /* try just below the current vma->vm_start */
+-              addr = vma->vm_start-len;
+-              if (do_color_align)
+-                      addr = COLOUR_ALIGN_DOWN(addr, pgoff);
+-      } while (likely(len < vma->vm_start));
++              addr = skip_heap_stack_gap(vma, len);
++      } while (!IS_ERR_VALUE(addr));
+ 
+ bottomup:
+       /*
+@@ -385,6 +385,12 @@ void arch_pick_mmap_layout(struct mm_str
            gap == RLIM_INFINITY ||
            sysctl_legacy_va_layout) {
                mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
@@ -4566,7 +4647,7 @@
                mm->get_unmapped_area = arch_get_unmapped_area;
                mm->unmap_area = arch_unmap_area;
        } else {
-@@ -397,6 +405,12 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -397,6 +403,12 @@ void arch_pick_mmap_layout(struct mm_str
                        gap = (task_size / 6 * 5);
  
                mm->mmap_base = PAGE_ALIGN(task_size - gap - random_factor);
@@ -5811,7 +5892,7 @@
         * was no match.  So in such a case we (carefully) read the
 diff -urNp linux-2.6.37.4/arch/sparc/mm/hugetlbpage.c 
linux-2.6.37.4/arch/sparc/mm/hugetlbpage.c
 --- linux-2.6.37.4/arch/sparc/mm/hugetlbpage.c 2011-01-04 19:50:19.000000000 
-0500
-+++ linux-2.6.37.4/arch/sparc/mm/hugetlbpage.c 2011-01-17 02:41:00.000000000 
-0500
++++ linux-2.6.37.4/arch/sparc/mm/hugetlbpage.c 2011-03-21 17:35:08.000000000 
-0400
 @@ -68,7 +68,7 @@ full_search:
                        }
                        return -ENOMEM;
@@ -5830,7 +5911,18 @@
                        /* remember the address as a hint for next time */
                        return (mm->free_area_cache = addr-len);
                }
-@@ -125,7 +125,7 @@ hugetlb_get_unmapped_area_topdown(struct
+@@ -116,16 +116,17 @@ hugetlb_get_unmapped_area_topdown(struct
+       if (unlikely(mm->mmap_base < len))
+               goto bottomup;
+ 
+-      addr = (mm->mmap_base-len) & HPAGE_MASK;
++      addr = mm->mmap_base - len;
+ 
+       do {
++              addr &= HPAGE_MASK;
+               /*
+                * Lookup failure means no vma is above this address,
+                * else if new region fits below vma->vm_start,
                 * return with success:
                 */
                vma = find_vma(mm, addr);
@@ -5839,7 +5931,18 @@
                        /* remember the address as a hint for next time */
                        return (mm->free_area_cache = addr);
                }
-@@ -182,8 +182,7 @@ hugetlb_get_unmapped_area(struct file *f
+@@ -135,8 +136,8 @@ hugetlb_get_unmapped_area_topdown(struct
+                       mm->cached_hole_size = vma->vm_start - addr;
+ 
+               /* try just below the current vma->vm_start */
+-              addr = (vma->vm_start-len) & HPAGE_MASK;
+-      } while (likely(len < vma->vm_start));
++              addr = skip_heap_stack_gap(vma, len);
++      } while (!IS_ERR_VALUE(addr));
+ 
+ bottomup:
+       /*
+@@ -182,8 +183,7 @@ hugetlb_get_unmapped_area(struct file *f
        if (addr) {
                addr = ALIGN(addr, HPAGE_SIZE);
                vma = find_vma(mm, addr);
@@ -7463,7 +7566,7 @@
                             ".previous\n"
 diff -urNp linux-2.6.37.4/arch/x86/include/asm/desc_defs.h 
linux-2.6.37.4/arch/x86/include/asm/desc_defs.h
 --- linux-2.6.37.4/arch/x86/include/asm/desc_defs.h    2011-01-04 
19:50:19.000000000 -0500
-+++ linux-2.6.37.4/arch/x86/include/asm/desc_defs.h    2011-02-27 
14:48:10.000000000 -0500
++++ linux-2.6.37.4/arch/x86/include/asm/desc_defs.h    2011-03-21 
17:16:23.000000000 -0400
 @@ -31,6 +31,12 @@ struct desc_struct {
                        unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1;
                        unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8;
@@ -7473,13 +7576,13 @@
 +                      u16 seg;
 +                      unsigned reserved: 8, type: 4, s: 1, dpl: 2, p: 1;
 +                      unsigned offset_high: 16;
-+              };
++              } gate;
        };
  } __attribute__((packed));
  
 diff -urNp linux-2.6.37.4/arch/x86/include/asm/desc.h 
linux-2.6.37.4/arch/x86/include/asm/desc.h
 --- linux-2.6.37.4/arch/x86/include/asm/desc.h 2011-01-04 19:50:19.000000000 
-0500
-+++ linux-2.6.37.4/arch/x86/include/asm/desc.h 2011-02-27 14:48:10.000000000 
-0500
++++ linux-2.6.37.4/arch/x86/include/asm/desc.h 2011-03-21 17:16:23.000000000 
-0400
 @@ -4,6 +4,7 @@
  #include <asm/desc_defs.h>
  #include <asm/ldt.h>
@@ -7523,14 +7626,14 @@
 -      gate->a = (seg << 16) | (base & 0xffff);
 -      gate->b = (base & 0xffff0000) |
 -                (((0x80 | type | (dpl << 5)) & 0xff) << 8);
-+      gate->offset_low = base;
-+      gate->seg = seg;
-+      gate->reserved = 0;
-+      gate->type = type;
-+      gate->s = 0;
-+      gate->dpl = dpl;
-+      gate->p = 1;
-+      gate->offset_high = base >> 16;
++      gate->gate.offset_low = base;
++      gate->gate.seg = seg;
++      gate->gate.reserved = 0;
++      gate->gate.type = type;
++      gate->gate.s = 0;
++      gate->gate.dpl = dpl;
++      gate->gate.p = 1;
++      gate->gate.offset_high = base >> 16;
  }
  
  #endif
@@ -10418,7 +10521,7 @@
        jmp     bogus_magic
 diff -urNp linux-2.6.37.4/arch/x86/kernel/alternative.c 
linux-2.6.37.4/arch/x86/kernel/alternative.c
 --- linux-2.6.37.4/arch/x86/kernel/alternative.c       2011-01-04 
19:50:19.000000000 -0500
-+++ linux-2.6.37.4/arch/x86/kernel/alternative.c       2011-01-17 
02:41:01.000000000 -0500
++++ linux-2.6.37.4/arch/x86/kernel/alternative.c       2011-03-21 
17:35:08.000000000 -0400
 @@ -248,7 +248,7 @@ static void alternatives_smp_lock(const 
                if (!*poff || ptr < text || ptr >= text_end)
                        continue;
@@ -10520,7 +10623,21 @@
        return addr;
  }
  
-@@ -645,9 +635,9 @@ void *__kprobes text_poke_smp(void *addr
+@@ -612,6 +602,13 @@ static int __kprobes stop_machine_text_p
+ 
+       flush_icache_range((unsigned long)tpp->addr,
+                          (unsigned long)tpp->addr + tpp->len);
++
++      /*
++       * Intel Archiecture Software Developer's Manual section 7.1.3 specifies
++       * that a core serializing instruction such as "cpuid" should be
++       * executed on _each_ core before the new instruction is made visible.
++       */
++      sync_core();
+       return 0;
+ }
+ 
+@@ -645,9 +642,9 @@ void *__kprobes text_poke_smp(void *addr
  #if defined(CONFIG_DYNAMIC_FTRACE) || defined(HAVE_JUMP_LABEL)
  
  #ifdef CONFIG_X86_64
@@ -13861,7 +13978,7 @@
 -
 diff -urNp linux-2.6.37.4/arch/x86/kernel/ptrace.c 
linux-2.6.37.4/arch/x86/kernel/ptrace.c
 --- linux-2.6.37.4/arch/x86/kernel/ptrace.c    2011-01-04 19:50:19.000000000 
-0500
-+++ linux-2.6.37.4/arch/x86/kernel/ptrace.c    2011-01-17 02:41:01.000000000 
-0500
++++ linux-2.6.37.4/arch/x86/kernel/ptrace.c    2011-03-21 17:16:23.000000000 
-0400
 @@ -805,7 +805,7 @@ long arch_ptrace(struct task_struct *chi
                 unsigned long addr, unsigned long data)
  {
@@ -13897,6 +14014,24 @@
  }
  
  void user_single_step_siginfo(struct task_struct *tsk,
+@@ -1347,7 +1347,7 @@ void send_sigtrap(struct task_struct *ts
+  * We must return the syscall number to actually look up in the table.
+  * This can be -1L to skip running any syscall at all.
+  */
+-asmregparm long syscall_trace_enter(struct pt_regs *regs)
++long syscall_trace_enter(struct pt_regs *regs)
+ {
+       long ret = 0;
+ 
+@@ -1392,7 +1392,7 @@ asmregparm long syscall_trace_enter(stru
+       return ret ?: regs->orig_ax;
+ }
+ 
+-asmregparm void syscall_trace_leave(struct pt_regs *regs)
++void syscall_trace_leave(struct pt_regs *regs)
+ {
+       bool step;
+ 
 diff -urNp linux-2.6.37.4/arch/x86/kernel/reboot.c 
linux-2.6.37.4/arch/x86/kernel/reboot.c
 --- linux-2.6.37.4/arch/x86/kernel/reboot.c    2011-01-04 19:50:19.000000000 
-0500
 +++ linux-2.6.37.4/arch/x86/kernel/reboot.c    2011-01-17 02:41:01.000000000 
-0500
@@ -14223,7 +14358,7 @@
        .long sys_exit
 diff -urNp linux-2.6.37.4/arch/x86/kernel/sys_i386_32.c 
linux-2.6.37.4/arch/x86/kernel/sys_i386_32.c
 --- linux-2.6.37.4/arch/x86/kernel/sys_i386_32.c       2011-01-04 
19:50:19.000000000 -0500
-+++ linux-2.6.37.4/arch/x86/kernel/sys_i386_32.c       2011-01-17 
02:41:01.000000000 -0500
++++ linux-2.6.37.4/arch/x86/kernel/sys_i386_32.c       2011-03-21 
17:35:08.000000000 -0400
 @@ -24,17 +24,224 @@
  
  #include <asm/syscalls.h>
@@ -14425,8 +14560,8 @@
 +                      mm->cached_hole_size = vma->vm_start - addr;
 +
 +              /* try just below the current vma->vm_start */
-+              addr = vma->vm_start-len;
-+      } while (len < vma->vm_start);
++              addr = skip_heap_stack_gap(vma, len);
++      } while (!IS_ERR_VALUE(addr));
 +
 +bottomup:
 +      /*
@@ -14463,7 +14598,7 @@
  }
 diff -urNp linux-2.6.37.4/arch/x86/kernel/sys_x86_64.c 
linux-2.6.37.4/arch/x86/kernel/sys_x86_64.c
 --- linux-2.6.37.4/arch/x86/kernel/sys_x86_64.c        2011-01-04 
19:50:19.000000000 -0500
-+++ linux-2.6.37.4/arch/x86/kernel/sys_x86_64.c        2011-01-17 
02:41:01.000000000 -0500
++++ linux-2.6.37.4/arch/x86/kernel/sys_x86_64.c        2011-03-21 
17:35:08.000000000 -0400
 @@ -32,8 +32,8 @@ out:
        return error;
  }
@@ -14525,7 +14660,7 @@
  
        /* requested length too big for entire address space */
        if (len > TASK_SIZE)
-@@ -141,12 +144,15 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -141,13 +144,18 @@ arch_get_unmapped_area_topdown(struct fi
        if (!test_thread_flag(TIF_IA32) && (flags & MAP_32BIT))
                goto bottomup;
  
@@ -14536,14 +14671,19 @@
        /* requesting a specific address */
        if (addr) {
                addr = PAGE_ALIGN(addr);
-               vma = find_vma(mm, 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;
+-                      return addr;
++              if (TASK_SIZE - len >= addr) {
++                      vma = find_vma(mm, addr);
++                      if (check_heap_stack_gap(vma, addr, len))
++                              return addr;
++              }
        }
  
-@@ -162,7 +168,7 @@ arch_get_unmapped_area_topdown(struct fi
+       /* check if free_area_cache is useful for us */
+@@ -162,7 +170,7 @@ arch_get_unmapped_area_topdown(struct fi
        /* make sure it can fit in the remaining address space */
        if (addr > len) {
                vma = find_vma(mm, addr-len);
@@ -14552,7 +14692,7 @@
                        /* remember the address as a hint for next time */
                        return mm->free_area_cache = addr-len;
        }
-@@ -179,7 +185,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -179,7 +187,7 @@ arch_get_unmapped_area_topdown(struct fi
                 * return with success:
                 */
                vma = find_vma(mm, addr);
@@ -14561,7 +14701,18 @@
                        /* remember the address as a hint for next time */
                        return mm->free_area_cache = addr;
  
-@@ -198,13 +204,21 @@ bottomup:
+@@ -188,8 +196,8 @@ arch_get_unmapped_area_topdown(struct fi
+                       mm->cached_hole_size = vma->vm_start - addr;
+ 
+               /* try just below the current vma->vm_start */
+-              addr = vma->vm_start-len;
+-      } while (len < vma->vm_start);
++              addr = skip_heap_stack_gap(vma, len);
++      } while (!IS_ERR_VALUE(addr));
+ 
+ bottomup:
+       /*
+@@ -198,13 +206,21 @@ bottomup:
         * can happen with large stack limits and large mmap()
         * allocations.
         */
@@ -18062,7 +18213,7 @@
  }
 diff -urNp linux-2.6.37.4/arch/x86/mm/hugetlbpage.c 
linux-2.6.37.4/arch/x86/mm/hugetlbpage.c
 --- linux-2.6.37.4/arch/x86/mm/hugetlbpage.c   2011-01-04 19:50:19.000000000 
-0500
-+++ linux-2.6.37.4/arch/x86/mm/hugetlbpage.c   2011-01-17 02:41:01.000000000 
-0500
++++ linux-2.6.37.4/arch/x86/mm/hugetlbpage.c   2011-03-21 17:35:08.000000000 
-0400
 @@ -266,13 +266,20 @@ static unsigned long hugetlb_get_unmappe
        struct hstate *h = hstate_file(file);
        struct mm_struct *mm = current->mm;
@@ -18136,7 +18287,7 @@
  
        /* don't allow allocations above current base */
        if (mm->free_area_cache > base)
-@@ -321,7 +328,7 @@ static unsigned long hugetlb_get_unmappe
+@@ -321,64 +328,63 @@ static unsigned long hugetlb_get_unmappe
                largest_hole = 0;
                mm->free_area_cache  = base;
        }
@@ -18145,10 +18296,12 @@
        /* make sure it can fit in the remaining address space */
        if (mm->free_area_cache < len)
                goto fail;
-@@ -329,33 +336,27 @@ try_again:
+ 
        /* either no address requested or cant fit in requested address hole */
-       addr = (mm->free_area_cache - len) & huge_page_mask(h);
+-      addr = (mm->free_area_cache - len) & huge_page_mask(h);
++      addr = (mm->free_area_cache - len);
        do {
++              addr &= huge_page_mask(h);
 +              vma = find_vma(mm, addr);
                /*
                 * Lookup failure means no vma is above this address,
@@ -18188,8 +18341,10 @@
 +                      largest_hole = vma->vm_start - addr;
  
                /* try just below the current vma->vm_start */
-               addr = (vma->vm_start - len) & huge_page_mask(h);
-@@ -363,22 +364,26 @@ try_again:
+-              addr = (vma->vm_start - len) & huge_page_mask(h);
+-      } while (len <= vma->vm_start);
++              addr = skip_heap_stack_gap(vma, len);
++      } while (!IS_ERR_VALUE(addr));
  
  fail:
        /*
@@ -18227,7 +18382,7 @@
        mm->cached_hole_size = ~0UL;
        addr = hugetlb_get_unmapped_area_bottomup(file, addr0,
                        len, pgoff, flags);
-@@ -386,6 +391,7 @@ fail:
+@@ -386,6 +392,7 @@ fail:
        /*
         * Restore the topdown base:
         */
@@ -18235,7 +18390,7 @@
        mm->free_area_cache = base;
        mm->cached_hole_size = ~0UL;
  
-@@ -399,10 +405,19 @@ hugetlb_get_unmapped_area(struct file *f
+@@ -399,10 +406,19 @@ hugetlb_get_unmapped_area(struct file *f
        struct hstate *h = hstate_file(file);
        struct mm_struct *mm = current->mm;
        struct vm_area_struct *vma;
@@ -18256,7 +18411,7 @@
                return -ENOMEM;
  
        if (flags & MAP_FIXED) {
-@@ -414,8 +429,7 @@ hugetlb_get_unmapped_area(struct file *f
+@@ -414,8 +430,7 @@ hugetlb_get_unmapped_area(struct file *f
        if (addr) {
                addr = ALIGN(addr, huge_page_size(h));
                vma = find_vma(mm, addr);
@@ -24366,6 +24521,18 @@
  
        memcpy(log->bios_event_log, virt, len);
  
+diff -urNp linux-2.6.37.4/drivers/char/tpm/tpm.c 
linux-2.6.37.4/drivers/char/tpm/tpm.c
+--- linux-2.6.37.4/drivers/char/tpm/tpm.c      2011-02-27 14:49:17.000000000 
-0500
++++ linux-2.6.37.4/drivers/char/tpm/tpm.c      2011-03-21 17:16:23.000000000 
-0400
+@@ -413,7 +413,7 @@ static ssize_t tpm_transmit(struct tpm_c
+                   chip->vendor.req_complete_val)
+                       goto out_recv;
+ 
+-              if ((status == chip->vendor.req_canceled)) {
++              if (status == chip->vendor.req_canceled) {
+                       dev_err(chip->dev, "Operation Canceled\n");
+                       rc = -ECANCELED;
+                       goto out;
 diff -urNp linux-2.6.37.4/drivers/cpuidle/sysfs.c 
linux-2.6.37.4/drivers/cpuidle/sysfs.c
 --- linux-2.6.37.4/drivers/cpuidle/sysfs.c     2011-01-04 19:50:19.000000000 
-0500
 +++ linux-2.6.37.4/drivers/cpuidle/sysfs.c     2011-01-17 02:41:01.000000000 
-0500
@@ -25912,6 +26079,18 @@
  #  endif
  #endif
  
+diff -urNp linux-2.6.37.4/drivers/md/dm-ioctl.c 
linux-2.6.37.4/drivers/md/dm-ioctl.c
+--- linux-2.6.37.4/drivers/md/dm-ioctl.c       2011-01-04 19:50:19.000000000 
-0500
++++ linux-2.6.37.4/drivers/md/dm-ioctl.c       2011-03-21 17:16:23.000000000 
-0400
+@@ -1488,7 +1488,7 @@ static int validate_params(uint cmd, str
+           cmd == DM_LIST_VERSIONS_CMD)
+               return 0;
+ 
+-      if ((cmd == DM_DEV_CREATE_CMD)) {
++      if (cmd == DM_DEV_CREATE_CMD) {
+               if (!*param->name) {
+                       DMWARN("name not supplied when creating device");
+                       return -EINVAL;
 diff -urNp linux-2.6.37.4/drivers/md/dm-table.c 
linux-2.6.37.4/drivers/md/dm-table.c
 --- linux-2.6.37.4/drivers/md/dm-table.c       2011-01-04 19:50:19.000000000 
-0500
 +++ linux-2.6.37.4/drivers/md/dm-table.c       2011-01-17 02:41:01.000000000 
-0500
@@ -27392,6 +27571,22 @@
        .alloc_coherent = intel_alloc_coherent,
        .free_coherent = intel_free_coherent,
        .map_sg = intel_map_sg,
+diff -urNp linux-2.6.37.4/drivers/pci/pcie/aspm.c 
linux-2.6.37.4/drivers/pci/pcie/aspm.c
+--- linux-2.6.37.4/drivers/pci/pcie/aspm.c     2011-01-04 19:50:19.000000000 
-0500
++++ linux-2.6.37.4/drivers/pci/pcie/aspm.c     2011-03-21 17:16:23.000000000 
-0400
+@@ -27,9 +27,9 @@
+ #define MODULE_PARAM_PREFIX "pcie_aspm."
+ 
+ /* Note: those are not register definitions */
+-#define ASPM_STATE_L0S_UP     (1)     /* Upstream direction L0s state */
+-#define ASPM_STATE_L0S_DW     (2)     /* Downstream direction L0s state */
+-#define ASPM_STATE_L1         (4)     /* L1 state */
++#define ASPM_STATE_L0S_UP     (1U)    /* Upstream direction L0s state */
++#define ASPM_STATE_L0S_DW     (2U)    /* Downstream direction L0s state */
++#define ASPM_STATE_L1         (4U)    /* L1 state */
+ #define ASPM_STATE_L0S                (ASPM_STATE_L0S_UP | ASPM_STATE_L0S_DW)
+ #define ASPM_STATE_ALL                (ASPM_STATE_L0S | ASPM_STATE_L1)
+ 
 diff -urNp linux-2.6.37.4/drivers/pci/pcie/portdrv_pci.c 
linux-2.6.37.4/drivers/pci/pcie/portdrv_pci.c
 --- linux-2.6.37.4/drivers/pci/pcie/portdrv_pci.c      2011-01-04 
19:50:19.000000000 -0500
 +++ linux-2.6.37.4/drivers/pci/pcie/portdrv_pci.c      2011-01-17 
02:41:01.000000000 -0500
@@ -28569,6 +28764,18 @@
  };
  
  MODULE_DEVICE_TABLE(input, kbd_ids);
+diff -urNp linux-2.6.37.4/drivers/tty/vt/vt.c 
linux-2.6.37.4/drivers/tty/vt/vt.c
+--- linux-2.6.37.4/drivers/tty/vt/vt.c 2011-02-27 14:49:17.000000000 -0500
++++ linux-2.6.37.4/drivers/tty/vt/vt.c 2011-03-21 17:16:23.000000000 -0400
+@@ -254,7 +254,7 @@ EXPORT_SYMBOL_GPL(unregister_vt_notifier
+ 
+ static void notify_write(struct vc_data *vc, unsigned int unicode)
+ {
+-      struct vt_notifier_param param = { .vc = vc, unicode = unicode };
++      struct vt_notifier_param param = { .vc = vc, .c = unicode };
+       atomic_notifier_call_chain(&vt_notifier_list, VT_WRITE, &param);
+ }
+ 
 diff -urNp linux-2.6.37.4/drivers/tty/vt/vt_ioctl.c 
linux-2.6.37.4/drivers/tty/vt/vt_ioctl.c
 --- linux-2.6.37.4/drivers/tty/vt/vt_ioctl.c   2011-01-04 19:50:19.000000000 
-0500
 +++ linux-2.6.37.4/drivers/tty/vt/vt_ioctl.c   2011-01-17 02:41:01.000000000 
-0500
@@ -43913,8 +44120,8 @@
 +}
 diff -urNp linux-2.6.37.4/grsecurity/Kconfig linux-2.6.37.4/grsecurity/Kconfig
 --- linux-2.6.37.4/grsecurity/Kconfig  1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.4/grsecurity/Kconfig  2011-03-11 19:17:02.000000000 -0500
-@@ -0,0 +1,1017 @@
++++ linux-2.6.37.4/grsecurity/Kconfig  2011-03-21 17:10:07.000000000 -0400
+@@ -0,0 +1,1021 @@
 +#
 +# grecurity configuration
 +#
@@ -44251,6 +44458,10 @@
 +menu "Role Based Access Control Options"
 +depends on GRKERNSEC
 +
++config GRKERNSEC_RBAC_DEBUG
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-grsec_full.patch?r1=1.3.2.60&r2=1.3.2.61&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to