Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 239375 Details for
Bug 328941
sys-kernel/hardened-sources-2.6.32-r11: outdated grsec-patch
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Interdiff.txt
interdiff.txt (text/plain), 9.29 KB, created by
cilly
on 2010-07-19 12:07:29 UTC
(
hide
)
Description:
Interdiff.txt
Filename:
MIME Type:
Creator:
cilly
Created:
2010-07-19 12:07:29 UTC
Size:
9.29 KB
patch
obsolete
>diff -bBwu linux-2.6.32.16/arch/x86/include/asm/pgtable_types.h linux-2.6.32.16/arch/x86/include/asm/pgtable_types.h >--- linux-2.6.32.16/arch/x86/include/asm/pgtable_types.h 2010-07-09 14:50:35.000000000 -0400 >+++ linux-2.6.32.16/arch/x86/include/asm/pgtable_types.h 2010-07-16 21:06:43.000000000 -0400 >@@ -205,7 +205,17 @@ > { > return native_pgd_val(pgd) & PTE_FLAGS_MASK; > } >+#endif >+ >+#if PAGETABLE_LEVELS == 3 >+#include <asm-generic/pgtable-nopud.h> >+#endif > >+#if PAGETABLE_LEVELS == 2 >+#include <asm-generic/pgtable-nopmd.h> >+#endif >+ >+#ifndef __ASSEMBLY__ > #if PAGETABLE_LEVELS > 3 > typedef struct { pudval_t pud; } pud_t; > >@@ -219,8 +229,6 @@ > return pud.pud; > } > #else >-#include <asm-generic/pgtable-nopud.h> >- > static inline pudval_t native_pud_val(pud_t pud) > { > return native_pgd_val(pud.pgd); >@@ -240,8 +248,6 @@ > return pmd.pmd; > } > #else >-#include <asm-generic/pgtable-nopmd.h> >- > static inline pmdval_t native_pmd_val(pmd_t pmd) > { > return native_pgd_val(pmd.pud.pgd); >diff -bBwu linux-2.6.32.16/arch/x86/lib/putuser.S linux-2.6.32.16/arch/x86/lib/putuser.S >--- linux-2.6.32.16/arch/x86/lib/putuser.S 2010-07-11 20:00:44.000000000 -0400 >+++ linux-2.6.32.16/arch/x86/lib/putuser.S 2010-07-16 21:06:43.000000000 -0400 >@@ -34,6 +34,12 @@ > #define EXIT ret ; \ > CFI_ENDPROC > >+#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF) >+#define _DEST %_ASM_CX,%_ASM_BX >+#else >+#define _DEST %_ASM_CX >+#endif >+ > .text > ENTRY(__put_user_1) > ENTER >@@ -49,14 +55,14 @@ > #if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF) > mov $PAX_USER_SHADOW_BASE,%_ASM_BX > cmp %_ASM_BX,%_ASM_CX >- jae 1234f >- add %_ASM_BX,%_ASM_CX >+ jb 1234f >+ xor %ebx,%ebx > 1234: > #endif > > #endif > >-1: movb %al,(%_ASM_CX) >+1: movb %al,(_DEST) > > #if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF) > pushl %ss >@@ -83,14 +89,14 @@ > #if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF) > mov $PAX_USER_SHADOW_BASE,%_ASM_BX > cmp %_ASM_BX,%_ASM_CX >- jae 1234f >- add %_ASM_BX,%_ASM_CX >+ jb 1234f >+ xor %ebx,%ebx > 1234: > #endif > > #endif > >-2: movw %ax,(%_ASM_CX) >+2: movw %ax,(_DEST) > > #if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF) > pushl %ss >@@ -117,14 +123,14 @@ > #if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF) > mov $PAX_USER_SHADOW_BASE,%_ASM_BX > cmp %_ASM_BX,%_ASM_CX >- jae 1234f >- add %_ASM_BX,%_ASM_CX >+ jb 1234f >+ xor %ebx,%ebx > 1234: > #endif > > #endif > >-3: movl %eax,(%_ASM_CX) >+3: movl %eax,(_DEST) > > #if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF) > pushl %ss >@@ -151,16 +157,16 @@ > #if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF) > mov $PAX_USER_SHADOW_BASE,%_ASM_BX > cmp %_ASM_BX,%_ASM_CX >- jae 1234f >- add %_ASM_BX,%_ASM_CX >+ jb 1234f >+ xor %ebx,%ebx > 1234: > #endif > > #endif > >-4: mov %_ASM_AX,(%_ASM_CX) >+4: mov %_ASM_AX,(_DEST) > #ifdef CONFIG_X86_32 >-5: movl %edx,4(%_ASM_CX) >+5: movl %edx,4(_DEST) > #endif > > #if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF) >diff -bBwu linux-2.6.32.16/arch/x86/mm/pat.c linux-2.6.32.16/arch/x86/mm/pat.c >--- linux-2.6.32.16/arch/x86/mm/pat.c 2010-07-09 14:50:35.000000000 -0400 >+++ linux-2.6.32.16/arch/x86/mm/pat.c 2010-07-16 21:06:43.000000000 -0400 >@@ -689,8 +689,8 @@ > while (cursor < to) { > if (!devmem_is_allowed(pfn)) { > printk(KERN_INFO >- "Program %s tried to access /dev/mem between %Lx->%Lx.\n", >- current->comm, from, to); >+ "Program %s tried to access /dev/mem between %Lx->%Lx (%Lx).\n", >+ current->comm, from, to, cursor); > return 0; > } > cursor += PAGE_SIZE; >diff -bBwu linux-2.6.32.16/Documentation/dontdiff linux-2.6.32.16/Documentation/dontdiff >--- linux-2.6.32.16/Documentation/dontdiff 2010-07-09 14:50:35.000000000 -0400 >+++ linux-2.6.32.16/Documentation/dontdiff 2010-07-16 21:06:43.000000000 -0400 >@@ -39,6 +39,7 @@ > *.tab.h > *.tex > *.ver >+*.vim > *.xml > *_MODULES > *_reg_safe.h >@@ -171,6 +172,7 @@ > raid6altivec*.c > raid6int*.c > raid6tables.c >+regdb.c > relocs > series > setup >diff -bBwu linux-2.6.32.16/mm/mmap.c linux-2.6.32.16/mm/mmap.c >--- linux-2.6.32.16/mm/mmap.c 2010-07-09 14:50:38.000000000 -0400 >+++ linux-2.6.32.16/mm/mmap.c 2010-07-16 21:06:43.000000000 -0400 >@@ -1035,18 +1035,14 @@ > vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) | > mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; > >-#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC) >- if (mm->pax_flags & (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) { >- > #ifdef CONFIG_PAX_MPROTECT > if (mm->pax_flags & MF_PAX_MPROTECT) { >- if ((prot & (PROT_WRITE | PROT_EXEC)) != PROT_EXEC) >- vm_flags &= ~(VM_EXEC | VM_MAYEXEC); >+ if ((prot & (PROT_WRITE | PROT_EXEC)) == (PROT_WRITE | PROT_EXEC)) >+ return -EPERM; >+ if (!(prot & PROT_EXEC)) >+ vm_flags &= ~VM_MAYEXEC; > else >- vm_flags &= ~(VM_WRITE | VM_MAYWRITE); >- } >-#endif >- >+ vm_flags &= ~VM_MAYWRITE; > } > #endif > >@@ -2693,10 +2689,12 @@ > > #ifdef CONFIG_PAX_MPROTECT > if (mm->pax_flags & MF_PAX_MPROTECT) { >- if ((vm_flags & (VM_WRITE | VM_EXEC)) != VM_EXEC) >- vm_flags &= ~(VM_EXEC | VM_MAYEXEC); >+ if ((vm_flags & (VM_WRITE | VM_EXEC)) == (VM_WRITE | VM_EXEC)) >+ return -EPERM; >+ if (!(vm_flags & VM_EXEC)) >+ vm_flags &= ~VM_MAYEXEC; > else >- vm_flags &= ~(VM_WRITE | VM_MAYWRITE); >+ vm_flags &= ~VM_MAYWRITE; > } > #endif > >only in patch2: >--- linux-2.6.32.16/include/asm-generic/pgtable-nopmd.h 2010-07-05 14:14:00.000000000 -0400 >+++ linux-2.6.32.16/include/asm-generic/pgtable-nopmd.h 2010-07-16 21:06:43.000000000 -0400 >@@ -3,10 +3,15 @@ > >-#ifndef __ASSEMBLY__ >- > #include <asm-generic/pgtable-nopud.h> > >-struct mm_struct; >- > #define __PAGETABLE_PMD_FOLDED > >+#define PMD_SHIFT PUD_SHIFT >+#define PTRS_PER_PMD 1 >+#define PMD_SIZE (_AC(1,UL) << PMD_SHIFT) >+#define PMD_MASK (~(PMD_SIZE-1)) >+ >+#ifndef __ASSEMBLY__ >+ >+struct mm_struct; >+ > /* >@@ -18,7 +23,2 @@ > >-#define PMD_SHIFT PUD_SHIFT >-#define PTRS_PER_PMD 1 >-#define PMD_SIZE (1UL << PMD_SHIFT) >-#define PMD_MASK (~(PMD_SIZE-1)) >- > /* >only in patch2: >--- linux-2.6.32.16/include/asm-generic/pgtable-nopud.h 2010-07-05 14:14:00.000000000 -0400 >+++ linux-2.6.32.16/include/asm-generic/pgtable-nopud.h 2010-07-16 21:06:43.000000000 -0400 >@@ -3,6 +3,11 @@ > >-#ifndef __ASSEMBLY__ >- > #define __PAGETABLE_PUD_FOLDED > >+#define PUD_SHIFT PGDIR_SHIFT >+#define PTRS_PER_PUD 1 >+#define PUD_SIZE (_AC(1,UL) << PUD_SHIFT) >+#define PUD_MASK (~(PUD_SIZE-1)) >+ >+#ifndef __ASSEMBLY__ >+ > /* >@@ -14,7 +19,2 @@ > >-#define PUD_SHIFT PGDIR_SHIFT >-#define PTRS_PER_PUD 1 >-#define PUD_SIZE (1UL << PUD_SHIFT) >-#define PUD_MASK (~(PUD_SIZE-1)) >- > /* >only in patch2: >--- linux-2.6.32.16/include/linux/mmzone.h 2010-07-05 14:14:00.000000000 -0400 >+++ linux-2.6.32.16/include/linux/mmzone.h 2010-07-16 21:06:43.000000000 -0400 >@@ -345,3 +345,3 @@ > /* Zone statistics */ >- atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; >+ atomic_long_unchecked_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; > >only in patch2: >--- linux-2.6.32.16/include/linux/vmstat.h 2010-07-05 14:14:00.000000000 -0400 >+++ linux-2.6.32.16/include/linux/vmstat.h 2010-07-16 21:06:43.000000000 -0400 >@@ -138,3 +138,3 @@ > */ >-extern atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; >+extern atomic_long_unchecked_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; > >@@ -143,4 +143,4 @@ > { >- atomic_long_add(x, &zone->vm_stat[item]); >- atomic_long_add(x, &vm_stat[item]); >+ atomic_long_add_unchecked(x, &zone->vm_stat[item]); >+ atomic_long_add_unchecked(x, &vm_stat[item]); > } >@@ -149,3 +149,3 @@ > { >- long x = atomic_long_read(&vm_stat[item]); >+ long x = atomic_long_read_unchecked(&vm_stat[item]); > #ifdef CONFIG_SMP >@@ -160,3 +160,3 @@ > { >- long x = atomic_long_read(&zone->vm_stat[item]); >+ long x = atomic_long_read_unchecked(&zone->vm_stat[item]); > #ifdef CONFIG_SMP >@@ -244,4 +244,4 @@ > { >- atomic_long_inc(&zone->vm_stat[item]); >- atomic_long_inc(&vm_stat[item]); >+ atomic_long_inc_unchecked(&zone->vm_stat[item]); >+ atomic_long_inc_unchecked(&vm_stat[item]); > } >@@ -256,4 +256,4 @@ > { >- atomic_long_dec(&zone->vm_stat[item]); >- atomic_long_dec(&vm_stat[item]); >+ atomic_long_dec_unchecked(&zone->vm_stat[item]); >+ atomic_long_dec_unchecked(&vm_stat[item]); > } >only in patch2: >--- linux-2.6.32.16/mm/vmstat.c 2010-07-05 14:14:00.000000000 -0400 >+++ linux-2.6.32.16/mm/vmstat.c 2010-07-16 21:06:43.000000000 -0400 >@@ -76,3 +76,3 @@ > */ >-atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; >+atomic_long_unchecked_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; > EXPORT_SYMBOL(vm_stat); >@@ -313,3 +313,3 @@ > local_irq_restore(flags); >- atomic_long_add(v, &zone->vm_stat[i]); >+ atomic_long_add_unchecked(v, &zone->vm_stat[i]); > global_diff[i] += v; >@@ -351,3 +351,3 @@ > if (global_diff[i]) >- atomic_long_add(global_diff[i], &vm_stat[i]); >+ atomic_long_add_unchecked(global_diff[i], &vm_stat[i]); > } >@@ -942,6 +942,12 @@ > #ifdef CONFIG_PROC_FS >- proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations); >- proc_create("pagetypeinfo", S_IRUGO, NULL, &pagetypeinfo_file_ops); >- proc_create("vmstat", S_IRUGO, NULL, &proc_vmstat_file_operations); >- proc_create("zoneinfo", S_IRUGO, NULL, &proc_zoneinfo_file_operations); >+ { >+ mode_t gr_mode = S_IRUGO; >+#ifdef CONFIG_GRKERNSEC_PROC_ADD >+ gr_mode = S_IRUSR; >+#endif >+ proc_create("buddyinfo", gr_mode, NULL, &fragmentation_file_operations); >+ proc_create("pagetypeinfo", gr_mode, NULL, &pagetypeinfo_file_ops); >+ proc_create("vmstat", gr_mode, NULL, &proc_vmstat_file_operations); >+ proc_create("zoneinfo", gr_mode, NULL, &proc_zoneinfo_file_operations); >+ } > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 328941
: 239375