Author: hawk                         Date: Fri Aug 29 12:00:18 2008 GMT
Module: SOURCES                       Tag: Titanium
---- Log message:
- 
http://www.grsecurity.net/~spender/grsecurity-2.1.12-2.6.26.3-200808262105.patch
  with localversion killed

---- Files affected:
SOURCES:
   linux-2.6-grsecurity.patch (1.1.2.20 -> 1.1.2.21) 

---- Diffs:

================================================================
Index: SOURCES/linux-2.6-grsecurity.patch
diff -u SOURCES/linux-2.6-grsecurity.patch:1.1.2.20 
SOURCES/linux-2.6-grsecurity.patch:1.1.2.21
--- SOURCES/linux-2.6-grsecurity.patch:1.1.2.20 Sat Jul 26 15:39:27 2008
+++ SOURCES/linux-2.6-grsecurity.patch  Fri Aug 29 14:00:11 2008
@@ -1,7 +1,7 @@
-diff -urNp linux-2.6.25.10/arch/alpha/kernel/module.c 
linux-2.6.25.10/arch/alpha/kernel/module.c
---- linux-2.6.25.10/arch/alpha/kernel/module.c 2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/alpha/kernel/module.c 2008-07-03 16:53:24.000000000 
-0400
-@@ -176,7 +176,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs, 
+diff -urNp linux-2.6.26.3/arch/alpha/kernel/module.c 
linux-2.6.26.3/arch/alpha/kernel/module.c
+--- linux-2.6.26.3/arch/alpha/kernel/module.c  2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/alpha/kernel/module.c  2008-08-09 12:03:28.000000000 
-0400
+@@ -182,7 +182,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs, 
  
        /* The small sections were sorted to the end of the segment.
           The following should definitely cover them.  */
@@ -10,10 +10,10 @@
        got = sechdrs[me->arch.gotsecindex].sh_addr;
  
        for (i = 0; i < n; i++) {
-diff -urNp linux-2.6.25.10/arch/alpha/kernel/osf_sys.c 
linux-2.6.25.10/arch/alpha/kernel/osf_sys.c
---- linux-2.6.25.10/arch/alpha/kernel/osf_sys.c        2008-07-02 
23:46:47.000000000 -0400
-+++ linux-2.6.25.10/arch/alpha/kernel/osf_sys.c        2008-07-03 
16:53:24.000000000 -0400
-@@ -1288,6 +1288,10 @@ arch_get_unmapped_area(struct file *filp
+diff -urNp linux-2.6.26.3/arch/alpha/kernel/osf_sys.c 
linux-2.6.26.3/arch/alpha/kernel/osf_sys.c
+--- linux-2.6.26.3/arch/alpha/kernel/osf_sys.c 2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/alpha/kernel/osf_sys.c 2008-08-09 12:03:28.000000000 
-0400
+@@ -1227,6 +1227,10 @@ arch_get_unmapped_area(struct file *filp
           merely specific addresses, but regions of memory -- perhaps
           this feature should be incorporated into all ports?  */
  
@@ -24,7 +24,7 @@
        if (addr) {
                addr = arch_get_unmapped_area_1 (PAGE_ALIGN(addr), len, limit);
                if (addr != (unsigned long) -ENOMEM)
-@@ -1295,8 +1299,8 @@ arch_get_unmapped_area(struct file *filp
+@@ -1234,8 +1238,8 @@ arch_get_unmapped_area(struct file *filp
        }
  
        /* Next, try allocating at TASK_UNMAPPED_BASE.  */
@@ -35,9 +35,9 @@
        if (addr != (unsigned long) -ENOMEM)
                return addr;
  
-diff -urNp linux-2.6.25.10/arch/alpha/kernel/ptrace.c 
linux-2.6.25.10/arch/alpha/kernel/ptrace.c
---- linux-2.6.25.10/arch/alpha/kernel/ptrace.c 2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/alpha/kernel/ptrace.c 2008-07-03 16:53:24.000000000 
-0400
+diff -urNp linux-2.6.26.3/arch/alpha/kernel/ptrace.c 
linux-2.6.26.3/arch/alpha/kernel/ptrace.c
+--- linux-2.6.26.3/arch/alpha/kernel/ptrace.c  2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/alpha/kernel/ptrace.c  2008-08-09 12:03:28.000000000 
-0400
 @@ -15,6 +15,7 @@
  #include <linux/slab.h>
  #include <linux/security.h>
@@ -56,18 +56,10 @@
        switch (request) {
        /* When I and D space are separate, these will need to be fixed.  */
        case PTRACE_PEEKTEXT: /* read word at location addr. */
-diff -urNp linux-2.6.25.10/arch/alpha/mm/fault.c 
linux-2.6.25.10/arch/alpha/mm/fault.c
---- linux-2.6.25.10/arch/alpha/mm/fault.c      2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/alpha/mm/fault.c      2008-07-03 16:53:24.000000000 
-0400
-@@ -23,6 +23,7 @@
- #include <linux/smp.h>
- #include <linux/interrupt.h>
- #include <linux/module.h>
-+#include <linux/binfmts.h>
- 
- #include <asm/system.h>
- #include <asm/uaccess.h>
-@@ -54,6 +55,124 @@ __load_new_mm_context(struct mm_struct *
+diff -urNp linux-2.6.26.3/arch/alpha/mm/fault.c 
linux-2.6.26.3/arch/alpha/mm/fault.c
+--- linux-2.6.26.3/arch/alpha/mm/fault.c       2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/alpha/mm/fault.c       2008-08-09 13:07:51.000000000 
-0400
+@@ -54,6 +54,124 @@ __load_new_mm_context(struct mm_struct *
        __reload_thread(pcb);
  }
  
@@ -192,7 +184,7 @@
  
  /*
   * This routine handles page faults.  It determines the address,
-@@ -131,8 +250,29 @@ do_page_fault(unsigned long address, uns
+@@ -131,8 +249,29 @@ do_page_fault(unsigned long address, uns
   good_area:
        si_code = SEGV_ACCERR;
        if (cause < 0) {
@@ -223,9 +215,9 @@
        } else if (!cause) {
                /* Allow reads even for write-only mappings */
                if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
-diff -urNp linux-2.6.25.10/arch/arm/mm/mmap.c 
linux-2.6.25.10/arch/arm/mm/mmap.c
---- linux-2.6.25.10/arch/arm/mm/mmap.c 2008-07-02 23:46:47.000000000 -0400
-+++ linux-2.6.25.10/arch/arm/mm/mmap.c 2008-07-03 16:53:24.000000000 -0400
+diff -urNp linux-2.6.26.3/arch/arm/mm/mmap.c linux-2.6.26.3/arch/arm/mm/mmap.c
+--- linux-2.6.26.3/arch/arm/mm/mmap.c  2008-08-06 12:19:01.000000000 -0400
++++ linux-2.6.26.3/arch/arm/mm/mmap.c  2008-08-09 12:03:28.000000000 -0400
 @@ -60,6 +60,10 @@ arch_get_unmapped_area(struct file *filp
        if (len > TASK_SIZE)
                return -ENOMEM;
@@ -262,9 +254,9 @@
                                mm->cached_hole_size = 0;
                                goto full_search;
                        }
-diff -urNp linux-2.6.25.10/arch/avr32/mm/fault.c 
linux-2.6.25.10/arch/avr32/mm/fault.c
---- linux-2.6.25.10/arch/avr32/mm/fault.c      2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/avr32/mm/fault.c      2008-07-03 16:53:24.000000000 
-0400
+diff -urNp linux-2.6.26.3/arch/avr32/mm/fault.c 
linux-2.6.26.3/arch/avr32/mm/fault.c
+--- linux-2.6.26.3/arch/avr32/mm/fault.c       2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/avr32/mm/fault.c       2008-08-09 12:03:28.000000000 
-0400
 @@ -41,6 +41,23 @@ static inline int notify_page_fault(stru
  
  int exception_trace = 1;
@@ -306,9 +298,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.25.10/arch/ia64/ia32/binfmt_elf32.c 
linux-2.6.25.10/arch/ia64/ia32/binfmt_elf32.c
---- linux-2.6.25.10/arch/ia64/ia32/binfmt_elf32.c      2008-07-02 
23:46:47.000000000 -0400
-+++ linux-2.6.25.10/arch/ia64/ia32/binfmt_elf32.c      2008-07-03 
16:53:24.000000000 -0400
+diff -urNp linux-2.6.26.3/arch/ia64/ia32/binfmt_elf32.c 
linux-2.6.26.3/arch/ia64/ia32/binfmt_elf32.c
+--- linux-2.6.26.3/arch/ia64/ia32/binfmt_elf32.c       2008-08-06 
12:19:01.000000000 -0400
++++ linux-2.6.26.3/arch/ia64/ia32/binfmt_elf32.c       2008-08-09 
12:03:28.000000000 -0400
 @@ -45,6 +45,13 @@ randomize_stack_top(unsigned long stack_
  
  #define elf_read_implies_exec(ex, have_pt_gnu_stack)  (!(have_pt_gnu_stack))
@@ -323,9 +315,9 @@
  /* Ugly but avoids duplication */
  #include "../../../fs/binfmt_elf.c"
  
-diff -urNp linux-2.6.25.10/arch/ia64/ia32/ia32priv.h 
linux-2.6.25.10/arch/ia64/ia32/ia32priv.h
---- linux-2.6.25.10/arch/ia64/ia32/ia32priv.h  2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/ia64/ia32/ia32priv.h  2008-07-03 16:53:24.000000000 
-0400
+diff -urNp linux-2.6.26.3/arch/ia64/ia32/ia32priv.h 
linux-2.6.26.3/arch/ia64/ia32/ia32priv.h
+--- linux-2.6.26.3/arch/ia64/ia32/ia32priv.h   2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/ia64/ia32/ia32priv.h   2008-08-09 12:03:28.000000000 
-0400
 @@ -303,7 +303,14 @@ struct old_linux32_dirent {
  #define ELF_DATA      ELFDATA2LSB
  #define ELF_ARCH      EM_386
@@ -342,9 +334,9 @@
  #define IA32_GATE_OFFSET      IA32_PAGE_OFFSET
  #define IA32_GATE_END         IA32_PAGE_OFFSET + PAGE_SIZE
  
-diff -urNp linux-2.6.25.10/arch/ia64/kernel/module.c 
linux-2.6.25.10/arch/ia64/kernel/module.c
---- linux-2.6.25.10/arch/ia64/kernel/module.c  2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/ia64/kernel/module.c  2008-07-03 16:53:24.000000000 
-0400
+diff -urNp linux-2.6.26.3/arch/ia64/kernel/module.c 
linux-2.6.26.3/arch/ia64/kernel/module.c
+--- linux-2.6.26.3/arch/ia64/kernel/module.c   2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/ia64/kernel/module.c   2008-08-09 12:03:28.000000000 
-0400
 @@ -321,7 +321,7 @@ module_alloc (unsigned long size)
  void
  module_free (struct module *mod, void *module_region)
@@ -432,9 +424,9 @@
                mod->arch.gp = gp;
                DEBUGP("%s: placing gp at 0x%lx\n", __func__, gp);
        }
-diff -urNp linux-2.6.25.10/arch/ia64/kernel/sys_ia64.c 
linux-2.6.25.10/arch/ia64/kernel/sys_ia64.c
---- linux-2.6.25.10/arch/ia64/kernel/sys_ia64.c        2008-07-02 
23:46:47.000000000 -0400
-+++ linux-2.6.25.10/arch/ia64/kernel/sys_ia64.c        2008-07-03 
16:53:24.000000000 -0400
+diff -urNp linux-2.6.26.3/arch/ia64/kernel/sys_ia64.c 
linux-2.6.26.3/arch/ia64/kernel/sys_ia64.c
+--- linux-2.6.26.3/arch/ia64/kernel/sys_ia64.c 2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/ia64/kernel/sys_ia64.c 2008-08-09 12:03:28.000000000 
-0400
 @@ -43,6 +43,13 @@ arch_get_unmapped_area (struct file *fil
        if (REGION_NUMBER(addr) == RGN_HPAGE)
                addr = 0;
@@ -461,18 +453,10 @@
                                goto full_search;
                        }
                        return -ENOMEM;
-diff -urNp linux-2.6.25.10/arch/ia64/mm/fault.c 
linux-2.6.25.10/arch/ia64/mm/fault.c
---- linux-2.6.25.10/arch/ia64/mm/fault.c       2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/ia64/mm/fault.c       2008-07-03 16:53:24.000000000 
-0400
-@@ -10,6 +10,7 @@
- #include <linux/interrupt.h>
- #include <linux/kprobes.h>
- #include <linux/kdebug.h>
-+#include <linux/binfmts.h>
- 
- #include <asm/pgtable.h>
- #include <asm/processor.h>
-@@ -72,6 +73,23 @@ mapped_kernel_page_is_present (unsigned 
+diff -urNp linux-2.6.26.3/arch/ia64/mm/fault.c 
linux-2.6.26.3/arch/ia64/mm/fault.c
+--- linux-2.6.26.3/arch/ia64/mm/fault.c        2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/ia64/mm/fault.c        2008-08-09 13:07:51.000000000 
-0400
+@@ -72,6 +72,23 @@ mapped_kernel_page_is_present (unsigned 
        return pte_present(pte);
  }
  
@@ -496,7 +480,7 @@
  void __kprobes
  ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs 
*regs)
  {
-@@ -145,9 +163,23 @@ ia64_do_page_fault (unsigned long addres
+@@ -145,9 +162,23 @@ ia64_do_page_fault (unsigned long addres
        mask = (  (((isr >> IA64_ISR_X_BIT) & 1UL) << VM_EXEC_BIT)
                | (((isr >> IA64_ISR_W_BIT) & 1UL) << VM_WRITE_BIT));
  
@@ -521,10 +505,10 @@
    survive:
        /*
         * If for any reason at all we couldn't handle the fault, make
-diff -urNp linux-2.6.25.10/arch/ia64/mm/init.c 
linux-2.6.25.10/arch/ia64/mm/init.c
---- linux-2.6.25.10/arch/ia64/mm/init.c        2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/ia64/mm/init.c        2008-07-03 16:53:24.000000000 
-0400
-@@ -128,6 +128,19 @@ ia64_init_addr_space (void)
+diff -urNp linux-2.6.26.3/arch/ia64/mm/init.c 
linux-2.6.26.3/arch/ia64/mm/init.c
+--- linux-2.6.26.3/arch/ia64/mm/init.c 2008-08-06 12:19:01.000000000 -0400
++++ linux-2.6.26.3/arch/ia64/mm/init.c 2008-08-09 12:03:28.000000000 -0400
+@@ -122,6 +122,19 @@ ia64_init_addr_space (void)
                vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
                vma->vm_end = vma->vm_start + PAGE_SIZE;
                vma->vm_flags = VM_DATA_DEFAULT_FLAGS|VM_GROWSUP|VM_ACCOUNT;
@@ -544,9 +528,9 @@
                vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
                down_write(&current->mm->mmap_sem);
                if (insert_vm_struct(current->mm, vma)) {
-diff -urNp linux-2.6.25.10/arch/mips/kernel/binfmt_elfn32.c 
linux-2.6.25.10/arch/mips/kernel/binfmt_elfn32.c
---- linux-2.6.25.10/arch/mips/kernel/binfmt_elfn32.c   2008-07-02 
23:46:47.000000000 -0400
-+++ linux-2.6.25.10/arch/mips/kernel/binfmt_elfn32.c   2008-07-03 
16:53:24.000000000 -0400
+diff -urNp linux-2.6.26.3/arch/mips/kernel/binfmt_elfn32.c 
linux-2.6.26.3/arch/mips/kernel/binfmt_elfn32.c
+--- linux-2.6.26.3/arch/mips/kernel/binfmt_elfn32.c    2008-08-06 
12:19:01.000000000 -0400
++++ linux-2.6.26.3/arch/mips/kernel/binfmt_elfn32.c    2008-08-09 
12:03:28.000000000 -0400
 @@ -50,6 +50,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
  #undef ELF_ET_DYN_BASE
  #define ELF_ET_DYN_BASE         (TASK32_SIZE / 3 * 2)
@@ -561,9 +545,9 @@
  #include <asm/processor.h>
  #include <linux/module.h>
  #include <linux/elfcore.h>
-diff -urNp linux-2.6.25.10/arch/mips/kernel/binfmt_elfo32.c 
linux-2.6.25.10/arch/mips/kernel/binfmt_elfo32.c
---- linux-2.6.25.10/arch/mips/kernel/binfmt_elfo32.c   2008-07-02 
23:46:47.000000000 -0400
-+++ linux-2.6.25.10/arch/mips/kernel/binfmt_elfo32.c   2008-07-03 
16:53:24.000000000 -0400
+diff -urNp linux-2.6.26.3/arch/mips/kernel/binfmt_elfo32.c 
linux-2.6.26.3/arch/mips/kernel/binfmt_elfo32.c
+--- linux-2.6.26.3/arch/mips/kernel/binfmt_elfo32.c    2008-08-06 
12:19:01.000000000 -0400
++++ linux-2.6.26.3/arch/mips/kernel/binfmt_elfo32.c    2008-08-09 
12:03:28.000000000 -0400
 @@ -52,6 +52,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
  #undef ELF_ET_DYN_BASE
  #define ELF_ET_DYN_BASE         (TASK32_SIZE / 3 * 2)
@@ -578,9 +562,9 @@
  #include <asm/processor.h>
  #include <linux/module.h>
  #include <linux/elfcore.h>
-diff -urNp linux-2.6.25.10/arch/mips/kernel/syscall.c 
linux-2.6.25.10/arch/mips/kernel/syscall.c
---- linux-2.6.25.10/arch/mips/kernel/syscall.c 2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/mips/kernel/syscall.c 2008-07-03 16:53:24.000000000 
-0400
+diff -urNp linux-2.6.26.3/arch/mips/kernel/syscall.c 
linux-2.6.26.3/arch/mips/kernel/syscall.c
+--- linux-2.6.26.3/arch/mips/kernel/syscall.c  2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/mips/kernel/syscall.c  2008-08-09 12:03:28.000000000 
-0400
 @@ -93,6 +93,11 @@ unsigned long arch_get_unmapped_area(str
        do_color_align = 0;
        if (filp || (flags & MAP_SHARED))
@@ -602,9 +586,9 @@
        if (do_color_align)
                addr = COLOUR_ALIGN(addr, pgoff);
        else
-diff -urNp linux-2.6.25.10/arch/mips/mm/fault.c 
linux-2.6.25.10/arch/mips/mm/fault.c
---- linux-2.6.25.10/arch/mips/mm/fault.c       2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/mips/mm/fault.c       2008-07-03 16:53:24.000000000 
-0400
+diff -urNp linux-2.6.26.3/arch/mips/mm/fault.c 
linux-2.6.26.3/arch/mips/mm/fault.c
+--- linux-2.6.26.3/arch/mips/mm/fault.c        2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/mips/mm/fault.c        2008-08-09 12:03:28.000000000 
-0400
 @@ -26,6 +26,23 @@
  #include <asm/ptrace.h>
  #include <asm/highmem.h>              /* For VMALLOC_END */
@@ -629,9 +613,9 @@
  /*
   * This routine handles page faults.  It determines the address,
   * and the problem, and then passes it off to one of the appropriate
-diff -urNp linux-2.6.25.10/arch/parisc/kernel/module.c 
linux-2.6.25.10/arch/parisc/kernel/module.c
---- linux-2.6.25.10/arch/parisc/kernel/module.c        2008-07-02 
23:46:47.000000000 -0400
-+++ linux-2.6.25.10/arch/parisc/kernel/module.c        2008-07-03 
16:53:24.000000000 -0400
+diff -urNp linux-2.6.26.3/arch/parisc/kernel/module.c 
linux-2.6.26.3/arch/parisc/kernel/module.c
+--- linux-2.6.26.3/arch/parisc/kernel/module.c 2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/parisc/kernel/module.c 2008-08-09 12:03:28.000000000 
-0400
 @@ -73,16 +73,38 @@
  
  /* three functions to determine where in the module core
@@ -763,10 +747,10 @@
  
        DEBUGP("register_unwind_table(), sect = %d at 0x%p - 0x%p (gp=0x%lx)\n",
               me->arch.unwind_section, table, end, gp);
-diff -urNp linux-2.6.25.10/arch/parisc/kernel/sys_parisc.c 
linux-2.6.25.10/arch/parisc/kernel/sys_parisc.c
---- linux-2.6.25.10/arch/parisc/kernel/sys_parisc.c    2008-07-02 
23:46:47.000000000 -0400
-+++ linux-2.6.25.10/arch/parisc/kernel/sys_parisc.c    2008-07-03 
16:53:24.000000000 -0400
-@@ -111,7 +111,7 @@ unsigned long arch_get_unmapped_area(str
+diff -urNp linux-2.6.26.3/arch/parisc/kernel/sys_parisc.c 
linux-2.6.26.3/arch/parisc/kernel/sys_parisc.c
+--- linux-2.6.26.3/arch/parisc/kernel/sys_parisc.c     2008-08-06 
12:19:01.000000000 -0400
++++ linux-2.6.26.3/arch/parisc/kernel/sys_parisc.c     2008-08-09 
12:03:28.000000000 -0400
+@@ -98,7 +98,7 @@ unsigned long arch_get_unmapped_area(str
        if (flags & MAP_FIXED)
                return addr;
        if (!addr)
@@ -775,9 +759,9 @@
  
        if (filp) {
                addr = get_shared_area(filp->f_mapping, addr, len, pgoff);
-diff -urNp linux-2.6.25.10/arch/parisc/kernel/traps.c 
linux-2.6.25.10/arch/parisc/kernel/traps.c
---- linux-2.6.25.10/arch/parisc/kernel/traps.c 2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/parisc/kernel/traps.c 2008-07-03 16:53:24.000000000 
-0400
+diff -urNp linux-2.6.26.3/arch/parisc/kernel/traps.c 
linux-2.6.26.3/arch/parisc/kernel/traps.c
+--- linux-2.6.26.3/arch/parisc/kernel/traps.c  2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/parisc/kernel/traps.c  2008-08-09 12:03:28.000000000 
-0400
 @@ -732,9 +732,7 @@ void handle_interruption(int code, struc
  
                        down_read(&current->mm->mmap_sem);
@@ -789,19 +773,18 @@
                                fault_address = regs->iaoq[0];
                                fault_space = regs->iasq[0];
  
-diff -urNp linux-2.6.25.10/arch/parisc/mm/fault.c 
linux-2.6.25.10/arch/parisc/mm/fault.c
---- linux-2.6.25.10/arch/parisc/mm/fault.c     2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/parisc/mm/fault.c     2008-07-03 16:53:24.000000000 
-0400
-@@ -16,6 +16,8 @@
+diff -urNp linux-2.6.26.3/arch/parisc/mm/fault.c 
linux-2.6.26.3/arch/parisc/mm/fault.c
+--- linux-2.6.26.3/arch/parisc/mm/fault.c      2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/parisc/mm/fault.c      2008-08-09 13:07:51.000000000 
-0400
+@@ -16,6 +16,7 @@
  #include <linux/sched.h>
  #include <linux/interrupt.h>
  #include <linux/module.h>
 +#include <linux/unistd.h>
-+#include <linux/binfmts.h>
  
  #include <asm/uaccess.h>
  #include <asm/traps.h>
-@@ -53,7 +55,7 @@ DEFINE_PER_CPU(struct exception_data, ex
+@@ -53,7 +54,7 @@ DEFINE_PER_CPU(struct exception_data, ex
  static unsigned long
  parisc_acctyp(unsigned long code, unsigned int inst)
  {
@@ -810,7 +793,7 @@
            return VM_EXEC;
  
        switch (inst & 0xf0000000) {
-@@ -139,6 +141,116 @@ parisc_acctyp(unsigned long code, unsign
+@@ -139,6 +140,116 @@ parisc_acctyp(unsigned long code, unsign
                        }
  #endif
  
@@ -927,7 +910,7 @@
  void do_page_fault(struct pt_regs *regs, unsigned long code,
                              unsigned long address)
  {
-@@ -165,8 +277,33 @@ good_area:
+@@ -165,8 +276,33 @@ good_area:
  
        acc_type = parisc_acctyp(code,regs->iir);
  
@@ -962,9 +945,9 @@
  
        /*
         * If for any reason at all we couldn't handle the fault, make
-diff -urNp linux-2.6.25.10/arch/powerpc/kernel/module_32.c 
linux-2.6.25.10/arch/powerpc/kernel/module_32.c
---- linux-2.6.25.10/arch/powerpc/kernel/module_32.c    2008-07-02 
23:46:47.000000000 -0400
-+++ linux-2.6.25.10/arch/powerpc/kernel/module_32.c    2008-07-03 
16:53:24.000000000 -0400
+diff -urNp linux-2.6.26.3/arch/powerpc/kernel/module_32.c 
linux-2.6.26.3/arch/powerpc/kernel/module_32.c
+--- linux-2.6.26.3/arch/powerpc/kernel/module_32.c     2008-08-06 
12:19:01.000000000 -0400
++++ linux-2.6.26.3/arch/powerpc/kernel/module_32.c     2008-08-09 
12:03:28.000000000 -0400
 @@ -175,7 +175,7 @@ int module_frob_arch_sections(Elf32_Ehdr
                        me->arch.core_plt_section = i;
        }
@@ -994,10 +977,10 @@
  
        /* Find this entry, or if that fails, the next avail. entry */
        while (entry->jump[0]) {
-diff -urNp linux-2.6.25.10/arch/powerpc/kernel/signal_32.c 
linux-2.6.25.10/arch/powerpc/kernel/signal_32.c
---- linux-2.6.25.10/arch/powerpc/kernel/signal_32.c    2008-07-02 
23:46:47.000000000 -0400
-+++ linux-2.6.25.10/arch/powerpc/kernel/signal_32.c    2008-07-03 
16:53:24.000000000 -0400
-@@ -730,7 +730,7 @@ int handle_rt_signal32(unsigned long sig
+diff -urNp linux-2.6.26.3/arch/powerpc/kernel/signal_32.c 
linux-2.6.26.3/arch/powerpc/kernel/signal_32.c
+--- linux-2.6.26.3/arch/powerpc/kernel/signal_32.c     2008-08-06 
12:19:01.000000000 -0400
++++ linux-2.6.26.3/arch/powerpc/kernel/signal_32.c     2008-08-09 
12:03:28.000000000 -0400
+@@ -743,7 +743,7 @@ int handle_rt_signal32(unsigned long sig
        /* Save user registers on the stack */
        frame = &rt_sf->uc.uc_mcontext;
        addr = frame;
@@ -1006,10 +989,10 @@
                if (save_user_regs(regs, frame, 0))
                        goto badframe;
                regs->link = current->mm->context.vdso_base + 
vdso32_rt_sigtramp;
-diff -urNp linux-2.6.25.10/arch/powerpc/kernel/signal_64.c 
linux-2.6.25.10/arch/powerpc/kernel/signal_64.c
---- linux-2.6.25.10/arch/powerpc/kernel/signal_64.c    2008-07-02 
23:46:47.000000000 -0400
-+++ linux-2.6.25.10/arch/powerpc/kernel/signal_64.c    2008-07-03 
16:53:24.000000000 -0400
-@@ -369,7 +369,7 @@ int handle_rt_signal64(int signr, struct
+diff -urNp linux-2.6.26.3/arch/powerpc/kernel/signal_64.c 
linux-2.6.26.3/arch/powerpc/kernel/signal_64.c
+--- linux-2.6.26.3/arch/powerpc/kernel/signal_64.c     2008-08-06 
12:19:01.000000000 -0400
++++ linux-2.6.26.3/arch/powerpc/kernel/signal_64.c     2008-08-09 
12:03:28.000000000 -0400
+@@ -371,7 +371,7 @@ int handle_rt_signal64(int signr, struct
        current->thread.fpscr.val = 0;
  
        /* Set up to return from userspace. */
@@ -1018,10 +1001,10 @@
                regs->link = current->mm->context.vdso_base + 
vdso64_rt_sigtramp;
        } else {
                err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]);
-diff -urNp linux-2.6.25.10/arch/powerpc/kernel/vdso.c 
linux-2.6.25.10/arch/powerpc/kernel/vdso.c
---- linux-2.6.25.10/arch/powerpc/kernel/vdso.c 2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/powerpc/kernel/vdso.c 2008-07-03 16:53:24.000000000 
-0400
-@@ -211,7 +211,7 @@ int arch_setup_additional_pages(struct l
+diff -urNp linux-2.6.26.3/arch/powerpc/kernel/vdso.c 
linux-2.6.26.3/arch/powerpc/kernel/vdso.c
+--- linux-2.6.26.3/arch/powerpc/kernel/vdso.c  2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/powerpc/kernel/vdso.c  2008-08-09 12:03:28.000000000 
-0400
+@@ -212,7 +212,7 @@ int arch_setup_additional_pages(struct l
        vdso_base = VDSO32_MBASE;
  #endif
  
@@ -1030,7 +1013,7 @@
  
        /* vDSO has a problem and was disabled, just don't "enable" it for the
         * process
-@@ -228,7 +228,7 @@ int arch_setup_additional_pages(struct l
+@@ -229,7 +229,7 @@ int arch_setup_additional_pages(struct l
         */
        down_write(&mm->mmap_sem);
        vdso_base = get_unmapped_area(NULL, vdso_base,
@@ -1039,23 +1022,21 @@
        if (IS_ERR_VALUE(vdso_base)) {
                rc = vdso_base;
                goto fail_mmapsem;
-diff -urNp linux-2.6.25.10/arch/powerpc/mm/fault.c 
linux-2.6.25.10/arch/powerpc/mm/fault.c
---- linux-2.6.25.10/arch/powerpc/mm/fault.c    2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/powerpc/mm/fault.c    2008-07-03 16:53:24.000000000 
-0400
-@@ -29,6 +29,12 @@
+diff -urNp linux-2.6.26.3/arch/powerpc/mm/fault.c 
linux-2.6.26.3/arch/powerpc/mm/fault.c
+--- linux-2.6.26.3/arch/powerpc/mm/fault.c     2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/powerpc/mm/fault.c     2008-08-09 13:07:51.000000000 
-0400
+@@ -29,6 +29,10 @@
  #include <linux/module.h>
  #include <linux/kprobes.h>
  #include <linux/kdebug.h>
-+#include <linux/binfmts.h>
 +#include <linux/slab.h>
 +#include <linux/pagemap.h>
 +#include <linux/compiler.h>
-+#include <linux/binfmts.h>
 +#include <linux/unistd.h>
  
  #include <asm/page.h>
  #include <asm/pgtable.h>
-@@ -62,6 +68,366 @@ static inline int notify_page_fault(stru
+@@ -62,6 +66,363 @@ static inline int notify_page_fault(stru
  }
  #endif
  
@@ -1065,28 +1046,25 @@
 +      vma->vm_mm->call_syscall = 0UL;
 +}
 +
-+static struct page *pax_syscall_nopage(struct vm_area_struct *vma, unsigned 
long address, int *type)
++static int pax_syscall_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 +{
-+      struct page *page;
 +      unsigned int *kaddr;
 +
-+      page = alloc_page(GFP_HIGHUSER);
-+      if (!page)
-+              return NOPAGE_OOM;
++      vmf->page = alloc_page(GFP_HIGHUSER);
++      if (!vmf->page)
++              return VM_FAULT_OOM;
 +
-+      kaddr = kmap(page);
++      kaddr = kmap(vmf->page);
 +      memset(kaddr, 0, PAGE_SIZE);
 +      kaddr[0] = 0x44000002U; /* sc */
 +      __flush_dcache_icache(kaddr);
-+      kunmap(page);
-+      if (type)
-+              *type = VM_FAULT_MAJOR;
-+      return page;
++      kunmap(vmf->page);
++      return VM_FAULT_MAJOR;
 +}
 +
 +static struct vm_operations_struct pax_vm_ops = {
 +      .close = pax_syscall_close,
-+      .nopage = pax_syscall_nopage,
++      .fault = pax_syscall_fault
 +};
 +
 +static int pax_insert_vma(struct vm_area_struct *vma, unsigned long addr)
@@ -1422,7 +1400,7 @@
  /*
   * Check whether the instruction at regs->nip is a store using
   * an update addressing form which will update r1.
-@@ -157,7 +523,7 @@ int __kprobes do_page_fault(struct pt_re
+@@ -157,7 +518,7 @@ int __kprobes do_page_fault(struct pt_re
         * indicate errors in DSISR but can validly be set in SRR1.
         */
        if (trap == 0x400)
@@ -1431,7 +1409,7 @@
        else
                is_write = error_code & DSISR_ISSTORE;
  #else
-@@ -355,6 +721,37 @@ bad_area:
+@@ -355,6 +716,37 @@ bad_area:
  bad_area_nosemaphore:
        /* User mode accesses cause a SIGSEGV */
        if (user_mode(regs)) {
@@ -1469,9 +1447,9 @@
                _exception(SIGSEGV, regs, code, address);
                return 0;
        }
-diff -urNp linux-2.6.25.10/arch/powerpc/mm/mmap.c 
linux-2.6.25.10/arch/powerpc/mm/mmap.c
---- linux-2.6.25.10/arch/powerpc/mm/mmap.c     2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/powerpc/mm/mmap.c     2008-07-03 16:53:24.000000000 
-0400
+diff -urNp linux-2.6.26.3/arch/powerpc/mm/mmap.c 
linux-2.6.26.3/arch/powerpc/mm/mmap.c
+--- linux-2.6.26.3/arch/powerpc/mm/mmap.c      2008-08-06 12:19:01.000000000 
-0400
++++ linux-2.6.26.3/arch/powerpc/mm/mmap.c      2008-08-09 12:03:28.000000000 
-0400
 @@ -75,10 +75,22 @@ void arch_pick_mmap_layout(struct mm_str
         */
        if (mmap_is_legacy()) {
@@ -1495,22 +1473,21 @@
                mm->get_unmapped_area = arch_get_unmapped_area_topdown;
                mm->unmap_area = arch_unmap_area_topdown;
        }
-diff -urNp linux-2.6.25.10/arch/ppc/mm/fault.c 
linux-2.6.25.10/arch/ppc/mm/fault.c
---- linux-2.6.25.10/arch/ppc/mm/fault.c        2008-07-02 23:46:47.000000000 
-0400
-+++ linux-2.6.25.10/arch/ppc/mm/fault.c        2008-07-03 16:53:24.000000000 
-0400
-@@ -25,6 +25,11 @@
+diff -urNp linux-2.6.26.3/arch/ppc/mm/fault.c 
linux-2.6.26.3/arch/ppc/mm/fault.c
+--- linux-2.6.26.3/arch/ppc/mm/fault.c 2008-08-06 12:19:01.000000000 -0400
++++ linux-2.6.26.3/arch/ppc/mm/fault.c 2008-08-09 13:07:51.000000000 -0400
+@@ -25,6 +25,10 @@
  #include <linux/interrupt.h>
  #include <linux/highmem.h>
  #include <linux/module.h>
 +#include <linux/slab.h>
 +#include <linux/pagemap.h>
 +#include <linux/compiler.h>
-+#include <linux/binfmts.h>
 +#include <linux/unistd.h>
  
  #include <asm/page.h>
  #include <asm/pgtable.h>
-@@ -48,6 +53,366 @@ unsigned long pte_misses;  /* updated by 
+@@ -48,6 +52,363 @@ unsigned long pte_misses;  /* updated by 
  unsigned long pte_errors;     /* updated by do_page_fault() */
  unsigned int probingmem;
  
@@ -1520,28 +1497,25 @@
 +      vma->vm_mm->call_syscall = 0UL;
 +}
 +
-+static struct page *pax_syscall_nopage(struct vm_area_struct *vma, unsigned 
long address, int *type)
++static int pax_syscall_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 +{
-+      struct page *page;
 +      unsigned int *kaddr;
 +
-+      page = alloc_page(GFP_HIGHUSER);
-+      if (!page)
-+              return NOPAGE_OOM;
++      vmf->page = alloc_page(GFP_HIGHUSER);
++      if (!vmf->page)
++              return VM_FAULT_OOM;
 +
-+      kaddr = kmap(page);
++      kaddr = kmap(vmf->page);
 +      memset(kaddr, 0, PAGE_SIZE);
 +      kaddr[0] = 0x44000002U; /* sc */
 +      __flush_dcache_icache(kaddr);
-+      kunmap(page);
-+      if (type)
-+              *type = VM_FAULT_MAJOR;
-+      return page;
++      kunmap(vmf->page);
++      return VM_FAULT_MAJOR;
 +}
 +
 +static struct vm_operations_struct pax_vm_ops = {
 +      .close = pax_syscall_close,
-+      .nopage = pax_syscall_nopage,
++      .fault = pax_syscall_fault
 +};
 +
 +static int pax_insert_vma(struct vm_area_struct *vma, unsigned long addr)
@@ -1877,7 +1851,7 @@
  /*
   * Check whether the instruction at regs->nip is a store using
   * an update addressing form which will update r1.
-@@ -109,7 +474,7 @@ int do_page_fault(struct pt_regs *regs, 
+@@ -109,7 +470,7 @@ int do_page_fault(struct pt_regs *regs, 
         * indicate errors in DSISR but can validly be set in SRR1.
         */
        if (TRAP(regs) == 0x400)
@@ -1886,7 +1860,7 @@
        else
                is_write = error_code & 0x02000000;
  #endif /* CONFIG_4xx || CONFIG_BOOKE */
-@@ -204,15 +569,14 @@ good_area:
+@@ -204,15 +565,14 @@ good_area:
                pte_t *ptep;
                pmd_t *pmdp;
  
@@ -1904,7 +1878,7 @@
                /* Since 4xx/Book-E supports per-page execute permission,
                 * we lazily flush dcache to icache. */
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/linux-2.6-grsecurity.patch?r1=1.1.2.20&r2=1.1.2.21&f=u

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

Reply via email to