SOURCES (Titanium): linux-2.6-grsecurity.patch - http://www.grsecurity.net/...
hawk
hawk at pld-linux.org
Sun May 18 20:58:26 CEST 2008
Author: hawk Date: Sun May 18 18:58:26 2008 GMT
Module: SOURCES Tag: Titanium
---- Log message:
- http://www.grsecurity.net/~spender/grsecurity-2.1.12-2.6.25.4-200805181334.patch
with localversion killed
---- Files affected:
SOURCES:
linux-2.6-grsecurity.patch (1.1.2.9 -> 1.1.2.10)
---- Diffs:
================================================================
Index: SOURCES/linux-2.6-grsecurity.patch
diff -u SOURCES/linux-2.6-grsecurity.patch:1.1.2.9 SOURCES/linux-2.6-grsecurity.patch:1.1.2.10
--- SOURCES/linux-2.6-grsecurity.patch:1.1.2.9 Fri May 16 23:05:15 2008
+++ SOURCES/linux-2.6-grsecurity.patch Sun May 18 20:58:20 2008
@@ -1,6 +1,6 @@
-diff -urNp linux-2.6.24.7/arch/alpha/kernel/module.c linux-2.6.24.7/arch/alpha/kernel/module.c
---- linux-2.6.24.7/arch/alpha/kernel/module.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/alpha/kernel/module.c 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/alpha/kernel/module.c linux-2.6.25.4/arch/alpha/kernel/module.c
+--- linux-2.6.25.4/arch/alpha/kernel/module.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/alpha/kernel/module.c 2008-05-18 13:33:13.000000000 -0400
@@ -176,7 +176,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs,
/* The small sections were sorted to the end of the segment.
@@ -10,9 +10,9 @@
got = sechdrs[me->arch.gotsecindex].sh_addr;
for (i = 0; i < n; i++) {
-diff -urNp linux-2.6.24.7/arch/alpha/kernel/osf_sys.c linux-2.6.24.7/arch/alpha/kernel/osf_sys.c
---- linux-2.6.24.7/arch/alpha/kernel/osf_sys.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/alpha/kernel/osf_sys.c 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/alpha/kernel/osf_sys.c linux-2.6.25.4/arch/alpha/kernel/osf_sys.c
+--- linux-2.6.25.4/arch/alpha/kernel/osf_sys.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/alpha/kernel/osf_sys.c 2008-05-18 13:33:13.000000000 -0400
@@ -1288,6 +1288,10 @@ arch_get_unmapped_area(struct file *filp
merely specific addresses, but regions of memory -- perhaps
this feature should be incorporated into all ports? */
@@ -35,9 +35,9 @@
if (addr != (unsigned long) -ENOMEM)
return addr;
-diff -urNp linux-2.6.24.7/arch/alpha/kernel/ptrace.c linux-2.6.24.7/arch/alpha/kernel/ptrace.c
---- linux-2.6.24.7/arch/alpha/kernel/ptrace.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/alpha/kernel/ptrace.c 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/alpha/kernel/ptrace.c linux-2.6.25.4/arch/alpha/kernel/ptrace.c
+--- linux-2.6.25.4/arch/alpha/kernel/ptrace.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/alpha/kernel/ptrace.c 2008-05-18 13:33:13.000000000 -0400
@@ -15,6 +15,7 @@
#include <linux/slab.h>
#include <linux/security.h>
@@ -56,9 +56,9 @@
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.24.7/arch/alpha/mm/fault.c linux-2.6.24.7/arch/alpha/mm/fault.c
---- linux-2.6.24.7/arch/alpha/mm/fault.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/alpha/mm/fault.c 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/alpha/mm/fault.c linux-2.6.25.4/arch/alpha/mm/fault.c
+--- linux-2.6.25.4/arch/alpha/mm/fault.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/alpha/mm/fault.c 2008-05-18 13:33:13.000000000 -0400
@@ -23,6 +23,7 @@
#include <linux/smp.h>
#include <linux/interrupt.h>
@@ -182,9 +182,9 @@
+ for (i = 0; i < 5; i++) {
+ unsigned int c;
+ if (get_user(c, (unsigned int *)pc+i))
-+ printk("???????? ");
++ printk(KERN_CONT "???????? ");
+ else
-+ printk("%08x ", c);
++ printk(KERN_CONT "%08x ", c);
+ }
+ printk("\n");
+}
@@ -223,9 +223,9 @@
} else if (!cause) {
/* Allow reads even for write-only mappings */
if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
-diff -urNp linux-2.6.24.7/arch/arm/mm/mmap.c linux-2.6.24.7/arch/arm/mm/mmap.c
---- linux-2.6.24.7/arch/arm/mm/mmap.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/arm/mm/mmap.c 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/arm/mm/mmap.c linux-2.6.25.4/arch/arm/mm/mmap.c
+--- linux-2.6.25.4/arch/arm/mm/mmap.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/arm/mm/mmap.c 2008-05-18 13:33:13.000000000 -0400
@@ -60,6 +60,10 @@ arch_get_unmapped_area(struct file *filp
if (len > TASK_SIZE)
return -ENOMEM;
@@ -262,9 +262,9 @@
mm->cached_hole_size = 0;
goto full_search;
}
-diff -urNp linux-2.6.24.7/arch/avr32/mm/fault.c linux-2.6.24.7/arch/avr32/mm/fault.c
---- linux-2.6.24.7/arch/avr32/mm/fault.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/avr32/mm/fault.c 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/avr32/mm/fault.c linux-2.6.25.4/arch/avr32/mm/fault.c
+--- linux-2.6.25.4/arch/avr32/mm/fault.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/avr32/mm/fault.c 2008-05-18 13:33:13.000000000 -0400
@@ -41,6 +41,23 @@ static inline int notify_page_fault(stru
int exception_trace = 1;
@@ -278,9 +278,9 @@
+ for (i = 0; i < 20; i++) {
+ unsigned char c;
+ if (get_user(c, (unsigned char *)pc+i))
-+ printk("???????? ");
++ printk(KERN_CONT "???????? ");
+ else
-+ printk("%02x ", c);
++ printk(KERN_CONT "%02x ", c);
+ }
+ printk("\n");
+}
@@ -306,9 +306,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.24.7/arch/ia64/ia32/binfmt_elf32.c linux-2.6.24.7/arch/ia64/ia32/binfmt_elf32.c
---- linux-2.6.24.7/arch/ia64/ia32/binfmt_elf32.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/ia64/ia32/binfmt_elf32.c 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/ia64/ia32/binfmt_elf32.c linux-2.6.25.4/arch/ia64/ia32/binfmt_elf32.c
+--- linux-2.6.25.4/arch/ia64/ia32/binfmt_elf32.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/ia64/ia32/binfmt_elf32.c 2008-05-18 13:33:14.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 +323,9 @@
/* Ugly but avoids duplication */
#include "../../../fs/binfmt_elf.c"
-diff -urNp linux-2.6.24.7/arch/ia64/ia32/ia32priv.h linux-2.6.24.7/arch/ia64/ia32/ia32priv.h
---- linux-2.6.24.7/arch/ia64/ia32/ia32priv.h 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/ia64/ia32/ia32priv.h 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/ia64/ia32/ia32priv.h linux-2.6.25.4/arch/ia64/ia32/ia32priv.h
+--- linux-2.6.25.4/arch/ia64/ia32/ia32priv.h 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/ia64/ia32/ia32priv.h 2008-05-18 13:33:14.000000000 -0400
@@ -303,7 +303,14 @@ struct old_linux32_dirent {
#define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_386
@@ -342,9 +342,9 @@
#define IA32_GATE_OFFSET IA32_PAGE_OFFSET
#define IA32_GATE_END IA32_PAGE_OFFSET + PAGE_SIZE
-diff -urNp linux-2.6.24.7/arch/ia64/kernel/module.c linux-2.6.24.7/arch/ia64/kernel/module.c
---- linux-2.6.24.7/arch/ia64/kernel/module.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/ia64/kernel/module.c 2008-05-06 19:32:42.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/ia64/kernel/module.c linux-2.6.25.4/arch/ia64/kernel/module.c
+--- linux-2.6.25.4/arch/ia64/kernel/module.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/ia64/kernel/module.c 2008-05-18 13:33:14.000000000 -0400
@@ -321,7 +321,7 @@ module_alloc (unsigned long size)
void
module_free (struct module *mod, void *module_region)
@@ -430,32 +430,11 @@
+ gp = (mod->core_size_rx + mod->core_size_rw) / 2;
+ gp = (uint64_t) mod->module_core_rx + ((gp + 7) & -8);
mod->arch.gp = gp;
- DEBUGP("%s: placing gp at 0x%lx\n", __FUNCTION__, gp);
+ DEBUGP("%s: placing gp at 0x%lx\n", __func__, gp);
}
-diff -urNp linux-2.6.24.7/arch/ia64/kernel/ptrace.c linux-2.6.24.7/arch/ia64/kernel/ptrace.c
---- linux-2.6.24.7/arch/ia64/kernel/ptrace.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/ia64/kernel/ptrace.c 2008-05-06 17:49:03.000000000 -0400
-@@ -17,6 +17,7 @@
- #include <linux/security.h>
- #include <linux/audit.h>
- #include <linux/signal.h>
-+#include <linux/grsecurity.h>
-
- #include <asm/pgtable.h>
- #include <asm/processor.h>
-@@ -1451,6 +1452,9 @@ sys_ptrace (long request, pid_t pid, uns
- if (pid == 1) /* no messing around with init! */
- goto out_tsk;
-
-+ if (gr_handle_ptrace(child, request))
-+ goto out_tsk;
-+
- if (request == PTRACE_ATTACH) {
- ret = ptrace_attach(child);
- goto out_tsk;
-diff -urNp linux-2.6.24.7/arch/ia64/kernel/sys_ia64.c linux-2.6.24.7/arch/ia64/kernel/sys_ia64.c
---- linux-2.6.24.7/arch/ia64/kernel/sys_ia64.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/ia64/kernel/sys_ia64.c 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/ia64/kernel/sys_ia64.c linux-2.6.25.4/arch/ia64/kernel/sys_ia64.c
+--- linux-2.6.25.4/arch/ia64/kernel/sys_ia64.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/ia64/kernel/sys_ia64.c 2008-05-18 13:33:14.000000000 -0400
@@ -43,6 +43,13 @@ arch_get_unmapped_area (struct file *fil
if (REGION_NUMBER(addr) == RGN_HPAGE)
addr = 0;
@@ -482,9 +461,9 @@
goto full_search;
}
return -ENOMEM;
-diff -urNp linux-2.6.24.7/arch/ia64/mm/fault.c linux-2.6.24.7/arch/ia64/mm/fault.c
---- linux-2.6.24.7/arch/ia64/mm/fault.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/ia64/mm/fault.c 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/ia64/mm/fault.c linux-2.6.25.4/arch/ia64/mm/fault.c
+--- linux-2.6.25.4/arch/ia64/mm/fault.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/ia64/mm/fault.c 2008-05-18 13:33:14.000000000 -0400
@@ -10,6 +10,7 @@
#include <linux/interrupt.h>
#include <linux/kprobes.h>
@@ -506,9 +485,9 @@
+ for (i = 0; i < 8; i++) {
+ unsigned int c;
+ if (get_user(c, (unsigned int *)pc+i))
-+ printk("???????? ");
++ printk(KERN_CONT "???????? ");
+ else
-+ printk("%08x ", c);
++ printk(KERN_CONT "%08x ", c);
+ }
+ printk("\n");
+}
@@ -542,9 +521,9 @@
survive:
/*
* If for any reason at all we couldn't handle the fault, make
-diff -urNp linux-2.6.24.7/arch/ia64/mm/init.c linux-2.6.24.7/arch/ia64/mm/init.c
---- linux-2.6.24.7/arch/ia64/mm/init.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/ia64/mm/init.c 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/ia64/mm/init.c linux-2.6.25.4/arch/ia64/mm/init.c
+--- linux-2.6.25.4/arch/ia64/mm/init.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/ia64/mm/init.c 2008-05-18 13:33:14.000000000 -0400
@@ -20,8 +20,8 @@
#include <linux/proc_fs.h>
#include <linux/bitops.h>
@@ -575,9 +554,9 @@
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
down_write(¤t->mm->mmap_sem);
if (insert_vm_struct(current->mm, vma)) {
-diff -urNp linux-2.6.24.7/arch/mips/kernel/binfmt_elfn32.c linux-2.6.24.7/arch/mips/kernel/binfmt_elfn32.c
---- linux-2.6.24.7/arch/mips/kernel/binfmt_elfn32.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/mips/kernel/binfmt_elfn32.c 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/mips/kernel/binfmt_elfn32.c linux-2.6.25.4/arch/mips/kernel/binfmt_elfn32.c
+--- linux-2.6.25.4/arch/mips/kernel/binfmt_elfn32.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/mips/kernel/binfmt_elfn32.c 2008-05-18 13:33:14.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)
@@ -592,9 +571,9 @@
#include <asm/processor.h>
#include <linux/module.h>
#include <linux/elfcore.h>
-diff -urNp linux-2.6.24.7/arch/mips/kernel/binfmt_elfo32.c linux-2.6.24.7/arch/mips/kernel/binfmt_elfo32.c
---- linux-2.6.24.7/arch/mips/kernel/binfmt_elfo32.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/mips/kernel/binfmt_elfo32.c 2008-05-06 17:49:03.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/mips/kernel/binfmt_elfo32.c linux-2.6.25.4/arch/mips/kernel/binfmt_elfo32.c
+--- linux-2.6.25.4/arch/mips/kernel/binfmt_elfo32.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/mips/kernel/binfmt_elfo32.c 2008-05-18 13:33:14.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)
@@ -609,9 +588,9 @@
#include <asm/processor.h>
#include <linux/module.h>
#include <linux/elfcore.h>
-diff -urNp linux-2.6.24.7/arch/mips/kernel/syscall.c linux-2.6.24.7/arch/mips/kernel/syscall.c
---- linux-2.6.24.7/arch/mips/kernel/syscall.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/mips/kernel/syscall.c 2008-05-06 17:49:04.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/mips/kernel/syscall.c linux-2.6.25.4/arch/mips/kernel/syscall.c
+--- linux-2.6.25.4/arch/mips/kernel/syscall.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/mips/kernel/syscall.c 2008-05-18 13:33:14.000000000 -0400
@@ -93,6 +93,11 @@ unsigned long arch_get_unmapped_area(str
do_color_align = 0;
if (filp || (flags & MAP_SHARED))
@@ -633,9 +612,9 @@
if (do_color_align)
addr = COLOUR_ALIGN(addr, pgoff);
else
-diff -urNp linux-2.6.24.7/arch/mips/mm/fault.c linux-2.6.24.7/arch/mips/mm/fault.c
---- linux-2.6.24.7/arch/mips/mm/fault.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/mips/mm/fault.c 2008-05-06 17:49:04.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/mips/mm/fault.c linux-2.6.25.4/arch/mips/mm/fault.c
+--- linux-2.6.25.4/arch/mips/mm/fault.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/mips/mm/fault.c 2008-05-18 13:33:14.000000000 -0400
@@ -26,6 +26,23 @@
#include <asm/ptrace.h>
#include <asm/highmem.h> /* For VMALLOC_END */
@@ -649,9 +628,9 @@
+ for (i = 0; i < 5; i++) {
+ unsigned int c;
+ if (get_user(c, (unsigned int *)pc+i))
-+ printk("???????? ");
++ printk(KERN_CONT "???????? ");
+ else
-+ printk("%08x ", c);
++ printk(KERN_CONT "%08x ", c);
+ }
+ printk("\n");
+}
@@ -660,9 +639,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.24.7/arch/parisc/kernel/module.c linux-2.6.24.7/arch/parisc/kernel/module.c
---- linux-2.6.24.7/arch/parisc/kernel/module.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/parisc/kernel/module.c 2008-05-06 17:49:04.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/parisc/kernel/module.c linux-2.6.25.4/arch/parisc/kernel/module.c
+--- linux-2.6.25.4/arch/parisc/kernel/module.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/parisc/kernel/module.c 2008-05-18 13:33:14.000000000 -0400
@@ -73,16 +73,38 @@
/* three functions to determine where in the module core
@@ -794,9 +773,9 @@
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.24.7/arch/parisc/kernel/sys_parisc.c linux-2.6.24.7/arch/parisc/kernel/sys_parisc.c
---- linux-2.6.24.7/arch/parisc/kernel/sys_parisc.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/parisc/kernel/sys_parisc.c 2008-05-06 17:49:04.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/parisc/kernel/sys_parisc.c linux-2.6.25.4/arch/parisc/kernel/sys_parisc.c
+--- linux-2.6.25.4/arch/parisc/kernel/sys_parisc.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/parisc/kernel/sys_parisc.c 2008-05-18 13:33:14.000000000 -0400
@@ -111,7 +111,7 @@ unsigned long arch_get_unmapped_area(str
if (flags & MAP_FIXED)
return addr;
@@ -806,10 +785,10 @@
if (filp) {
addr = get_shared_area(filp->f_mapping, addr, len, pgoff);
-diff -urNp linux-2.6.24.7/arch/parisc/kernel/traps.c linux-2.6.24.7/arch/parisc/kernel/traps.c
---- linux-2.6.24.7/arch/parisc/kernel/traps.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/parisc/kernel/traps.c 2008-05-06 17:49:04.000000000 -0400
-@@ -713,9 +713,7 @@ void handle_interruption(int code, struc
+diff -urNp linux-2.6.25.4/arch/parisc/kernel/traps.c linux-2.6.25.4/arch/parisc/kernel/traps.c
+--- linux-2.6.25.4/arch/parisc/kernel/traps.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/parisc/kernel/traps.c 2008-05-18 13:33:14.000000000 -0400
+@@ -732,9 +732,7 @@ void handle_interruption(int code, struc
down_read(¤t->mm->mmap_sem);
vma = find_vma(current->mm,regs->iaoq[0]);
@@ -820,9 +799,9 @@
fault_address = regs->iaoq[0];
fault_space = regs->iasq[0];
-diff -urNp linux-2.6.24.7/arch/parisc/mm/fault.c linux-2.6.24.7/arch/parisc/mm/fault.c
---- linux-2.6.24.7/arch/parisc/mm/fault.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/parisc/mm/fault.c 2008-05-06 17:49:04.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/parisc/mm/fault.c linux-2.6.25.4/arch/parisc/mm/fault.c
+--- linux-2.6.25.4/arch/parisc/mm/fault.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/parisc/mm/fault.c 2008-05-18 13:33:14.000000000 -0400
@@ -16,6 +16,8 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
@@ -947,9 +926,9 @@
+ for (i = 0; i < 5; i++) {
+ unsigned int c;
+ if (get_user(c, (unsigned int *)pc+i))
-+ printk("???????? ");
++ printk(KERN_CONT "???????? ");
+ else
-+ printk("%08x ", c);
++ printk(KERN_CONT "%08x ", c);
+ }
+ printk("\n");
+}
@@ -993,10 +972,10 @@
/*
* If for any reason at all we couldn't handle the fault, make
-diff -urNp linux-2.6.24.7/arch/powerpc/kernel/module_32.c linux-2.6.24.7/arch/powerpc/kernel/module_32.c
---- linux-2.6.24.7/arch/powerpc/kernel/module_32.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/powerpc/kernel/module_32.c 2008-05-06 17:49:04.000000000 -0400
-@@ -126,7 +126,7 @@ int module_frob_arch_sections(Elf32_Ehdr
+diff -urNp linux-2.6.25.4/arch/powerpc/kernel/module_32.c linux-2.6.25.4/arch/powerpc/kernel/module_32.c
+--- linux-2.6.25.4/arch/powerpc/kernel/module_32.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/powerpc/kernel/module_32.c 2008-05-18 13:33:14.000000000 -0400
+@@ -175,7 +175,7 @@ int module_frob_arch_sections(Elf32_Ehdr
me->arch.core_plt_section = i;
}
if (!me->arch.core_plt_section || !me->arch.init_plt_section) {
@@ -1005,7 +984,7 @@
return -ENOEXEC;
}
-@@ -167,11 +167,16 @@ static uint32_t do_plt_call(void *locati
+@@ -216,11 +216,16 @@ static uint32_t do_plt_call(void *locati
DEBUGP("Doing plt for call to 0x%x at 0x%x\n", val, (unsigned int)location);
/* Init, or core PLT? */
@@ -1025,10 +1004,10 @@
/* Find this entry, or if that fails, the next avail. entry */
while (entry->jump[0]) {
-diff -urNp linux-2.6.24.7/arch/powerpc/kernel/signal_32.c linux-2.6.24.7/arch/powerpc/kernel/signal_32.c
---- linux-2.6.24.7/arch/powerpc/kernel/signal_32.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/powerpc/kernel/signal_32.c 2008-05-06 17:49:04.000000000 -0400
-@@ -731,7 +731,7 @@ int handle_rt_signal32(unsigned long sig
+diff -urNp linux-2.6.25.4/arch/powerpc/kernel/signal_32.c linux-2.6.25.4/arch/powerpc/kernel/signal_32.c
+--- linux-2.6.25.4/arch/powerpc/kernel/signal_32.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/powerpc/kernel/signal_32.c 2008-05-18 13:33:14.000000000 -0400
+@@ -730,7 +730,7 @@ int handle_rt_signal32(unsigned long sig
/* Save user registers on the stack */
frame = &rt_sf->uc.uc_mcontext;
addr = frame;
@@ -1037,9 +1016,9 @@
if (save_user_regs(regs, frame, 0))
goto badframe;
regs->link = current->mm->context.vdso_base + vdso32_rt_sigtramp;
-diff -urNp linux-2.6.24.7/arch/powerpc/kernel/signal_64.c linux-2.6.24.7/arch/powerpc/kernel/signal_64.c
---- linux-2.6.24.7/arch/powerpc/kernel/signal_64.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/powerpc/kernel/signal_64.c 2008-05-06 17:49:04.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/powerpc/kernel/signal_64.c linux-2.6.25.4/arch/powerpc/kernel/signal_64.c
+--- linux-2.6.25.4/arch/powerpc/kernel/signal_64.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/powerpc/kernel/signal_64.c 2008-05-18 13:33:14.000000000 -0400
@@ -369,7 +369,7 @@ int handle_rt_signal64(int signr, struct
current->thread.fpscr.val = 0;
@@ -1049,9 +1028,9 @@
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.24.7/arch/powerpc/kernel/vdso.c linux-2.6.24.7/arch/powerpc/kernel/vdso.c
---- linux-2.6.24.7/arch/powerpc/kernel/vdso.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/powerpc/kernel/vdso.c 2008-05-06 17:49:04.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/powerpc/kernel/vdso.c linux-2.6.25.4/arch/powerpc/kernel/vdso.c
+--- linux-2.6.25.4/arch/powerpc/kernel/vdso.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/powerpc/kernel/vdso.c 2008-05-18 13:33:14.000000000 -0400
@@ -211,7 +211,7 @@ int arch_setup_additional_pages(struct l
vdso_base = VDSO32_MBASE;
#endif
@@ -1070,9 +1049,9 @@
if (IS_ERR_VALUE(vdso_base)) {
rc = vdso_base;
goto fail_mmapsem;
-diff -urNp linux-2.6.24.7/arch/powerpc/mm/fault.c linux-2.6.24.7/arch/powerpc/mm/fault.c
---- linux-2.6.24.7/arch/powerpc/mm/fault.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/powerpc/mm/fault.c 2008-05-06 17:49:04.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/powerpc/mm/fault.c linux-2.6.25.4/arch/powerpc/mm/fault.c
+--- linux-2.6.25.4/arch/powerpc/mm/fault.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/powerpc/mm/fault.c 2008-05-18 13:33:14.000000000 -0400
@@ -29,6 +29,12 @@
#include <linux/module.h>
#include <linux/kprobes.h>
@@ -1086,7 +1065,7 @@
#include <asm/page.h>
#include <asm/pgtable.h>
-@@ -62,6 +68,363 @@ static inline int notify_page_fault(stru
+@@ -62,6 +68,366 @@ static inline int notify_page_fault(stru
}
#endif
@@ -1248,16 +1227,16 @@
+ unsigned long addr = b | 0xFC000000UL;
+
+ addr = regs->nip + 12 + ((addr ^ 0x02000000UL) + 0x02000000UL);
-+ err = get_user(addis, (unsigned int*)addr);
-+ err |= get_user(addi, (unsigned int*)(addr+4));
-+ err |= get_user(rlwinm, (unsigned int*)(addr+8));
-+ err |= get_user(add, (unsigned int*)(addr+12));
-+ err |= get_user(li2, (unsigned int*)(addr+16));
-+ err |= get_user(addis2, (unsigned int*)(addr+20));
-+ err |= get_user(mtctr, (unsigned int*)(addr+24));
-+ err |= get_user(li3, (unsigned int*)(addr+28));
-+ err |= get_user(addis3, (unsigned int*)(addr+32));
-+ err |= get_user(bctr, (unsigned int*)(addr+36));
++ err = get_user(addis, (unsigned int *)addr);
++ err |= get_user(addi, (unsigned int *)(addr+4));
++ err |= get_user(rlwinm, (unsigned int *)(addr+8));
++ err |= get_user(add, (unsigned int *)(addr+12));
++ err |= get_user(li2, (unsigned int *)(addr+16));
++ err |= get_user(addis2, (unsigned int *)(addr+20));
++ err |= get_user(mtctr, (unsigned int *)(addr+24));
++ err |= get_user(li3, (unsigned int *)(addr+28));
++ err |= get_user(addis3, (unsigned int *)(addr+32));
++ err |= get_user(bctr, (unsigned int *)(addr+36));
+
+ if (err)
+ break;
@@ -1273,7 +1252,6 @@
+ (addis3 & 0xFFFF0000U) == 0x3D8C0000U &&
+ bctr == 0x4E800420U)
+ {
-+ regs->gpr[PT_R11] =
+ regs->gpr[PT_R11] = 3 * (((li | 0xFFFF0000UL) ^ 0x00008000UL) + 0x00008000UL);
+ regs->gpr[PT_R12] = (((li3 | 0xFFFF0000UL) ^ 0x00008000UL) + 0x00008000UL);
+ regs->gpr[PT_R12] += (addis3 & 0xFFFFU) << 16;
@@ -1351,14 +1329,16 @@
+ if (current->mm->call_syscall) {
+ call_syscall = current->mm->call_syscall;
+ up_write(¤t->mm->mmap_sem);
-+ if (vma) kmem_cache_free(vm_area_cachep, vma);
++ if (vma)
++ kmem_cache_free(vm_area_cachep, vma);
+ goto emulate;
+ }
+
+ call_syscall = get_unmapped_area(NULL, 0UL, PAGE_SIZE, 0UL, MAP_PRIVATE);
+ if (!vma || (call_syscall & ~PAGE_MASK)) {
+ up_write(¤t->mm->mmap_sem);
-+ if (vma) kmem_cache_free(vm_area_cachep, vma);
++ if (vma)
++ kmem_cache_free(vm_area_cachep, vma);
+ return 1;
+ }
+
@@ -1400,14 +1380,16 @@
+ if (current->mm->call_syscall) {
+ call_syscall = current->mm->call_syscall;
+ up_write(¤t->mm->mmap_sem);
-+ if (vma) kmem_cache_free(vm_area_cachep, vma);
++ if (vma)
++ kmem_cache_free(vm_area_cachep, vma);
+ goto rt_emulate;
+ }
+
+ call_syscall = get_unmapped_area(NULL, 0UL, PAGE_SIZE, 0UL, MAP_PRIVATE);
+ if (!vma || (call_syscall & ~PAGE_MASK)) {
+ up_write(¤t->mm->mmap_sem);
-+ if (vma) kmem_cache_free(vm_area_cachep, vma);
++ if (vma)
++ kmem_cache_free(vm_area_cachep, vma);
+ return 1;
+ }
+
@@ -1439,9 +1421,9 @@
+ for (i = 0; i < 5; i++) {
+ unsigned int c;
+ if (get_user(c, (unsigned int *)pc+i))
-+ printk("???????? ");
++ printk(KERN_CONT "???????? ");
+ else
-+ printk("%08x ", c);
++ printk(KERN_CONT "%08x ", c);
+ }
+ printk("\n");
+}
@@ -1450,7 +1432,7 @@
/*
* Check whether the instruction at regs->nip is a store using
* an update addressing form which will update r1.
-@@ -157,7 +520,7 @@ int __kprobes do_page_fault(struct pt_re
+@@ -157,7 +523,7 @@ int __kprobes do_page_fault(struct pt_re
* indicate errors in DSISR but can validly be set in SRR1.
*/
if (trap == 0x400)
@@ -1459,7 +1441,7 @@
else
is_write = error_code & DSISR_ISSTORE;
#else
-@@ -357,6 +720,37 @@ bad_area:
+@@ -355,6 +721,37 @@ bad_area:
bad_area_nosemaphore:
/* User mode accesses cause a SIGSEGV */
if (user_mode(regs)) {
@@ -1488,7 +1470,7 @@
+
+ }
+
-+ pax_report_fault(regs, (void*)regs->nip, (void*)regs->gpr[PT_R1]);
++ pax_report_fault(regs, (void *)regs->nip, (void *)regs->gpr[PT_R1]);
+ do_group_exit(SIGKILL);
+ }
+ }
@@ -1497,9 +1479,9 @@
_exception(SIGSEGV, regs, code, address);
return 0;
}
-diff -urNp linux-2.6.24.7/arch/powerpc/mm/mmap.c linux-2.6.24.7/arch/powerpc/mm/mmap.c
---- linux-2.6.24.7/arch/powerpc/mm/mmap.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/powerpc/mm/mmap.c 2008-05-06 17:49:04.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/powerpc/mm/mmap.c linux-2.6.25.4/arch/powerpc/mm/mmap.c
+--- linux-2.6.25.4/arch/powerpc/mm/mmap.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/powerpc/mm/mmap.c 2008-05-18 13:33:14.000000000 -0400
@@ -75,10 +75,22 @@ void arch_pick_mmap_layout(struct mm_str
*/
if (mmap_is_legacy()) {
@@ -1523,9 +1505,9 @@
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-2.6.24.7/arch/ppc/mm/fault.c linux-2.6.24.7/arch/ppc/mm/fault.c
---- linux-2.6.24.7/arch/ppc/mm/fault.c 2008-05-01 17:50:00.000000000 -0400
-+++ linux-2.6.24.7/arch/ppc/mm/fault.c 2008-05-06 17:49:04.000000000 -0400
+diff -urNp linux-2.6.25.4/arch/ppc/mm/fault.c linux-2.6.25.4/arch/ppc/mm/fault.c
+--- linux-2.6.25.4/arch/ppc/mm/fault.c 2008-05-15 11:00:12.000000000 -0400
++++ linux-2.6.25.4/arch/ppc/mm/fault.c 2008-05-18 13:33:14.000000000 -0400
@@ -25,6 +25,11 @@
#include <linux/interrupt.h>
#include <linux/highmem.h>
@@ -1538,7 +1520,7 @@
#include <asm/page.h>
#include <asm/pgtable.h>
-@@ -48,6 +53,363 @@ unsigned long pte_misses; /* updated by
+@@ -48,6 +53,366 @@ unsigned long pte_misses; /* updated by
unsigned long pte_errors; /* updated by do_page_fault() */
unsigned int probingmem;
@@ -1700,16 +1682,16 @@
+ unsigned long addr = b | 0xFC000000UL;
+
+ addr = regs->nip + 12 + ((addr ^ 0x02000000UL) + 0x02000000UL);
-+ err = get_user(addis, (unsigned int*)addr);
-+ err |= get_user(addi, (unsigned int*)(addr+4));
-+ err |= get_user(rlwinm, (unsigned int*)(addr+8));
-+ err |= get_user(add, (unsigned int*)(addr+12));
-+ err |= get_user(li2, (unsigned int*)(addr+16));
-+ err |= get_user(addis2, (unsigned int*)(addr+20));
-+ err |= get_user(mtctr, (unsigned int*)(addr+24));
-+ err |= get_user(li3, (unsigned int*)(addr+28));
-+ err |= get_user(addis3, (unsigned int*)(addr+32));
-+ err |= get_user(bctr, (unsigned int*)(addr+36));
++ err = get_user(addis, (unsigned int *)addr);
<<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.9&r2=1.1.2.10&f=u
More information about the pld-cvs-commit
mailing list