diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2012-10-30 21:41:49 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2012-10-30 21:47:57 -0400 |
commit | 816c520da7b92aaf0468201a56df25d646368cfe (patch) | |
tree | 8d1c584f7ed7d576b50632e6ad8cd559c102dc87 /2.6.32 | |
parent | Grsec/PaX: 2.9.1-2.6.32.60-201210252043 (diff) | |
download | hardened-patchset-816c520da7b92aaf0468201a56df25d646368cfe.tar.gz hardened-patchset-816c520da7b92aaf0468201a56df25d646368cfe.tar.bz2 hardened-patchset-816c520da7b92aaf0468201a56df25d646368cfe.zip |
Grsec/PaX: 2.9.1-{2.6.32.60,3.2.32,3.6.4}-20121029144620121029
Diffstat (limited to '2.6.32')
-rw-r--r-- | 2.6.32/0000_README | 2 | ||||
-rw-r--r-- | 2.6.32/4420_grsecurity-2.9.1-2.6.32.60-201210291444.patch (renamed from 2.6.32/4420_grsecurity-2.9.1-2.6.32.60-201210252043.patch) | 150 |
2 files changed, 88 insertions, 64 deletions
diff --git a/2.6.32/0000_README b/2.6.32/0000_README index b6ced4c..288d745 100644 --- a/2.6.32/0000_README +++ b/2.6.32/0000_README @@ -34,7 +34,7 @@ Patch: 1059_linux-2.6.32.60.patch From: http://www.kernel.org Desc: Linux 2.6.32.59 -Patch: 4420_grsecurity-2.9.1-2.6.32.60-201210252043.patch +Patch: 4420_grsecurity-2.9.1-2.6.32.60-201210291444.patch From: http://www.grsecurity.net Desc: hardened-sources base patch from upstream grsecurity diff --git a/2.6.32/4420_grsecurity-2.9.1-2.6.32.60-201210252043.patch b/2.6.32/4420_grsecurity-2.9.1-2.6.32.60-201210291444.patch index 163e0f6..489cffc 100644 --- a/2.6.32/4420_grsecurity-2.9.1-2.6.32.60-201210252043.patch +++ b/2.6.32/4420_grsecurity-2.9.1-2.6.32.60-201210291444.patch @@ -5317,7 +5317,7 @@ index 9b86681..c5140db 100644 #define __read_mostly __attribute__((__section__(".data.read_mostly"))) diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h -index e885442..5b0c9aa 100644 +index e885442..5b0c9aa3 100644 --- a/arch/s390/include/asm/elf.h +++ b/arch/s390/include/asm/elf.h @@ -164,6 +164,13 @@ extern unsigned int vdso_enabled; @@ -18897,7 +18897,7 @@ index 4f8e250..df24706 100644 #ifdef CONFIG_BLK_DEV_INITRD /* Reserve INITRD */ diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S -index 34c3308..6fc4e76 100644 +index 34c3308..162120a 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S @@ -19,10 +19,17 @@ @@ -18961,7 +18961,7 @@ index 34c3308..6fc4e76 100644 /* test KEEP_SEGMENTS flag to see if the bootloader is asking us to not reload segments */ testb $(1<<6), BP_loadflags(%esi) -@@ -95,7 +113,60 @@ ENTRY(startup_32) +@@ -95,7 +113,62 @@ ENTRY(startup_32) movl %eax,%es movl %eax,%fs movl %eax,%gs @@ -18972,13 +18972,13 @@ index 34c3308..6fc4e76 100644 +#ifdef CONFIG_SMP + movl $pa(cpu_gdt_table),%edi + movl $__per_cpu_load,%eax -+ movw %ax,__KERNEL_PERCPU + 2(%edi) ++ movw %ax,GDT_ENTRY_PERCPU * 8 + 2(%edi) + rorl $16,%eax -+ movb %al,__KERNEL_PERCPU + 4(%edi) -+ movb %ah,__KERNEL_PERCPU + 7(%edi) ++ movb %al,GDT_ENTRY_PERCPU * 8 + 4(%edi) ++ movb %ah,GDT_ENTRY_PERCPU * 8 + 7(%edi) + movl $__per_cpu_end - 1,%eax + subl $__per_cpu_start,%eax -+ movw %ax,__KERNEL_PERCPU + 0(%edi) ++ movw %ax,GDT_ENTRY_PERCPU * 8 + 0(%edi) +#endif + +#ifdef CONFIG_PAX_MEMORY_UDEREF @@ -18995,10 +18995,10 @@ index 34c3308..6fc4e76 100644 +#ifdef CONFIG_PAX_KERNEXEC + movl $pa(boot_gdt),%edi + movl $__LOAD_PHYSICAL_ADDR,%eax -+ movw %ax,__BOOT_CS + 2(%edi) ++ movw %ax,GDT_ENTRY_BOOT_CS * 8 + 2(%edi) + rorl $16,%eax -+ movb %al,__BOOT_CS + 4(%edi) -+ movb %ah,__BOOT_CS + 7(%edi) ++ movb %al,GDT_ENTRY_BOOT_CS * 8 + 4(%edi) ++ movb %ah,GDT_ENTRY_BOOT_CS * 8 + 7(%edi) + rorl $16,%eax + + ljmp $(__BOOT_CS),$1f @@ -19008,13 +19008,15 @@ index 34c3308..6fc4e76 100644 + movl $pa(cpu_gdt_table),%edi + addl $__PAGE_OFFSET,%eax +1: -+ movw %ax,__KERNEL_CS + 2(%edi) -+ movw %ax,__KERNEXEC_KERNEL_CS + 2(%edi) ++ movb $0xc0,GDT_ENTRY_KERNEL_CS * 8 + 6(%edi) ++ movb $0xc0,GDT_ENTRY_KERNEXEC_KERNEL_CS * 8 + 6(%edi) ++ movw %ax,GDT_ENTRY_KERNEL_CS * 8 + 2(%edi) ++ movw %ax,GDT_ENTRY_KERNEXEC_KERNEL_CS * 8 + 2(%edi) + rorl $16,%eax -+ movb %al,__KERNEL_CS + 4(%edi) -+ movb %al,__KERNEXEC_KERNEL_CS + 4(%edi) -+ movb %ah,__KERNEL_CS + 7(%edi) -+ movb %ah,__KERNEXEC_KERNEL_CS + 7(%edi) ++ movb %al,GDT_ENTRY_KERNEL_CS * 8 + 4(%edi) ++ movb %al,GDT_ENTRY_KERNEXEC_KERNEL_CS * 8 + 4(%edi) ++ movb %ah,GDT_ENTRY_KERNEL_CS * 8 + 7(%edi) ++ movb %ah,GDT_ENTRY_KERNEXEC_KERNEL_CS * 8 + 7(%edi) + rorl $16,%eax + addl $PAGE_SIZE_asm,%edi + loop 1b @@ -19022,7 +19024,7 @@ index 34c3308..6fc4e76 100644 /* * Clear BSS first so that there are no surprises... -@@ -140,9 +211,7 @@ ENTRY(startup_32) +@@ -140,9 +213,7 @@ ENTRY(startup_32) cmpl $num_subarch_entries, %eax jae bad_subarch @@ -19033,7 +19035,7 @@ index 34c3308..6fc4e76 100644 bad_subarch: WEAK(lguest_entry) -@@ -154,10 +223,10 @@ WEAK(xen_entry) +@@ -154,10 +225,10 @@ WEAK(xen_entry) __INITDATA subarch_entries: @@ -19048,7 +19050,7 @@ index 34c3308..6fc4e76 100644 num_subarch_entries = (. - subarch_entries) / 4 .previous #endif /* CONFIG_PARAVIRT */ -@@ -218,8 +287,11 @@ default_entry: +@@ -218,8 +289,11 @@ default_entry: movl %eax, pa(max_pfn_mapped) /* Do early initialization of the fixmap area */ @@ -19062,7 +19064,7 @@ index 34c3308..6fc4e76 100644 #else /* Not PAE */ page_pde_offset = (__PAGE_OFFSET >> 20); -@@ -249,8 +321,11 @@ page_pde_offset = (__PAGE_OFFSET >> 20); +@@ -249,8 +323,11 @@ page_pde_offset = (__PAGE_OFFSET >> 20); movl %eax, pa(max_pfn_mapped) /* Do early initialization of the fixmap area */ @@ -19076,7 +19078,7 @@ index 34c3308..6fc4e76 100644 #endif jmp 3f /* -@@ -272,6 +347,9 @@ ENTRY(startup_32_smp) +@@ -272,6 +349,9 @@ ENTRY(startup_32_smp) movl %eax,%es movl %eax,%fs movl %eax,%gs @@ -19086,7 +19088,7 @@ index 34c3308..6fc4e76 100644 #endif /* CONFIG_SMP */ 3: -@@ -297,6 +375,7 @@ ENTRY(startup_32_smp) +@@ -297,6 +377,7 @@ ENTRY(startup_32_smp) orl %edx,%eax movl %eax,%cr4 @@ -19094,7 +19096,7 @@ index 34c3308..6fc4e76 100644 btl $5, %eax # check if PAE is enabled jnc 6f -@@ -305,6 +384,10 @@ ENTRY(startup_32_smp) +@@ -305,6 +386,10 @@ ENTRY(startup_32_smp) cpuid cmpl $0x80000000, %eax jbe 6f @@ -19105,7 +19107,7 @@ index 34c3308..6fc4e76 100644 mov $0x80000001, %eax cpuid /* Execute Disable bit supported? */ -@@ -312,13 +395,17 @@ ENTRY(startup_32_smp) +@@ -312,13 +397,17 @@ ENTRY(startup_32_smp) jnc 6f /* Setup EFER (Extended Feature Enable Register) */ @@ -19124,7 +19126,7 @@ index 34c3308..6fc4e76 100644 6: /* -@@ -331,8 +418,8 @@ ENTRY(startup_32_smp) +@@ -331,8 +420,8 @@ ENTRY(startup_32_smp) movl %eax,%cr0 /* ..and set paging (PG) bit */ ljmp $__BOOT_CS,$1f /* Clear prefetch and normalize %eip */ 1: @@ -19135,7 +19137,7 @@ index 34c3308..6fc4e76 100644 /* * Initialize eflags. Some BIOS's leave bits like NT set. This would -@@ -344,9 +431,7 @@ ENTRY(startup_32_smp) +@@ -344,9 +433,7 @@ ENTRY(startup_32_smp) #ifdef CONFIG_SMP cmpb $0, ready @@ -19146,7 +19148,7 @@ index 34c3308..6fc4e76 100644 #endif /* CONFIG_SMP */ /* -@@ -424,7 +509,7 @@ is386: movl $2,%ecx # set MP +@@ -424,7 +511,7 @@ is386: movl $2,%ecx # set MP 1: movl $(__KERNEL_DS),%eax # reload all the segment registers movl %eax,%ss # after changing gdt. @@ -19155,7 +19157,7 @@ index 34c3308..6fc4e76 100644 movl %eax,%ds movl %eax,%es -@@ -438,15 +523,22 @@ is386: movl $2,%ecx # set MP +@@ -438,15 +525,22 @@ is386: movl $2,%ecx # set MP */ cmpb $0,ready jne 1f @@ -19180,7 +19182,7 @@ index 34c3308..6fc4e76 100644 movl %eax,%gs xorl %eax,%eax # Clear LDT -@@ -454,14 +546,7 @@ is386: movl $2,%ecx # set MP +@@ -454,14 +548,7 @@ is386: movl $2,%ecx # set MP cld # gcc2 wants the direction flag cleared at all times pushl $0 # fake return address for unwinder @@ -19195,7 +19197,7 @@ index 34c3308..6fc4e76 100644 jmp *(initial_code) /* -@@ -546,22 +631,22 @@ early_page_fault: +@@ -546,22 +633,22 @@ early_page_fault: jmp early_fault early_fault: @@ -19223,7 +19225,7 @@ index 34c3308..6fc4e76 100644 hlt_loop: hlt jmp hlt_loop -@@ -569,8 +654,11 @@ hlt_loop: +@@ -569,8 +656,11 @@ hlt_loop: /* This is the default interrupt "handler" :-) */ ALIGN ignore_int: @@ -19236,7 +19238,7 @@ index 34c3308..6fc4e76 100644 pushl %eax pushl %ecx pushl %edx -@@ -579,9 +667,6 @@ ignore_int: +@@ -579,9 +669,6 @@ ignore_int: movl $(__KERNEL_DS),%eax movl %eax,%ds movl %eax,%es @@ -19246,7 +19248,7 @@ index 34c3308..6fc4e76 100644 pushl 16(%esp) pushl 24(%esp) pushl 32(%esp) -@@ -600,6 +685,8 @@ ignore_int: +@@ -600,6 +687,8 @@ ignore_int: #endif iret @@ -19255,7 +19257,7 @@ index 34c3308..6fc4e76 100644 __REFDATA .align 4 ENTRY(initial_code) -@@ -610,31 +697,47 @@ ENTRY(initial_page_table) +@@ -610,31 +699,47 @@ ENTRY(initial_page_table) /* * BSS section */ @@ -19308,7 +19310,7 @@ index 34c3308..6fc4e76 100644 ENTRY(swapper_pg_dir) .long pa(swapper_pg_pmd+PGD_IDENT_ATTR),0 /* low identity map */ # if KPMDS == 3 -@@ -653,15 +756,24 @@ ENTRY(swapper_pg_dir) +@@ -653,15 +758,24 @@ ENTRY(swapper_pg_dir) # error "Kernel PMDs should be 1, 2 or 3" # endif .align PAGE_SIZE_asm /* needs to be page-sized too */ @@ -19335,7 +19337,7 @@ index 34c3308..6fc4e76 100644 early_recursion_flag: .long 0 -@@ -697,7 +809,7 @@ fault_msg: +@@ -697,7 +811,7 @@ fault_msg: .word 0 # 32 bit align gdt_desc.address boot_gdt_descr: .word __BOOT_DS+7 @@ -19344,7 +19346,7 @@ index 34c3308..6fc4e76 100644 .word 0 # 32-bit align idt_desc.address idt_descr: -@@ -708,7 +820,7 @@ idt_descr: +@@ -708,7 +822,7 @@ idt_descr: .word 0 # 32 bit align gdt_desc.address ENTRY(early_gdt_descr) .word GDT_ENTRIES*8-1 @@ -19353,7 +19355,7 @@ index 34c3308..6fc4e76 100644 /* * The boot_gdt must mirror the equivalent in setup.S and is -@@ -717,5 +829,65 @@ ENTRY(early_gdt_descr) +@@ -717,5 +831,65 @@ ENTRY(early_gdt_descr) .align L1_CACHE_BYTES ENTRY(boot_gdt) .fill GDT_ENTRY_BOOT_CS,8,0 @@ -27115,7 +27117,7 @@ index f46c3407..f7e72b0 100644 } if (mm->get_unmapped_area == arch_get_unmapped_area) diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c -index 73ffd55..2cb04d8 100644 +index 73ffd55..5c2a82a 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -13,6 +13,7 @@ @@ -27181,7 +27183,7 @@ index 73ffd55..2cb04d8 100644 if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) return 0; if (!page_is_ram(pagenr)) -@@ -377,8 +396,116 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) +@@ -377,8 +396,117 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) #endif } @@ -27235,6 +27237,7 @@ index 73ffd55..2cb04d8 100644 + for (cpu = 0; cpu < nr_cpu_ids; cpu++) { + pack_descriptor(&d, get_desc_base(&get_cpu_gdt_table(cpu)[GDT_ENTRY_KERNEL_CS]), limit, 0x9B, 0xC); + write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_KERNEL_CS, &d, DESCTYPE_S); ++ write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_KERNEXEC_KERNEL_CS, &d, DESCTYPE_S); + } + + /* PaX: make KERNEL_CS read-only */ @@ -74298,7 +74301,7 @@ index 0133b5a..3710d09 100644 (unsigned long) create_aout_tables((char __user *) bprm->p, bprm); #ifdef __alpha__ diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c -index a64fde6..1535e95 100644 +index a64fde6..89649d4 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -31,6 +31,7 @@ @@ -74395,7 +74398,13 @@ index a64fde6..1535e95 100644 return -EFAULT; return 0; } -@@ -385,10 +406,10 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, +@@ -380,15 +401,14 @@ static unsigned long total_mapping_size(struct elf_phdr *cmds, int nr) + an ELF header */ + + static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, +- struct file *interpreter, unsigned long *interp_map_addr, +- unsigned long no_base) ++ struct file *interpreter, unsigned long no_base) { struct elf_phdr *elf_phdata; struct elf_phdr *eppnt; @@ -74408,7 +74417,7 @@ index a64fde6..1535e95 100644 unsigned long total_size; int retval, i, size; -@@ -434,6 +455,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, +@@ -434,6 +454,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, goto out_close; } @@ -74420,7 +74429,16 @@ index a64fde6..1535e95 100644 eppnt = elf_phdata; for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) { if (eppnt->p_type == PT_LOAD) { -@@ -477,8 +503,8 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, +@@ -457,8 +482,6 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, + map_addr = elf_map(interpreter, load_addr + vaddr, + eppnt, elf_prot, elf_type, total_size); + total_size = 0; +- if (!*interp_map_addr) +- *interp_map_addr = map_addr; + error = map_addr; + if (BAD_ADDR(map_addr)) + goto out_close; +@@ -477,8 +500,8 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, k = load_addr + eppnt->p_vaddr; if (BAD_ADDR(k) || eppnt->p_filesz > eppnt->p_memsz || @@ -74431,7 +74449,7 @@ index a64fde6..1535e95 100644 error = -ENOMEM; goto out_close; } -@@ -532,6 +558,311 @@ out: +@@ -532,6 +555,311 @@ out: return error; } @@ -74743,7 +74761,7 @@ index a64fde6..1535e95 100644 /* * These are the functions used to load ELF style executables and shared * libraries. There is no binary dependent code anywhere else. -@@ -548,6 +879,11 @@ static unsigned long randomize_stack_top(unsigned long stack_top) +@@ -548,6 +876,11 @@ static unsigned long randomize_stack_top(unsigned long stack_top) { unsigned int random_variable = 0; @@ -74755,7 +74773,7 @@ index a64fde6..1535e95 100644 if ((current->flags & PF_RANDOMIZE) && !(current->personality & ADDR_NO_RANDOMIZE)) { random_variable = get_random_int() & STACK_RND_MASK; -@@ -566,7 +902,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) +@@ -566,7 +899,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) unsigned long load_addr = 0, load_bias = 0; int load_addr_set = 0; char * elf_interpreter = NULL; @@ -74764,7 +74782,7 @@ index a64fde6..1535e95 100644 struct elf_phdr *elf_ppnt, *elf_phdata; unsigned long elf_bss, elf_brk; int retval, i; -@@ -576,11 +912,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) +@@ -576,11 +909,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) unsigned long start_code, end_code, start_data, end_data; unsigned long reloc_func_desc = 0; int executable_stack = EXSTACK_DEFAULT; @@ -74777,7 +74795,7 @@ index a64fde6..1535e95 100644 loc = kmalloc(sizeof(*loc), GFP_KERNEL); if (!loc) { -@@ -718,11 +1054,80 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) +@@ -718,11 +1051,80 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) /* OK, This is the point of no return */ current->flags &= ~PF_FORKNOEXEC; @@ -74859,7 +74877,7 @@ index a64fde6..1535e95 100644 if (elf_read_implies_exec(loc->elf_ex, executable_stack)) current->personality |= READ_IMPLIES_EXEC; -@@ -800,10 +1205,27 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) +@@ -800,10 +1202,27 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) * might try to exec. This is because the brk will * follow the loader, and is not movable. */ #ifdef CONFIG_X86 @@ -74888,7 +74906,7 @@ index a64fde6..1535e95 100644 } error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, -@@ -836,9 +1258,9 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) +@@ -836,9 +1255,9 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) * allowed task size. Note that p_filesz must always be * <= p_memsz so it is only necessary to check p_memsz. */ @@ -74901,7 +74919,7 @@ index a64fde6..1535e95 100644 /* set_brk can never work. Avoid overflows. */ send_sig(SIGKILL, current, 0); retval = -EINVAL; -@@ -877,11 +1299,40 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) +@@ -877,17 +1296,43 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) goto out_free_dentry; } if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) { @@ -74943,9 +74961,15 @@ index a64fde6..1535e95 100644 +#endif + if (elf_interpreter) { - unsigned long uninitialized_var(interp_map_addr); - -@@ -1112,8 +1563,10 @@ static int dump_seek(struct file *file, loff_t off) +- unsigned long uninitialized_var(interp_map_addr); +- + elf_entry = load_elf_interp(&loc->interp_elf_ex, + interpreter, +- &interp_map_addr, + load_bias); + if (!IS_ERR((void *)elf_entry)) { + /* +@@ -1112,8 +1557,10 @@ static int dump_seek(struct file *file, loff_t off) unsigned long n = off; if (n > PAGE_SIZE) n = PAGE_SIZE; @@ -74957,7 +74981,7 @@ index a64fde6..1535e95 100644 off -= n; } free_page((unsigned long)buf); -@@ -1125,7 +1578,7 @@ static int dump_seek(struct file *file, loff_t off) +@@ -1125,7 +1572,7 @@ static int dump_seek(struct file *file, loff_t off) * Decide what to dump of a segment, part, all or none. */ static unsigned long vma_dump_size(struct vm_area_struct *vma, @@ -74966,7 +74990,7 @@ index a64fde6..1535e95 100644 { #define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type)) -@@ -1159,7 +1612,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma, +@@ -1159,7 +1606,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma, if (vma->vm_file == NULL) return 0; @@ -74975,7 +74999,7 @@ index a64fde6..1535e95 100644 goto whole; /* -@@ -1255,8 +1708,11 @@ static int writenote(struct memelfnote *men, struct file *file, +@@ -1255,8 +1702,11 @@ static int writenote(struct memelfnote *men, struct file *file, #undef DUMP_WRITE #define DUMP_WRITE(addr, nr) \ @@ -74988,7 +75012,7 @@ index a64fde6..1535e95 100644 static void fill_elf_header(struct elfhdr *elf, int segs, u16 machine, u32 flags, u8 osabi) -@@ -1385,9 +1841,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm) +@@ -1385,9 +1835,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm) { elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv; int i = 0; @@ -75000,7 +75024,7 @@ index a64fde6..1535e95 100644 fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv); } -@@ -1973,7 +2429,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un +@@ -1973,7 +2423,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un phdr.p_offset = offset; phdr.p_vaddr = vma->vm_start; phdr.p_paddr = 0; @@ -75009,7 +75033,7 @@ index a64fde6..1535e95 100644 phdr.p_memsz = vma->vm_end - vma->vm_start; offset += phdr.p_filesz; phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0; -@@ -2006,7 +2462,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un +@@ -2006,7 +2456,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un unsigned long addr; unsigned long end; @@ -75018,7 +75042,7 @@ index a64fde6..1535e95 100644 for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) { struct page *page; -@@ -2015,6 +2471,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un +@@ -2015,6 +2465,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un page = get_dump_page(addr); if (page) { void *kaddr = kmap(page); @@ -75026,7 +75050,7 @@ index a64fde6..1535e95 100644 stop = ((size += PAGE_SIZE) > limit) || !dump_write(file, kaddr, PAGE_SIZE); kunmap(page); -@@ -2042,6 +2499,97 @@ out: +@@ -2042,6 +2493,97 @@ out: #endif /* USE_ELF_CORE_DUMP */ |