diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-10-31 07:30:09 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-10-31 07:30:58 +0000 |
commit | d32349577e7de396337c3d64aff9514d8aa453c8 (patch) | |
tree | 7fc7044d9bb6603c384af760bc3c88e80e17ff69 | |
parent | 687fbb1c76df4c66ac6bc6243132cd2113a86e8f (diff) | |
download | alpine_aports-d32349577e7de396337c3d64aff9514d8aa453c8.tar.bz2 alpine_aports-d32349577e7de396337c3d64aff9514d8aa453c8.tar.xz alpine_aports-d32349577e7de396337c3d64aff9514d8aa453c8.zip |
main/linux-grsec: upgrade grsecurity-2.9.1-3.6.4-201210291446
-rw-r--r-- | main/linux-grsec/APKBUILD | 8 | ||||
-rw-r--r-- | main/linux-grsec/grsecurity-2.9.1-3.6.4-201210291446.patch (renamed from main/linux-grsec/grsecurity-2.9.1-3.6.3-201210231942.patch) | 337 |
2 files changed, 166 insertions, 179 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD index 53f7802d6c..a2d9cc1648 100644 --- a/main/linux-grsec/APKBUILD +++ b/main/linux-grsec/APKBUILD | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | _flavor=grsec | 3 | _flavor=grsec |
4 | pkgname=linux-${_flavor} | 4 | pkgname=linux-${_flavor} |
5 | pkgver=3.6.3 | 5 | pkgver=3.6.4 |
6 | _kernver=3.6 | 6 | _kernver=3.6 |
7 | pkgrel=0 | 7 | pkgrel=0 |
8 | pkgdesc="Linux kernel with grsecurity" | 8 | pkgdesc="Linux kernel with grsecurity" |
@@ -14,7 +14,7 @@ _config=${config:-kernelconfig.${CARCH}} | |||
14 | install= | 14 | install= |
15 | source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz | 15 | source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz |
16 | http://ftp.kernel.org/pub/linux/kernel/v3.x/patch-$pkgver.xz | 16 | http://ftp.kernel.org/pub/linux/kernel/v3.x/patch-$pkgver.xz |
17 | grsecurity-2.9.1-3.6.3-201210231942.patch | 17 | grsecurity-2.9.1-3.6.4-201210291446.patch |
18 | 18 | ||
19 | 0004-arp-flush-arp-cache-on-device-change.patch | 19 | 0004-arp-flush-arp-cache-on-device-change.patch |
20 | 20 | ||
@@ -139,8 +139,8 @@ dev() { | |||
139 | } | 139 | } |
140 | 140 | ||
141 | md5sums="1a1760420eac802c541a20ab51a093d1 linux-3.6.tar.xz | 141 | md5sums="1a1760420eac802c541a20ab51a093d1 linux-3.6.tar.xz |
142 | 96701113d37ef4f9b785206ab8bcc71e patch-3.6.3.xz | 142 | d7efab4da2682c44662b684026b059f7 patch-3.6.4.xz |
143 | 854e121b7f805e7a6b862d49d4f7b420 grsecurity-2.9.1-3.6.3-201210231942.patch | 143 | 4235328c981070bca82bc61b7f7bc7c1 grsecurity-2.9.1-3.6.4-201210291446.patch |
144 | 776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch | 144 | 776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch |
145 | 80def301b4cf710e0855d4058efe46bb kernelconfig.x86 | 145 | 80def301b4cf710e0855d4058efe46bb kernelconfig.x86 |
146 | 8eddcd9b36f4c2580e0b2db91eed3366 kernelconfig.x86_64" | 146 | 8eddcd9b36f4c2580e0b2db91eed3366 kernelconfig.x86_64" |
diff --git a/main/linux-grsec/grsecurity-2.9.1-3.6.3-201210231942.patch b/main/linux-grsec/grsecurity-2.9.1-3.6.4-201210291446.patch index 667fa189ce..08c581d833 100644 --- a/main/linux-grsec/grsecurity-2.9.1-3.6.3-201210231942.patch +++ b/main/linux-grsec/grsecurity-2.9.1-3.6.4-201210291446.patch | |||
@@ -251,7 +251,7 @@ index ad7e2e5..199f49e 100644 | |||
251 | 251 | ||
252 | pcd. [PARIDE] | 252 | pcd. [PARIDE] |
253 | diff --git a/Makefile b/Makefile | 253 | diff --git a/Makefile b/Makefile |
254 | index 6cdadf4..02df425 100644 | 254 | index dcf132a..db194e3 100644 |
255 | --- a/Makefile | 255 | --- a/Makefile |
256 | +++ b/Makefile | 256 | +++ b/Makefile |
257 | @@ -241,8 +241,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ | 257 | @@ -241,8 +241,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
@@ -5957,7 +5957,7 @@ index 11c6c96..3ec33e8 100644 | |||
5957 | mm->unmap_area = arch_unmap_area_topdown; | 5957 | mm->unmap_area = arch_unmap_area_topdown; |
5958 | } | 5958 | } |
5959 | diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S | 5959 | diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S |
5960 | index 1d7e274..b39c527 100644 | 5960 | index 7f5f65d..3308382 100644 |
5961 | --- a/arch/sparc/kernel/syscalls.S | 5961 | --- a/arch/sparc/kernel/syscalls.S |
5962 | +++ b/arch/sparc/kernel/syscalls.S | 5962 | +++ b/arch/sparc/kernel/syscalls.S |
5963 | @@ -62,7 +62,7 @@ sys32_rt_sigreturn: | 5963 | @@ -62,7 +62,7 @@ sys32_rt_sigreturn: |
@@ -5987,24 +5987,15 @@ index 1d7e274..b39c527 100644 | |||
5987 | bne,pn %icc, linux_syscall_trace ! CTI Group | 5987 | bne,pn %icc, linux_syscall_trace ! CTI Group |
5988 | mov %i0, %l5 ! IEU0 | 5988 | mov %i0, %l5 ! IEU0 |
5989 | 2: call %l7 ! CTI Group brk forced | 5989 | 2: call %l7 ! CTI Group brk forced |
5990 | @@ -226,7 +226,7 @@ ret_sys_call: | 5990 | @@ -218,7 +218,7 @@ ret_sys_call: |
5991 | 5991 | ||
5992 | cmp %o0, -ERESTART_RESTARTBLOCK | 5992 | cmp %o0, -ERESTART_RESTARTBLOCK |
5993 | bgeu,pn %xcc, 1f | 5993 | bgeu,pn %xcc, 1f |
5994 | - andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %l6 | 5994 | - andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %g0 |
5995 | + andcc %l0, _TIF_WORK_SYSCALL, %l6 | 5995 | + andcc %l0, _TIF_WORK_SYSCALL, %g0 |
5996 | 80: | 5996 | ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1 ! pc = npc |
5997 | /* System call success, clear Carry condition code. */ | 5997 | |
5998 | andn %g3, %g2, %g3 | 5998 | 2: |
5999 | @@ -241,7 +241,7 @@ ret_sys_call: | ||
6000 | /* System call failure, set Carry condition code. | ||
6001 | * Also, get abs(errno) to return to the process. | ||
6002 | */ | ||
6003 | - andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %l6 | ||
6004 | + andcc %l0, _TIF_WORK_SYSCALL, %l6 | ||
6005 | sub %g0, %o0, %o0 | ||
6006 | or %g3, %g2, %g3 | ||
6007 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | ||
6008 | diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c | 5999 | diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c |
6009 | index a5785ea..405c5f7 100644 | 6000 | index a5785ea..405c5f7 100644 |
6010 | --- a/arch/sparc/kernel/traps_32.c | 6001 | --- a/arch/sparc/kernel/traps_32.c |
@@ -14972,7 +14963,7 @@ index 9b9f18b..9fcaa04 100644 | |||
14972 | #include <asm/processor.h> | 14963 | #include <asm/processor.h> |
14973 | #include <asm/fcntl.h> | 14964 | #include <asm/fcntl.h> |
14974 | diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S | 14965 | diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S |
14975 | index 623f288..8bdd78a 100644 | 14966 | index 8f8e8ee..3617d6e 100644 |
14976 | --- a/arch/x86/kernel/entry_32.S | 14967 | --- a/arch/x86/kernel/entry_32.S |
14977 | +++ b/arch/x86/kernel/entry_32.S | 14968 | +++ b/arch/x86/kernel/entry_32.S |
14978 | @@ -176,13 +176,153 @@ | 14969 | @@ -176,13 +176,153 @@ |
@@ -15659,7 +15650,7 @@ index 623f288..8bdd78a 100644 | |||
15659 | /* | 15650 | /* |
15660 | * End of kprobes section | 15651 | * End of kprobes section |
15661 | */ | 15652 | */ |
15662 | @@ -1100,7 +1359,7 @@ BUILD_INTERRUPT3(xen_hvm_callback_vector, XEN_HVM_EVTCHN_CALLBACK, | 15653 | @@ -1102,7 +1361,7 @@ BUILD_INTERRUPT3(xen_hvm_callback_vector, XEN_HVM_EVTCHN_CALLBACK, |
15663 | 15654 | ||
15664 | ENTRY(mcount) | 15655 | ENTRY(mcount) |
15665 | ret | 15656 | ret |
@@ -15668,7 +15659,7 @@ index 623f288..8bdd78a 100644 | |||
15668 | 15659 | ||
15669 | ENTRY(ftrace_caller) | 15660 | ENTRY(ftrace_caller) |
15670 | cmpl $0, function_trace_stop | 15661 | cmpl $0, function_trace_stop |
15671 | @@ -1129,7 +1388,7 @@ ftrace_graph_call: | 15662 | @@ -1131,7 +1390,7 @@ ftrace_graph_call: |
15672 | .globl ftrace_stub | 15663 | .globl ftrace_stub |
15673 | ftrace_stub: | 15664 | ftrace_stub: |
15674 | ret | 15665 | ret |
@@ -15677,7 +15668,7 @@ index 623f288..8bdd78a 100644 | |||
15677 | 15668 | ||
15678 | #else /* ! CONFIG_DYNAMIC_FTRACE */ | 15669 | #else /* ! CONFIG_DYNAMIC_FTRACE */ |
15679 | 15670 | ||
15680 | @@ -1165,7 +1424,7 @@ trace: | 15671 | @@ -1167,7 +1426,7 @@ trace: |
15681 | popl %ecx | 15672 | popl %ecx |
15682 | popl %eax | 15673 | popl %eax |
15683 | jmp ftrace_stub | 15674 | jmp ftrace_stub |
@@ -15686,7 +15677,7 @@ index 623f288..8bdd78a 100644 | |||
15686 | #endif /* CONFIG_DYNAMIC_FTRACE */ | 15677 | #endif /* CONFIG_DYNAMIC_FTRACE */ |
15687 | #endif /* CONFIG_FUNCTION_TRACER */ | 15678 | #endif /* CONFIG_FUNCTION_TRACER */ |
15688 | 15679 | ||
15689 | @@ -1186,7 +1445,7 @@ ENTRY(ftrace_graph_caller) | 15680 | @@ -1188,7 +1447,7 @@ ENTRY(ftrace_graph_caller) |
15690 | popl %ecx | 15681 | popl %ecx |
15691 | popl %eax | 15682 | popl %eax |
15692 | ret | 15683 | ret |
@@ -15695,7 +15686,7 @@ index 623f288..8bdd78a 100644 | |||
15695 | 15686 | ||
15696 | .globl return_to_handler | 15687 | .globl return_to_handler |
15697 | return_to_handler: | 15688 | return_to_handler: |
15698 | @@ -1241,15 +1500,18 @@ error_code: | 15689 | @@ -1243,15 +1502,18 @@ error_code: |
15699 | movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart | 15690 | movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart |
15700 | REG_TO_PTGS %ecx | 15691 | REG_TO_PTGS %ecx |
15701 | SET_KERNEL_GS %ecx | 15692 | SET_KERNEL_GS %ecx |
@@ -15716,7 +15707,7 @@ index 623f288..8bdd78a 100644 | |||
15716 | 15707 | ||
15717 | /* | 15708 | /* |
15718 | * Debug traps and NMI can happen at the one SYSENTER instruction | 15709 | * Debug traps and NMI can happen at the one SYSENTER instruction |
15719 | @@ -1291,7 +1553,7 @@ debug_stack_correct: | 15710 | @@ -1293,7 +1555,7 @@ debug_stack_correct: |
15720 | call do_debug | 15711 | call do_debug |
15721 | jmp ret_from_exception | 15712 | jmp ret_from_exception |
15722 | CFI_ENDPROC | 15713 | CFI_ENDPROC |
@@ -15725,7 +15716,7 @@ index 623f288..8bdd78a 100644 | |||
15725 | 15716 | ||
15726 | /* | 15717 | /* |
15727 | * NMI is doubly nasty. It can happen _while_ we're handling | 15718 | * NMI is doubly nasty. It can happen _while_ we're handling |
15728 | @@ -1328,6 +1590,9 @@ nmi_stack_correct: | 15719 | @@ -1330,6 +1592,9 @@ nmi_stack_correct: |
15729 | xorl %edx,%edx # zero error code | 15720 | xorl %edx,%edx # zero error code |
15730 | movl %esp,%eax # pt_regs pointer | 15721 | movl %esp,%eax # pt_regs pointer |
15731 | call do_nmi | 15722 | call do_nmi |
@@ -15735,7 +15726,7 @@ index 623f288..8bdd78a 100644 | |||
15735 | jmp restore_all_notrace | 15726 | jmp restore_all_notrace |
15736 | CFI_ENDPROC | 15727 | CFI_ENDPROC |
15737 | 15728 | ||
15738 | @@ -1364,12 +1629,15 @@ nmi_espfix_stack: | 15729 | @@ -1366,12 +1631,15 @@ nmi_espfix_stack: |
15739 | FIXUP_ESPFIX_STACK # %eax == %esp | 15730 | FIXUP_ESPFIX_STACK # %eax == %esp |
15740 | xorl %edx,%edx # zero error code | 15731 | xorl %edx,%edx # zero error code |
15741 | call do_nmi | 15732 | call do_nmi |
@@ -15752,7 +15743,7 @@ index 623f288..8bdd78a 100644 | |||
15752 | 15743 | ||
15753 | ENTRY(int3) | 15744 | ENTRY(int3) |
15754 | RING0_INT_FRAME | 15745 | RING0_INT_FRAME |
15755 | @@ -1381,14 +1649,14 @@ ENTRY(int3) | 15746 | @@ -1383,14 +1651,14 @@ ENTRY(int3) |
15756 | call do_int3 | 15747 | call do_int3 |
15757 | jmp ret_from_exception | 15748 | jmp ret_from_exception |
15758 | CFI_ENDPROC | 15749 | CFI_ENDPROC |
@@ -15769,7 +15760,7 @@ index 623f288..8bdd78a 100644 | |||
15769 | 15760 | ||
15770 | #ifdef CONFIG_KVM_GUEST | 15761 | #ifdef CONFIG_KVM_GUEST |
15771 | ENTRY(async_page_fault) | 15762 | ENTRY(async_page_fault) |
15772 | @@ -1396,7 +1664,7 @@ ENTRY(async_page_fault) | 15763 | @@ -1398,7 +1666,7 @@ ENTRY(async_page_fault) |
15773 | pushl_cfi $do_async_page_fault | 15764 | pushl_cfi $do_async_page_fault |
15774 | jmp error_code | 15765 | jmp error_code |
15775 | CFI_ENDPROC | 15766 | CFI_ENDPROC |
@@ -15779,7 +15770,7 @@ index 623f288..8bdd78a 100644 | |||
15779 | 15770 | ||
15780 | /* | 15771 | /* |
15781 | diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S | 15772 | diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S |
15782 | index 69babd8..4270a51 100644 | 15773 | index dcdd0ea..de0bb2d 100644 |
15783 | --- a/arch/x86/kernel/entry_64.S | 15774 | --- a/arch/x86/kernel/entry_64.S |
15784 | +++ b/arch/x86/kernel/entry_64.S | 15775 | +++ b/arch/x86/kernel/entry_64.S |
15785 | @@ -57,6 +57,8 @@ | 15776 | @@ -57,6 +57,8 @@ |
@@ -16843,7 +16834,7 @@ index c18f59d..9c0c9f6 100644 | |||
16843 | #ifdef CONFIG_BLK_DEV_INITRD | 16834 | #ifdef CONFIG_BLK_DEV_INITRD |
16844 | /* Reserve INITRD */ | 16835 | /* Reserve INITRD */ |
16845 | diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S | 16836 | diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S |
16846 | index d42ab17..cb1b997 100644 | 16837 | index d42ab17..87b9555 100644 |
16847 | --- a/arch/x86/kernel/head_32.S | 16838 | --- a/arch/x86/kernel/head_32.S |
16848 | +++ b/arch/x86/kernel/head_32.S | 16839 | +++ b/arch/x86/kernel/head_32.S |
16849 | @@ -26,6 +26,12 @@ | 16840 | @@ -26,6 +26,12 @@ |
@@ -16899,20 +16890,20 @@ index d42ab17..cb1b997 100644 | |||
16899 | ENTRY(startup_32) | 16890 | ENTRY(startup_32) |
16900 | movl pa(stack_start),%ecx | 16891 | movl pa(stack_start),%ecx |
16901 | 16892 | ||
16902 | @@ -106,6 +121,57 @@ ENTRY(startup_32) | 16893 | @@ -106,6 +121,59 @@ ENTRY(startup_32) |
16903 | 2: | 16894 | 2: |
16904 | leal -__PAGE_OFFSET(%ecx),%esp | 16895 | leal -__PAGE_OFFSET(%ecx),%esp |
16905 | 16896 | ||
16906 | +#ifdef CONFIG_SMP | 16897 | +#ifdef CONFIG_SMP |
16907 | + movl $pa(cpu_gdt_table),%edi | 16898 | + movl $pa(cpu_gdt_table),%edi |
16908 | + movl $__per_cpu_load,%eax | 16899 | + movl $__per_cpu_load,%eax |
16909 | + movw %ax,__KERNEL_PERCPU + 2(%edi) | 16900 | + movw %ax,GDT_ENTRY_PERCPU * 8 + 2(%edi) |
16910 | + rorl $16,%eax | 16901 | + rorl $16,%eax |
16911 | + movb %al,__KERNEL_PERCPU + 4(%edi) | 16902 | + movb %al,GDT_ENTRY_PERCPU * 8 + 4(%edi) |
16912 | + movb %ah,__KERNEL_PERCPU + 7(%edi) | 16903 | + movb %ah,GDT_ENTRY_PERCPU * 8 + 7(%edi) |
16913 | + movl $__per_cpu_end - 1,%eax | 16904 | + movl $__per_cpu_end - 1,%eax |
16914 | + subl $__per_cpu_start,%eax | 16905 | + subl $__per_cpu_start,%eax |
16915 | + movw %ax,__KERNEL_PERCPU + 0(%edi) | 16906 | + movw %ax,GDT_ENTRY_PERCPU * 8 + 0(%edi) |
16916 | +#endif | 16907 | +#endif |
16917 | + | 16908 | + |
16918 | +#ifdef CONFIG_PAX_MEMORY_UDEREF | 16909 | +#ifdef CONFIG_PAX_MEMORY_UDEREF |
@@ -16929,10 +16920,10 @@ index d42ab17..cb1b997 100644 | |||
16929 | +#ifdef CONFIG_PAX_KERNEXEC | 16920 | +#ifdef CONFIG_PAX_KERNEXEC |
16930 | + movl $pa(boot_gdt),%edi | 16921 | + movl $pa(boot_gdt),%edi |
16931 | + movl $__LOAD_PHYSICAL_ADDR,%eax | 16922 | + movl $__LOAD_PHYSICAL_ADDR,%eax |
16932 | + movw %ax,__BOOT_CS + 2(%edi) | 16923 | + movw %ax,GDT_ENTRY_BOOT_CS * 8 + 2(%edi) |
16933 | + rorl $16,%eax | 16924 | + rorl $16,%eax |
16934 | + movb %al,__BOOT_CS + 4(%edi) | 16925 | + movb %al,GDT_ENTRY_BOOT_CS * 8 + 4(%edi) |
16935 | + movb %ah,__BOOT_CS + 7(%edi) | 16926 | + movb %ah,GDT_ENTRY_BOOT_CS * 8 + 7(%edi) |
16936 | + rorl $16,%eax | 16927 | + rorl $16,%eax |
16937 | + | 16928 | + |
16938 | + ljmp $(__BOOT_CS),$1f | 16929 | + ljmp $(__BOOT_CS),$1f |
@@ -16942,13 +16933,15 @@ index d42ab17..cb1b997 100644 | |||
16942 | + movl $pa(cpu_gdt_table),%edi | 16933 | + movl $pa(cpu_gdt_table),%edi |
16943 | + addl $__PAGE_OFFSET,%eax | 16934 | + addl $__PAGE_OFFSET,%eax |
16944 | +1: | 16935 | +1: |
16945 | + movw %ax,__KERNEL_CS + 2(%edi) | 16936 | + movb $0xc0,GDT_ENTRY_KERNEL_CS * 8 + 6(%edi) |
16946 | + movw %ax,__KERNEXEC_KERNEL_CS + 2(%edi) | 16937 | + movb $0xc0,GDT_ENTRY_KERNEXEC_KERNEL_CS * 8 + 6(%edi) |
16938 | + movw %ax,GDT_ENTRY_KERNEL_CS * 8 + 2(%edi) | ||
16939 | + movw %ax,GDT_ENTRY_KERNEXEC_KERNEL_CS * 8 + 2(%edi) | ||
16947 | + rorl $16,%eax | 16940 | + rorl $16,%eax |
16948 | + movb %al,__KERNEL_CS + 4(%edi) | 16941 | + movb %al,GDT_ENTRY_KERNEL_CS * 8 + 4(%edi) |
16949 | + movb %al,__KERNEXEC_KERNEL_CS + 4(%edi) | 16942 | + movb %al,GDT_ENTRY_KERNEXEC_KERNEL_CS * 8 + 4(%edi) |
16950 | + movb %ah,__KERNEL_CS + 7(%edi) | 16943 | + movb %ah,GDT_ENTRY_KERNEL_CS * 8 + 7(%edi) |
16951 | + movb %ah,__KERNEXEC_KERNEL_CS + 7(%edi) | 16944 | + movb %ah,GDT_ENTRY_KERNEXEC_KERNEL_CS * 8 + 7(%edi) |
16952 | + rorl $16,%eax | 16945 | + rorl $16,%eax |
16953 | + addl $PAGE_SIZE_asm,%edi | 16946 | + addl $PAGE_SIZE_asm,%edi |
16954 | + loop 1b | 16947 | + loop 1b |
@@ -16957,7 +16950,7 @@ index d42ab17..cb1b997 100644 | |||
16957 | /* | 16950 | /* |
16958 | * Clear BSS first so that there are no surprises... | 16951 | * Clear BSS first so that there are no surprises... |
16959 | */ | 16952 | */ |
16960 | @@ -196,8 +262,11 @@ ENTRY(startup_32) | 16953 | @@ -196,8 +264,11 @@ ENTRY(startup_32) |
16961 | movl %eax, pa(max_pfn_mapped) | 16954 | movl %eax, pa(max_pfn_mapped) |
16962 | 16955 | ||
16963 | /* Do early initialization of the fixmap area */ | 16956 | /* Do early initialization of the fixmap area */ |
@@ -16971,7 +16964,7 @@ index d42ab17..cb1b997 100644 | |||
16971 | #else /* Not PAE */ | 16964 | #else /* Not PAE */ |
16972 | 16965 | ||
16973 | page_pde_offset = (__PAGE_OFFSET >> 20); | 16966 | page_pde_offset = (__PAGE_OFFSET >> 20); |
16974 | @@ -227,8 +296,11 @@ page_pde_offset = (__PAGE_OFFSET >> 20); | 16967 | @@ -227,8 +298,11 @@ page_pde_offset = (__PAGE_OFFSET >> 20); |
16975 | movl %eax, pa(max_pfn_mapped) | 16968 | movl %eax, pa(max_pfn_mapped) |
16976 | 16969 | ||
16977 | /* Do early initialization of the fixmap area */ | 16970 | /* Do early initialization of the fixmap area */ |
@@ -16985,7 +16978,7 @@ index d42ab17..cb1b997 100644 | |||
16985 | #endif | 16978 | #endif |
16986 | 16979 | ||
16987 | #ifdef CONFIG_PARAVIRT | 16980 | #ifdef CONFIG_PARAVIRT |
16988 | @@ -242,9 +314,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20); | 16981 | @@ -242,9 +316,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20); |
16989 | cmpl $num_subarch_entries, %eax | 16982 | cmpl $num_subarch_entries, %eax |
16990 | jae bad_subarch | 16983 | jae bad_subarch |
16991 | 16984 | ||
@@ -16996,7 +16989,7 @@ index d42ab17..cb1b997 100644 | |||
16996 | 16989 | ||
16997 | bad_subarch: | 16990 | bad_subarch: |
16998 | WEAK(lguest_entry) | 16991 | WEAK(lguest_entry) |
16999 | @@ -256,10 +326,10 @@ WEAK(xen_entry) | 16992 | @@ -256,10 +328,10 @@ WEAK(xen_entry) |
17000 | __INITDATA | 16993 | __INITDATA |
17001 | 16994 | ||
17002 | subarch_entries: | 16995 | subarch_entries: |
@@ -17011,7 +17004,7 @@ index d42ab17..cb1b997 100644 | |||
17011 | num_subarch_entries = (. - subarch_entries) / 4 | 17004 | num_subarch_entries = (. - subarch_entries) / 4 |
17012 | .previous | 17005 | .previous |
17013 | #else | 17006 | #else |
17014 | @@ -310,6 +380,7 @@ default_entry: | 17007 | @@ -310,6 +382,7 @@ default_entry: |
17015 | orl %edx,%eax | 17008 | orl %edx,%eax |
17016 | movl %eax,%cr4 | 17009 | movl %eax,%cr4 |
17017 | 17010 | ||
@@ -17019,7 +17012,7 @@ index d42ab17..cb1b997 100644 | |||
17019 | testb $X86_CR4_PAE, %al # check if PAE is enabled | 17012 | testb $X86_CR4_PAE, %al # check if PAE is enabled |
17020 | jz 6f | 17013 | jz 6f |
17021 | 17014 | ||
17022 | @@ -338,6 +409,9 @@ default_entry: | 17015 | @@ -338,6 +411,9 @@ default_entry: |
17023 | /* Make changes effective */ | 17016 | /* Make changes effective */ |
17024 | wrmsr | 17017 | wrmsr |
17025 | 17018 | ||
@@ -17029,7 +17022,7 @@ index d42ab17..cb1b997 100644 | |||
17029 | 6: | 17022 | 6: |
17030 | 17023 | ||
17031 | /* | 17024 | /* |
17032 | @@ -436,14 +510,20 @@ is386: movl $2,%ecx # set MP | 17025 | @@ -436,14 +512,20 @@ is386: movl $2,%ecx # set MP |
17033 | 1: movl $(__KERNEL_DS),%eax # reload all the segment registers | 17026 | 1: movl $(__KERNEL_DS),%eax # reload all the segment registers |
17034 | movl %eax,%ss # after changing gdt. | 17027 | movl %eax,%ss # after changing gdt. |
17035 | 17028 | ||
@@ -17051,7 +17044,7 @@ index d42ab17..cb1b997 100644 | |||
17051 | movl %eax,%gs | 17044 | movl %eax,%gs |
17052 | 17045 | ||
17053 | xorl %eax,%eax # Clear LDT | 17046 | xorl %eax,%eax # Clear LDT |
17054 | @@ -520,8 +600,11 @@ setup_once: | 17047 | @@ -520,8 +602,11 @@ setup_once: |
17055 | * relocation. Manually set base address in stack canary | 17048 | * relocation. Manually set base address in stack canary |
17056 | * segment descriptor. | 17049 | * segment descriptor. |
17057 | */ | 17050 | */ |
@@ -17064,7 +17057,7 @@ index d42ab17..cb1b997 100644 | |||
17064 | movw %cx, 8 * GDT_ENTRY_STACK_CANARY + 2(%eax) | 17057 | movw %cx, 8 * GDT_ENTRY_STACK_CANARY + 2(%eax) |
17065 | shrl $16, %ecx | 17058 | shrl $16, %ecx |
17066 | movb %cl, 8 * GDT_ENTRY_STACK_CANARY + 4(%eax) | 17059 | movb %cl, 8 * GDT_ENTRY_STACK_CANARY + 4(%eax) |
17067 | @@ -552,7 +635,7 @@ ENDPROC(early_idt_handlers) | 17060 | @@ -552,7 +637,7 @@ ENDPROC(early_idt_handlers) |
17068 | /* This is global to keep gas from relaxing the jumps */ | 17061 | /* This is global to keep gas from relaxing the jumps */ |
17069 | ENTRY(early_idt_handler) | 17062 | ENTRY(early_idt_handler) |
17070 | cld | 17063 | cld |
@@ -17073,7 +17066,7 @@ index d42ab17..cb1b997 100644 | |||
17073 | je hlt_loop | 17066 | je hlt_loop |
17074 | incl %ss:early_recursion_flag | 17067 | incl %ss:early_recursion_flag |
17075 | 17068 | ||
17076 | @@ -590,8 +673,8 @@ ENTRY(early_idt_handler) | 17069 | @@ -590,8 +675,8 @@ ENTRY(early_idt_handler) |
17077 | pushl (20+6*4)(%esp) /* trapno */ | 17070 | pushl (20+6*4)(%esp) /* trapno */ |
17078 | pushl $fault_msg | 17071 | pushl $fault_msg |
17079 | call printk | 17072 | call printk |
@@ -17083,7 +17076,7 @@ index d42ab17..cb1b997 100644 | |||
17083 | hlt_loop: | 17076 | hlt_loop: |
17084 | hlt | 17077 | hlt |
17085 | jmp hlt_loop | 17078 | jmp hlt_loop |
17086 | @@ -610,8 +693,11 @@ ENDPROC(early_idt_handler) | 17079 | @@ -610,8 +695,11 @@ ENDPROC(early_idt_handler) |
17087 | /* This is the default interrupt "handler" :-) */ | 17080 | /* This is the default interrupt "handler" :-) */ |
17088 | ALIGN | 17081 | ALIGN |
17089 | ignore_int: | 17082 | ignore_int: |
@@ -17096,7 +17089,7 @@ index d42ab17..cb1b997 100644 | |||
17096 | pushl %eax | 17089 | pushl %eax |
17097 | pushl %ecx | 17090 | pushl %ecx |
17098 | pushl %edx | 17091 | pushl %edx |
17099 | @@ -620,9 +706,6 @@ ignore_int: | 17092 | @@ -620,9 +708,6 @@ ignore_int: |
17100 | movl $(__KERNEL_DS),%eax | 17093 | movl $(__KERNEL_DS),%eax |
17101 | movl %eax,%ds | 17094 | movl %eax,%ds |
17102 | movl %eax,%es | 17095 | movl %eax,%es |
@@ -17106,7 +17099,7 @@ index d42ab17..cb1b997 100644 | |||
17106 | pushl 16(%esp) | 17099 | pushl 16(%esp) |
17107 | pushl 24(%esp) | 17100 | pushl 24(%esp) |
17108 | pushl 32(%esp) | 17101 | pushl 32(%esp) |
17109 | @@ -656,29 +739,43 @@ ENTRY(setup_once_ref) | 17102 | @@ -656,29 +741,43 @@ ENTRY(setup_once_ref) |
17110 | /* | 17103 | /* |
17111 | * BSS section | 17104 | * BSS section |
17112 | */ | 17105 | */ |
@@ -17155,7 +17148,7 @@ index d42ab17..cb1b997 100644 | |||
17155 | ENTRY(initial_page_table) | 17148 | ENTRY(initial_page_table) |
17156 | .long pa(initial_pg_pmd+PGD_IDENT_ATTR),0 /* low identity map */ | 17149 | .long pa(initial_pg_pmd+PGD_IDENT_ATTR),0 /* low identity map */ |
17157 | # if KPMDS == 3 | 17150 | # if KPMDS == 3 |
17158 | @@ -697,12 +794,20 @@ ENTRY(initial_page_table) | 17151 | @@ -697,12 +796,20 @@ ENTRY(initial_page_table) |
17159 | # error "Kernel PMDs should be 1, 2 or 3" | 17152 | # error "Kernel PMDs should be 1, 2 or 3" |
17160 | # endif | 17153 | # endif |
17161 | .align PAGE_SIZE /* needs to be page-sized too */ | 17154 | .align PAGE_SIZE /* needs to be page-sized too */ |
@@ -17177,7 +17170,7 @@ index d42ab17..cb1b997 100644 | |||
17177 | 17170 | ||
17178 | __INITRODATA | 17171 | __INITRODATA |
17179 | int_msg: | 17172 | int_msg: |
17180 | @@ -730,7 +835,7 @@ fault_msg: | 17173 | @@ -730,7 +837,7 @@ fault_msg: |
17181 | * segment size, and 32-bit linear address value: | 17174 | * segment size, and 32-bit linear address value: |
17182 | */ | 17175 | */ |
17183 | 17176 | ||
@@ -17186,7 +17179,7 @@ index d42ab17..cb1b997 100644 | |||
17186 | .globl boot_gdt_descr | 17179 | .globl boot_gdt_descr |
17187 | .globl idt_descr | 17180 | .globl idt_descr |
17188 | 17181 | ||
17189 | @@ -739,7 +844,7 @@ fault_msg: | 17182 | @@ -739,7 +846,7 @@ fault_msg: |
17190 | .word 0 # 32 bit align gdt_desc.address | 17183 | .word 0 # 32 bit align gdt_desc.address |
17191 | boot_gdt_descr: | 17184 | boot_gdt_descr: |
17192 | .word __BOOT_DS+7 | 17185 | .word __BOOT_DS+7 |
@@ -17195,7 +17188,7 @@ index d42ab17..cb1b997 100644 | |||
17195 | 17188 | ||
17196 | .word 0 # 32-bit align idt_desc.address | 17189 | .word 0 # 32-bit align idt_desc.address |
17197 | idt_descr: | 17190 | idt_descr: |
17198 | @@ -750,7 +855,7 @@ idt_descr: | 17191 | @@ -750,7 +857,7 @@ idt_descr: |
17199 | .word 0 # 32 bit align gdt_desc.address | 17192 | .word 0 # 32 bit align gdt_desc.address |
17200 | ENTRY(early_gdt_descr) | 17193 | ENTRY(early_gdt_descr) |
17201 | .word GDT_ENTRIES*8-1 | 17194 | .word GDT_ENTRIES*8-1 |
@@ -17204,7 +17197,7 @@ index d42ab17..cb1b997 100644 | |||
17204 | 17197 | ||
17205 | /* | 17198 | /* |
17206 | * The boot_gdt must mirror the equivalent in setup.S and is | 17199 | * The boot_gdt must mirror the equivalent in setup.S and is |
17207 | @@ -759,5 +864,65 @@ ENTRY(early_gdt_descr) | 17200 | @@ -759,5 +866,65 @@ ENTRY(early_gdt_descr) |
17208 | .align L1_CACHE_BYTES | 17201 | .align L1_CACHE_BYTES |
17209 | ENTRY(boot_gdt) | 17202 | ENTRY(boot_gdt) |
17210 | .fill GDT_ENTRY_BOOT_CS,8,0 | 17203 | .fill GDT_ENTRY_BOOT_CS,8,0 |
@@ -19020,7 +19013,7 @@ index 7a6f3b3..bed145d7 100644 | |||
19020 | 19013 | ||
19021 | 1: | 19014 | 1: |
19022 | diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c | 19015 | diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c |
19023 | index f4b9b80..0d05de1 100644 | 19016 | index 198e774..e880f29 100644 |
19024 | --- a/arch/x86/kernel/setup.c | 19017 | --- a/arch/x86/kernel/setup.c |
19025 | +++ b/arch/x86/kernel/setup.c | 19018 | +++ b/arch/x86/kernel/setup.c |
19026 | @@ -440,7 +440,7 @@ static void __init parse_setup_data(void) | 19019 | @@ -440,7 +440,7 @@ static void __init parse_setup_data(void) |
@@ -24584,7 +24577,7 @@ index b91e485..d00e7c9 100644 | |||
24584 | } | 24577 | } |
24585 | if (mm->get_unmapped_area == arch_get_unmapped_area) | 24578 | if (mm->get_unmapped_area == arch_get_unmapped_area) |
24586 | diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c | 24579 | diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c |
24587 | index ab1f6a9..e16d764 100644 | 24580 | index ab1f6a9..23030ba 100644 |
24588 | --- a/arch/x86/mm/init.c | 24581 | --- a/arch/x86/mm/init.c |
24589 | +++ b/arch/x86/mm/init.c | 24582 | +++ b/arch/x86/mm/init.c |
24590 | @@ -16,6 +16,8 @@ | 24583 | @@ -16,6 +16,8 @@ |
@@ -24644,7 +24637,7 @@ index ab1f6a9..e16d764 100644 | |||
24644 | if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) | 24637 | if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) |
24645 | return 0; | 24638 | return 0; |
24646 | if (!page_is_ram(pagenr)) | 24639 | if (!page_is_ram(pagenr)) |
24647 | @@ -377,8 +406,116 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) | 24640 | @@ -377,8 +406,117 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) |
24648 | #endif | 24641 | #endif |
24649 | } | 24642 | } |
24650 | 24643 | ||
@@ -24698,6 +24691,7 @@ index ab1f6a9..e16d764 100644 | |||
24698 | + for (cpu = 0; cpu < nr_cpu_ids; cpu++) { | 24691 | + for (cpu = 0; cpu < nr_cpu_ids; cpu++) { |
24699 | + pack_descriptor(&d, get_desc_base(&get_cpu_gdt_table(cpu)[GDT_ENTRY_KERNEL_CS]), limit, 0x9B, 0xC); | 24692 | + pack_descriptor(&d, get_desc_base(&get_cpu_gdt_table(cpu)[GDT_ENTRY_KERNEL_CS]), limit, 0x9B, 0xC); |
24700 | + write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_KERNEL_CS, &d, DESCTYPE_S); | 24693 | + write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_KERNEL_CS, &d, DESCTYPE_S); |
24694 | + write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_KERNEXEC_KERNEL_CS, &d, DESCTYPE_S); | ||
24701 | + } | 24695 | + } |
24702 | + | 24696 | + |
24703 | + /* PaX: make KERNEL_CS read-only */ | 24697 | + /* PaX: make KERNEL_CS read-only */ |
@@ -30691,7 +30685,7 @@ index 627fe35..c9a7346 100644 | |||
30691 | return container_of(adapter, struct intel_gmbus, adapter)->force_bit; | 30685 | return container_of(adapter, struct intel_gmbus, adapter)->force_bit; |
30692 | } | 30686 | } |
30693 | diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | 30687 | diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c |
30694 | index ff2819e..6b5997b 100644 | 30688 | index cdf46b5..e785624 100644 |
30695 | --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c | 30689 | --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c |
30696 | +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | 30690 | +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c |
30697 | @@ -189,7 +189,7 @@ i915_gem_object_set_to_gpu_domain(struct drm_i915_gem_object *obj, | 30691 | @@ -189,7 +189,7 @@ i915_gem_object_set_to_gpu_domain(struct drm_i915_gem_object *obj, |
@@ -30703,7 +30697,7 @@ index ff2819e..6b5997b 100644 | |||
30703 | 30697 | ||
30704 | /* The actual obj->write_domain will be updated with | 30698 | /* The actual obj->write_domain will be updated with |
30705 | * pending_write_domain after we emit the accumulated flush for all | 30699 | * pending_write_domain after we emit the accumulated flush for all |
30706 | @@ -906,9 +906,9 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec) | 30700 | @@ -907,9 +907,9 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec) |
30707 | 30701 | ||
30708 | static int | 30702 | static int |
30709 | validate_exec_list(struct drm_i915_gem_exec_object2 *exec, | 30703 | validate_exec_list(struct drm_i915_gem_exec_object2 *exec, |
@@ -42807,7 +42801,7 @@ index d146e18..12d1bd1 100644 | |||
42807 | fd_offset + ex.a_text); | 42801 | fd_offset + ex.a_text); |
42808 | if (error != N_DATADDR(ex)) { | 42802 | if (error != N_DATADDR(ex)) { |
42809 | diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c | 42803 | diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c |
42810 | index 0225fdd..9f0ef53 100644 | 42804 | index 0225fdd..08bda99 100644 |
42811 | --- a/fs/binfmt_elf.c | 42805 | --- a/fs/binfmt_elf.c |
42812 | +++ b/fs/binfmt_elf.c | 42806 | +++ b/fs/binfmt_elf.c |
42813 | @@ -32,6 +32,7 @@ | 42807 | @@ -32,6 +32,7 @@ |
@@ -42902,7 +42896,13 @@ index 0225fdd..9f0ef53 100644 | |||
42902 | return -EFAULT; | 42896 | return -EFAULT; |
42903 | return 0; | 42897 | return 0; |
42904 | } | 42898 | } |
42905 | @@ -378,10 +397,10 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, | 42899 | @@ -373,15 +392,14 @@ static unsigned long total_mapping_size(struct elf_phdr *cmds, int nr) |
42900 | an ELF header */ | ||
42901 | |||
42902 | static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, | ||
42903 | - struct file *interpreter, unsigned long *interp_map_addr, | ||
42904 | - unsigned long no_base) | ||
42905 | + struct file *interpreter, unsigned long no_base) | ||
42906 | { | 42906 | { |
42907 | struct elf_phdr *elf_phdata; | 42907 | struct elf_phdr *elf_phdata; |
42908 | struct elf_phdr *eppnt; | 42908 | struct elf_phdr *eppnt; |
@@ -42915,7 +42915,7 @@ index 0225fdd..9f0ef53 100644 | |||
42915 | unsigned long total_size; | 42915 | unsigned long total_size; |
42916 | int retval, i, size; | 42916 | int retval, i, size; |
42917 | 42917 | ||
42918 | @@ -427,6 +446,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, | 42918 | @@ -427,6 +445,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, |
42919 | goto out_close; | 42919 | goto out_close; |
42920 | } | 42920 | } |
42921 | 42921 | ||
@@ -42927,7 +42927,16 @@ index 0225fdd..9f0ef53 100644 | |||
42927 | eppnt = elf_phdata; | 42927 | eppnt = elf_phdata; |
42928 | for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) { | 42928 | for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) { |
42929 | if (eppnt->p_type == PT_LOAD) { | 42929 | if (eppnt->p_type == PT_LOAD) { |
42930 | @@ -470,8 +494,8 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, | 42930 | @@ -450,8 +473,6 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, |
42931 | map_addr = elf_map(interpreter, load_addr + vaddr, | ||
42932 | eppnt, elf_prot, elf_type, total_size); | ||
42933 | total_size = 0; | ||
42934 | - if (!*interp_map_addr) | ||
42935 | - *interp_map_addr = map_addr; | ||
42936 | error = map_addr; | ||
42937 | if (BAD_ADDR(map_addr)) | ||
42938 | goto out_close; | ||
42939 | @@ -470,8 +491,8 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex, | ||
42931 | k = load_addr + eppnt->p_vaddr; | 42940 | k = load_addr + eppnt->p_vaddr; |
42932 | if (BAD_ADDR(k) || | 42941 | if (BAD_ADDR(k) || |
42933 | eppnt->p_filesz > eppnt->p_memsz || | 42942 | eppnt->p_filesz > eppnt->p_memsz || |
@@ -42938,7 +42947,7 @@ index 0225fdd..9f0ef53 100644 | |||
42938 | error = -ENOMEM; | 42947 | error = -ENOMEM; |
42939 | goto out_close; | 42948 | goto out_close; |
42940 | } | 42949 | } |
42941 | @@ -523,6 +547,311 @@ out: | 42950 | @@ -523,6 +544,311 @@ out: |
42942 | return error; | 42951 | return error; |
42943 | } | 42952 | } |
42944 | 42953 | ||
@@ -43250,7 +43259,7 @@ index 0225fdd..9f0ef53 100644 | |||
43250 | /* | 43259 | /* |
43251 | * These are the functions used to load ELF style executables and shared | 43260 | * These are the functions used to load ELF style executables and shared |
43252 | * libraries. There is no binary dependent code anywhere else. | 43261 | * libraries. There is no binary dependent code anywhere else. |
43253 | @@ -539,6 +868,11 @@ static unsigned long randomize_stack_top(unsigned long stack_top) | 43262 | @@ -539,6 +865,11 @@ static unsigned long randomize_stack_top(unsigned long stack_top) |
43254 | { | 43263 | { |
43255 | unsigned int random_variable = 0; | 43264 | unsigned int random_variable = 0; |
43256 | 43265 | ||
@@ -43262,7 +43271,7 @@ index 0225fdd..9f0ef53 100644 | |||
43262 | if ((current->flags & PF_RANDOMIZE) && | 43271 | if ((current->flags & PF_RANDOMIZE) && |
43263 | !(current->personality & ADDR_NO_RANDOMIZE)) { | 43272 | !(current->personality & ADDR_NO_RANDOMIZE)) { |
43264 | random_variable = get_random_int() & STACK_RND_MASK; | 43273 | random_variable = get_random_int() & STACK_RND_MASK; |
43265 | @@ -557,7 +891,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | 43274 | @@ -557,7 +888,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) |
43266 | unsigned long load_addr = 0, load_bias = 0; | 43275 | unsigned long load_addr = 0, load_bias = 0; |
43267 | int load_addr_set = 0; | 43276 | int load_addr_set = 0; |
43268 | char * elf_interpreter = NULL; | 43277 | char * elf_interpreter = NULL; |
@@ -43271,7 +43280,7 @@ index 0225fdd..9f0ef53 100644 | |||
43271 | struct elf_phdr *elf_ppnt, *elf_phdata; | 43280 | struct elf_phdr *elf_ppnt, *elf_phdata; |
43272 | unsigned long elf_bss, elf_brk; | 43281 | unsigned long elf_bss, elf_brk; |
43273 | int retval, i; | 43282 | int retval, i; |
43274 | @@ -567,11 +901,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | 43283 | @@ -567,11 +898,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) |
43275 | unsigned long start_code, end_code, start_data, end_data; | 43284 | unsigned long start_code, end_code, start_data, end_data; |
43276 | unsigned long reloc_func_desc __maybe_unused = 0; | 43285 | unsigned long reloc_func_desc __maybe_unused = 0; |
43277 | int executable_stack = EXSTACK_DEFAULT; | 43286 | int executable_stack = EXSTACK_DEFAULT; |
@@ -43284,7 +43293,7 @@ index 0225fdd..9f0ef53 100644 | |||
43284 | 43293 | ||
43285 | loc = kmalloc(sizeof(*loc), GFP_KERNEL); | 43294 | loc = kmalloc(sizeof(*loc), GFP_KERNEL); |
43286 | if (!loc) { | 43295 | if (!loc) { |
43287 | @@ -707,11 +1041,81 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | 43296 | @@ -707,11 +1038,81 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) |
43288 | goto out_free_dentry; | 43297 | goto out_free_dentry; |
43289 | 43298 | ||
43290 | /* OK, This is the point of no return */ | 43299 | /* OK, This is the point of no return */ |
@@ -43367,7 +43376,7 @@ index 0225fdd..9f0ef53 100644 | |||
43367 | if (elf_read_implies_exec(loc->elf_ex, executable_stack)) | 43376 | if (elf_read_implies_exec(loc->elf_ex, executable_stack)) |
43368 | current->personality |= READ_IMPLIES_EXEC; | 43377 | current->personality |= READ_IMPLIES_EXEC; |
43369 | 43378 | ||
43370 | @@ -802,6 +1206,20 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | 43379 | @@ -802,6 +1203,20 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) |
43371 | #else | 43380 | #else |
43372 | load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr); | 43381 | load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr); |
43373 | #endif | 43382 | #endif |
@@ -43388,7 +43397,7 @@ index 0225fdd..9f0ef53 100644 | |||
43388 | } | 43397 | } |
43389 | 43398 | ||
43390 | error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, | 43399 | error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, |
43391 | @@ -834,9 +1252,9 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | 43400 | @@ -834,9 +1249,9 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) |
43392 | * allowed task size. Note that p_filesz must always be | 43401 | * allowed task size. Note that p_filesz must always be |
43393 | * <= p_memsz so it is only necessary to check p_memsz. | 43402 | * <= p_memsz so it is only necessary to check p_memsz. |
43394 | */ | 43403 | */ |
@@ -43401,7 +43410,7 @@ index 0225fdd..9f0ef53 100644 | |||
43401 | /* set_brk can never work. Avoid overflows. */ | 43410 | /* set_brk can never work. Avoid overflows. */ |
43402 | send_sig(SIGKILL, current, 0); | 43411 | send_sig(SIGKILL, current, 0); |
43403 | retval = -EINVAL; | 43412 | retval = -EINVAL; |
43404 | @@ -875,11 +1293,41 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | 43413 | @@ -875,17 +1290,44 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) |
43405 | goto out_free_dentry; | 43414 | goto out_free_dentry; |
43406 | } | 43415 | } |
43407 | if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) { | 43416 | if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) { |
@@ -43444,9 +43453,15 @@ index 0225fdd..9f0ef53 100644 | |||
43444 | +#endif | 43453 | +#endif |
43445 | + | 43454 | + |
43446 | if (elf_interpreter) { | 43455 | if (elf_interpreter) { |
43447 | unsigned long uninitialized_var(interp_map_addr); | 43456 | - unsigned long uninitialized_var(interp_map_addr); |
43448 | 43457 | - | |
43449 | @@ -1107,7 +1555,7 @@ static bool always_dump_vma(struct vm_area_struct *vma) | 43458 | elf_entry = load_elf_interp(&loc->interp_elf_ex, |
43459 | interpreter, | ||
43460 | - &interp_map_addr, | ||
43461 | load_bias); | ||
43462 | if (!IS_ERR((void *)elf_entry)) { | ||
43463 | /* | ||
43464 | @@ -1107,7 +1549,7 @@ static bool always_dump_vma(struct vm_area_struct *vma) | ||
43450 | * Decide what to dump of a segment, part, all or none. | 43465 | * Decide what to dump of a segment, part, all or none. |
43451 | */ | 43466 | */ |
43452 | static unsigned long vma_dump_size(struct vm_area_struct *vma, | 43467 | static unsigned long vma_dump_size(struct vm_area_struct *vma, |
@@ -43455,7 +43470,7 @@ index 0225fdd..9f0ef53 100644 | |||
43455 | { | 43470 | { |
43456 | #define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type)) | 43471 | #define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type)) |
43457 | 43472 | ||
43458 | @@ -1144,7 +1592,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma, | 43473 | @@ -1144,7 +1586,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma, |
43459 | if (vma->vm_file == NULL) | 43474 | if (vma->vm_file == NULL) |
43460 | return 0; | 43475 | return 0; |
43461 | 43476 | ||
@@ -43464,7 +43479,7 @@ index 0225fdd..9f0ef53 100644 | |||
43464 | goto whole; | 43479 | goto whole; |
43465 | 43480 | ||
43466 | /* | 43481 | /* |
43467 | @@ -1366,9 +1814,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm) | 43482 | @@ -1366,9 +1808,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm) |
43468 | { | 43483 | { |
43469 | elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv; | 43484 | elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv; |
43470 | int i = 0; | 43485 | int i = 0; |
@@ -43476,7 +43491,7 @@ index 0225fdd..9f0ef53 100644 | |||
43476 | fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv); | 43491 | fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv); |
43477 | } | 43492 | } |
43478 | 43493 | ||
43479 | @@ -1879,14 +2327,14 @@ static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum, | 43494 | @@ -1879,14 +2321,14 @@ static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum, |
43480 | } | 43495 | } |
43481 | 43496 | ||
43482 | static size_t elf_core_vma_data_size(struct vm_area_struct *gate_vma, | 43497 | static size_t elf_core_vma_data_size(struct vm_area_struct *gate_vma, |
@@ -43493,7 +43508,7 @@ index 0225fdd..9f0ef53 100644 | |||
43493 | return size; | 43508 | return size; |
43494 | } | 43509 | } |
43495 | 43510 | ||
43496 | @@ -1980,7 +2428,7 @@ static int elf_core_dump(struct coredump_params *cprm) | 43511 | @@ -1980,7 +2422,7 @@ static int elf_core_dump(struct coredump_params *cprm) |
43497 | 43512 | ||
43498 | dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE); | 43513 | dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE); |
43499 | 43514 | ||
@@ -43502,7 +43517,7 @@ index 0225fdd..9f0ef53 100644 | |||
43502 | offset += elf_core_extra_data_size(); | 43517 | offset += elf_core_extra_data_size(); |
43503 | e_shoff = offset; | 43518 | e_shoff = offset; |
43504 | 43519 | ||
43505 | @@ -1994,10 +2442,12 @@ static int elf_core_dump(struct coredump_params *cprm) | 43520 | @@ -1994,10 +2436,12 @@ static int elf_core_dump(struct coredump_params *cprm) |
43506 | offset = dataoff; | 43521 | offset = dataoff; |
43507 | 43522 | ||
43508 | size += sizeof(*elf); | 43523 | size += sizeof(*elf); |
@@ -43515,7 +43530,7 @@ index 0225fdd..9f0ef53 100644 | |||
43515 | if (size > cprm->limit | 43530 | if (size > cprm->limit |
43516 | || !dump_write(cprm->file, phdr4note, sizeof(*phdr4note))) | 43531 | || !dump_write(cprm->file, phdr4note, sizeof(*phdr4note))) |
43517 | goto end_coredump; | 43532 | goto end_coredump; |
43518 | @@ -2011,7 +2461,7 @@ static int elf_core_dump(struct coredump_params *cprm) | 43533 | @@ -2011,7 +2455,7 @@ static int elf_core_dump(struct coredump_params *cprm) |
43519 | phdr.p_offset = offset; | 43534 | phdr.p_offset = offset; |
43520 | phdr.p_vaddr = vma->vm_start; | 43535 | phdr.p_vaddr = vma->vm_start; |
43521 | phdr.p_paddr = 0; | 43536 | phdr.p_paddr = 0; |
@@ -43524,7 +43539,7 @@ index 0225fdd..9f0ef53 100644 | |||
43524 | phdr.p_memsz = vma->vm_end - vma->vm_start; | 43539 | phdr.p_memsz = vma->vm_end - vma->vm_start; |
43525 | offset += phdr.p_filesz; | 43540 | offset += phdr.p_filesz; |
43526 | phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0; | 43541 | phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0; |
43527 | @@ -2022,6 +2472,7 @@ static int elf_core_dump(struct coredump_params *cprm) | 43542 | @@ -2022,6 +2466,7 @@ static int elf_core_dump(struct coredump_params *cprm) |
43528 | phdr.p_align = ELF_EXEC_PAGESIZE; | 43543 | phdr.p_align = ELF_EXEC_PAGESIZE; |
43529 | 43544 | ||
43530 | size += sizeof(phdr); | 43545 | size += sizeof(phdr); |
@@ -43532,7 +43547,7 @@ index 0225fdd..9f0ef53 100644 | |||
43532 | if (size > cprm->limit | 43547 | if (size > cprm->limit |
43533 | || !dump_write(cprm->file, &phdr, sizeof(phdr))) | 43548 | || !dump_write(cprm->file, &phdr, sizeof(phdr))) |
43534 | goto end_coredump; | 43549 | goto end_coredump; |
43535 | @@ -2046,7 +2497,7 @@ static int elf_core_dump(struct coredump_params *cprm) | 43550 | @@ -2046,7 +2491,7 @@ static int elf_core_dump(struct coredump_params *cprm) |
43536 | unsigned long addr; | 43551 | unsigned long addr; |
43537 | unsigned long end; | 43552 | unsigned long end; |
43538 | 43553 | ||
@@ -43541,7 +43556,7 @@ index 0225fdd..9f0ef53 100644 | |||
43541 | 43556 | ||
43542 | for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) { | 43557 | for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) { |
43543 | struct page *page; | 43558 | struct page *page; |
43544 | @@ -2055,6 +2506,7 @@ static int elf_core_dump(struct coredump_params *cprm) | 43559 | @@ -2055,6 +2500,7 @@ static int elf_core_dump(struct coredump_params *cprm) |
43545 | page = get_dump_page(addr); | 43560 | page = get_dump_page(addr); |
43546 | if (page) { | 43561 | if (page) { |
43547 | void *kaddr = kmap(page); | 43562 | void *kaddr = kmap(page); |
@@ -43549,7 +43564,7 @@ index 0225fdd..9f0ef53 100644 | |||
43549 | stop = ((size += PAGE_SIZE) > cprm->limit) || | 43564 | stop = ((size += PAGE_SIZE) > cprm->limit) || |
43550 | !dump_write(cprm->file, kaddr, | 43565 | !dump_write(cprm->file, kaddr, |
43551 | PAGE_SIZE); | 43566 | PAGE_SIZE); |
43552 | @@ -2072,6 +2524,7 @@ static int elf_core_dump(struct coredump_params *cprm) | 43567 | @@ -2072,6 +2518,7 @@ static int elf_core_dump(struct coredump_params *cprm) |
43553 | 43568 | ||
43554 | if (e_phnum == PN_XNUM) { | 43569 | if (e_phnum == PN_XNUM) { |
43555 | size += sizeof(*shdr4extnum); | 43570 | size += sizeof(*shdr4extnum); |
@@ -43557,7 +43572,7 @@ index 0225fdd..9f0ef53 100644 | |||
43557 | if (size > cprm->limit | 43572 | if (size > cprm->limit |
43558 | || !dump_write(cprm->file, shdr4extnum, | 43573 | || !dump_write(cprm->file, shdr4extnum, |
43559 | sizeof(*shdr4extnum))) | 43574 | sizeof(*shdr4extnum))) |
43560 | @@ -2092,6 +2545,97 @@ out: | 43575 | @@ -2092,6 +2539,97 @@ out: |
43561 | 43576 | ||
43562 | #endif /* CONFIG_ELF_CORE */ | 43577 | #endif /* CONFIG_ELF_CORE */ |
43563 | 43578 | ||
@@ -45589,10 +45604,10 @@ index 90d901f..159975f 100644 | |||
45589 | } | 45604 | } |
45590 | return 1; | 45605 | return 1; |
45591 | diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c | 45606 | diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c |
45592 | index 1b50890..e56c5ad 100644 | 45607 | index cf18217..8f6b9c3 100644 |
45593 | --- a/fs/ext4/balloc.c | 45608 | --- a/fs/ext4/balloc.c |
45594 | +++ b/fs/ext4/balloc.c | 45609 | +++ b/fs/ext4/balloc.c |
45595 | @@ -500,8 +500,8 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi, | 45610 | @@ -498,8 +498,8 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi, |
45596 | /* Hm, nope. Are (enough) root reserved clusters available? */ | 45611 | /* Hm, nope. Are (enough) root reserved clusters available? */ |
45597 | if (uid_eq(sbi->s_resuid, current_fsuid()) || | 45612 | if (uid_eq(sbi->s_resuid, current_fsuid()) || |
45598 | (!gid_eq(sbi->s_resgid, GLOBAL_ROOT_GID) && in_group_p(sbi->s_resgid)) || | 45613 | (!gid_eq(sbi->s_resgid, GLOBAL_ROOT_GID) && in_group_p(sbi->s_resgid)) || |
@@ -45604,7 +45619,7 @@ index 1b50890..e56c5ad 100644 | |||
45604 | if (free_clusters >= (nclusters + dirty_clusters)) | 45619 | if (free_clusters >= (nclusters + dirty_clusters)) |
45605 | return 1; | 45620 | return 1; |
45606 | diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h | 45621 | diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h |
45607 | index c3411d4..30e4f1b 100644 | 45622 | index 5c69f2b..05dec7f 100644 |
45608 | --- a/fs/ext4/ext4.h | 45623 | --- a/fs/ext4/ext4.h |
45609 | +++ b/fs/ext4/ext4.h | 45624 | +++ b/fs/ext4/ext4.h |
45610 | @@ -1248,19 +1248,19 @@ struct ext4_sb_info { | 45625 | @@ -1248,19 +1248,19 @@ struct ext4_sb_info { |
@@ -45638,7 +45653,7 @@ index c3411d4..30e4f1b 100644 | |||
45638 | 45653 | ||
45639 | /* locality groups */ | 45654 | /* locality groups */ |
45640 | diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c | 45655 | diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c |
45641 | index 8eae947..53fc27a 100644 | 45656 | index b26410c..7383d90 100644 |
45642 | --- a/fs/ext4/mballoc.c | 45657 | --- a/fs/ext4/mballoc.c |
45643 | +++ b/fs/ext4/mballoc.c | 45658 | +++ b/fs/ext4/mballoc.c |
45644 | @@ -1746,7 +1746,7 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac, | 45659 | @@ -1746,7 +1746,7 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac, |
@@ -45695,7 +45710,7 @@ index 8eae947..53fc27a 100644 | |||
45695 | } | 45710 | } |
45696 | 45711 | ||
45697 | free_percpu(sbi->s_locality_groups); | 45712 | free_percpu(sbi->s_locality_groups); |
45698 | @@ -3052,16 +3052,16 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac) | 45713 | @@ -3051,16 +3051,16 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac) |
45699 | struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb); | 45714 | struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb); |
45700 | 45715 | ||
45701 | if (sbi->s_mb_stats && ac->ac_g_ex.fe_len > 1) { | 45716 | if (sbi->s_mb_stats && ac->ac_g_ex.fe_len > 1) { |
@@ -45718,7 +45733,7 @@ index 8eae947..53fc27a 100644 | |||
45718 | } | 45733 | } |
45719 | 45734 | ||
45720 | if (ac->ac_op == EXT4_MB_HISTORY_ALLOC) | 45735 | if (ac->ac_op == EXT4_MB_HISTORY_ALLOC) |
45721 | @@ -3461,7 +3461,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac) | 45736 | @@ -3460,7 +3460,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac) |
45722 | trace_ext4_mb_new_inode_pa(ac, pa); | 45737 | trace_ext4_mb_new_inode_pa(ac, pa); |
45723 | 45738 | ||
45724 | ext4_mb_use_inode_pa(ac, pa); | 45739 | ext4_mb_use_inode_pa(ac, pa); |
@@ -45727,7 +45742,7 @@ index 8eae947..53fc27a 100644 | |||
45727 | 45742 | ||
45728 | ei = EXT4_I(ac->ac_inode); | 45743 | ei = EXT4_I(ac->ac_inode); |
45729 | grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group); | 45744 | grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group); |
45730 | @@ -3521,7 +3521,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac) | 45745 | @@ -3520,7 +3520,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac) |
45731 | trace_ext4_mb_new_group_pa(ac, pa); | 45746 | trace_ext4_mb_new_group_pa(ac, pa); |
45732 | 45747 | ||
45733 | ext4_mb_use_group_pa(ac, pa); | 45748 | ext4_mb_use_group_pa(ac, pa); |
@@ -45736,7 +45751,7 @@ index 8eae947..53fc27a 100644 | |||
45736 | 45751 | ||
45737 | grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group); | 45752 | grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group); |
45738 | lg = ac->ac_lg; | 45753 | lg = ac->ac_lg; |
45739 | @@ -3610,7 +3610,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, | 45754 | @@ -3609,7 +3609,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, |
45740 | * from the bitmap and continue. | 45755 | * from the bitmap and continue. |
45741 | */ | 45756 | */ |
45742 | } | 45757 | } |
@@ -45745,7 +45760,7 @@ index 8eae947..53fc27a 100644 | |||
45745 | 45760 | ||
45746 | return err; | 45761 | return err; |
45747 | } | 45762 | } |
45748 | @@ -3628,7 +3628,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b, | 45763 | @@ -3627,7 +3627,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b, |
45749 | ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit); | 45764 | ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit); |
45750 | BUG_ON(group != e4b->bd_group && pa->pa_len != 0); | 45765 | BUG_ON(group != e4b->bd_group && pa->pa_len != 0); |
45751 | mb_free_blocks(pa->pa_inode, e4b, bit, pa->pa_len); | 45766 | mb_free_blocks(pa->pa_inode, e4b, bit, pa->pa_len); |
@@ -64262,7 +64277,7 @@ index edd0868..f98feee 100644 | |||
64262 | 64277 | ||
64263 | /* shm_mode upper byte flags */ | 64278 | /* shm_mode upper byte flags */ |
64264 | diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h | 64279 | diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h |
64265 | index 7632c87..8fd660f 100644 | 64280 | index f3165d2..2cb3cb7 100644 |
64266 | --- a/include/linux/skbuff.h | 64281 | --- a/include/linux/skbuff.h |
64267 | +++ b/include/linux/skbuff.h | 64282 | +++ b/include/linux/skbuff.h |
64268 | @@ -577,7 +577,7 @@ extern bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, | 64283 | @@ -577,7 +577,7 @@ extern bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, |
@@ -64274,7 +64289,7 @@ index 7632c87..8fd660f 100644 | |||
64274 | gfp_t priority) | 64289 | gfp_t priority) |
64275 | { | 64290 | { |
64276 | return __alloc_skb(size, priority, 0, NUMA_NO_NODE); | 64291 | return __alloc_skb(size, priority, 0, NUMA_NO_NODE); |
64277 | @@ -690,7 +690,7 @@ static inline struct skb_shared_hwtstamps *skb_hwtstamps(struct sk_buff *skb) | 64292 | @@ -687,7 +687,7 @@ static inline struct skb_shared_hwtstamps *skb_hwtstamps(struct sk_buff *skb) |
64278 | */ | 64293 | */ |
64279 | static inline int skb_queue_empty(const struct sk_buff_head *list) | 64294 | static inline int skb_queue_empty(const struct sk_buff_head *list) |
64280 | { | 64295 | { |
@@ -64283,7 +64298,7 @@ index 7632c87..8fd660f 100644 | |||
64283 | } | 64298 | } |
64284 | 64299 | ||
64285 | /** | 64300 | /** |
64286 | @@ -703,7 +703,7 @@ static inline int skb_queue_empty(const struct sk_buff_head *list) | 64301 | @@ -700,7 +700,7 @@ static inline int skb_queue_empty(const struct sk_buff_head *list) |
64287 | static inline bool skb_queue_is_last(const struct sk_buff_head *list, | 64302 | static inline bool skb_queue_is_last(const struct sk_buff_head *list, |
64288 | const struct sk_buff *skb) | 64303 | const struct sk_buff *skb) |
64289 | { | 64304 | { |
@@ -64292,7 +64307,7 @@ index 7632c87..8fd660f 100644 | |||
64292 | } | 64307 | } |
64293 | 64308 | ||
64294 | /** | 64309 | /** |
64295 | @@ -716,7 +716,7 @@ static inline bool skb_queue_is_last(const struct sk_buff_head *list, | 64310 | @@ -713,7 +713,7 @@ static inline bool skb_queue_is_last(const struct sk_buff_head *list, |
64296 | static inline bool skb_queue_is_first(const struct sk_buff_head *list, | 64311 | static inline bool skb_queue_is_first(const struct sk_buff_head *list, |
64297 | const struct sk_buff *skb) | 64312 | const struct sk_buff *skb) |
64298 | { | 64313 | { |
@@ -64301,7 +64316,7 @@ index 7632c87..8fd660f 100644 | |||
64301 | } | 64316 | } |
64302 | 64317 | ||
64303 | /** | 64318 | /** |
64304 | @@ -1626,7 +1626,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len) | 64319 | @@ -1623,7 +1623,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len) |
64305 | * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) | 64320 | * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) |
64306 | */ | 64321 | */ |
64307 | #ifndef NET_SKB_PAD | 64322 | #ifndef NET_SKB_PAD |
@@ -64310,7 +64325,7 @@ index 7632c87..8fd660f 100644 | |||
64310 | #endif | 64325 | #endif |
64311 | 64326 | ||
64312 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); | 64327 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); |
64313 | @@ -2204,7 +2204,7 @@ extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, | 64328 | @@ -2201,7 +2201,7 @@ extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, |
64314 | int noblock, int *err); | 64329 | int noblock, int *err); |
64315 | extern unsigned int datagram_poll(struct file *file, struct socket *sock, | 64330 | extern unsigned int datagram_poll(struct file *file, struct socket *sock, |
64316 | struct poll_table_struct *wait); | 64331 | struct poll_table_struct *wait); |
@@ -65037,10 +65052,10 @@ index 9e5425b..8136ffc 100644 | |||
65037 | /* Protects from simultaneous access to first_req list */ | 65052 | /* Protects from simultaneous access to first_req list */ |
65038 | spinlock_t info_list_lock; | 65053 | spinlock_t info_list_lock; |
65039 | diff --git a/include/net/flow.h b/include/net/flow.h | 65054 | diff --git a/include/net/flow.h b/include/net/flow.h |
65040 | index e1dd508..2873851 100644 | 65055 | index 628e11b..4c475df 100644 |
65041 | --- a/include/net/flow.h | 65056 | --- a/include/net/flow.h |
65042 | +++ b/include/net/flow.h | 65057 | +++ b/include/net/flow.h |
65043 | @@ -220,6 +220,6 @@ extern struct flow_cache_object *flow_cache_lookup( | 65058 | @@ -221,6 +221,6 @@ extern struct flow_cache_object *flow_cache_lookup( |
65044 | 65059 | ||
65045 | extern void flow_cache_flush(void); | 65060 | extern void flow_cache_flush(void); |
65046 | extern void flow_cache_flush_deferred(void); | 65061 | extern void flow_cache_flush_deferred(void); |
@@ -66521,10 +66536,10 @@ index 493d972..ea17248 100644 | |||
66521 | + return ns_capable_nolog(ns, cap) && kuid_has_mapping(ns, inode->i_uid); | 66536 | + return ns_capable_nolog(ns, cap) && kuid_has_mapping(ns, inode->i_uid); |
66522 | +} | 66537 | +} |
66523 | diff --git a/kernel/cgroup.c b/kernel/cgroup.c | 66538 | diff --git a/kernel/cgroup.c b/kernel/cgroup.c |
66524 | index 7981850..370878f 100644 | 66539 | index ff2bce5..a41e8f9 100644 |
66525 | --- a/kernel/cgroup.c | 66540 | --- a/kernel/cgroup.c |
66526 | +++ b/kernel/cgroup.c | 66541 | +++ b/kernel/cgroup.c |
66527 | @@ -5411,7 +5411,7 @@ static int cgroup_css_links_read(struct cgroup *cont, | 66542 | @@ -5390,7 +5390,7 @@ static int cgroup_css_links_read(struct cgroup *cont, |
66528 | struct css_set *cg = link->cg; | 66543 | struct css_set *cg = link->cg; |
66529 | struct task_struct *task; | 66544 | struct task_struct *task; |
66530 | int count = 0; | 66545 | int count = 0; |
@@ -70140,7 +70155,7 @@ index 2095be3..9a5b89d 100644 | |||
70140 | } | 70155 | } |
70141 | EXPORT_SYMBOL_GPL(__srcu_read_unlock); | 70156 | EXPORT_SYMBOL_GPL(__srcu_read_unlock); |
70142 | diff --git a/kernel/sys.c b/kernel/sys.c | 70157 | diff --git a/kernel/sys.c b/kernel/sys.c |
70143 | index 6fab59a..4ad079b 100644 | 70158 | index 909148a..cd51acf 100644 |
70144 | --- a/kernel/sys.c | 70159 | --- a/kernel/sys.c |
70145 | +++ b/kernel/sys.c | 70160 | +++ b/kernel/sys.c |
70146 | @@ -157,6 +157,12 @@ static int set_one_prio(struct task_struct *p, int niceval, int error) | 70161 | @@ -157,6 +157,12 @@ static int set_one_prio(struct task_struct *p, int niceval, int error) |
@@ -70264,35 +70279,7 @@ index 6fab59a..4ad079b 100644 | |||
70264 | abort_creds(new); | 70279 | abort_creds(new); |
70265 | return old_fsgid; | 70280 | return old_fsgid; |
70266 | 70281 | ||
70267 | @@ -1265,13 +1301,13 @@ DECLARE_RWSEM(uts_sem); | 70282 | @@ -1340,19 +1376,19 @@ SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name) |
70268 | * Work around broken programs that cannot handle "Linux 3.0". | ||
70269 | * Instead we map 3.x to 2.6.40+x, so e.g. 3.0 would be 2.6.40 | ||
70270 | */ | ||
70271 | -static int override_release(char __user *release, int len) | ||
70272 | +static int override_release(char __user *release, size_t len) | ||
70273 | { | ||
70274 | int ret = 0; | ||
70275 | - char buf[65]; | ||
70276 | |||
70277 | if (current->personality & UNAME26) { | ||
70278 | - char *rest = UTS_RELEASE; | ||
70279 | + char buf[65] = { 0 }; | ||
70280 | + const char *rest = UTS_RELEASE; | ||
70281 | int ndots = 0; | ||
70282 | unsigned v; | ||
70283 | |||
70284 | @@ -1283,7 +1319,10 @@ static int override_release(char __user *release, int len) | ||
70285 | rest++; | ||
70286 | } | ||
70287 | v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40; | ||
70288 | + if (sizeof buf < len) | ||
70289 | + len = sizeof buf; | ||
70290 | snprintf(buf, len, "2.6.%u%s", v, rest); | ||
70291 | + buf[len - 1] = 0; | ||
70292 | ret = copy_to_user(release, buf, len); | ||
70293 | } | ||
70294 | return ret; | ||
70295 | @@ -1338,19 +1377,19 @@ SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name) | ||
70296 | return -EFAULT; | 70283 | return -EFAULT; |
70297 | 70284 | ||
70298 | down_read(&uts_sem); | 70285 | down_read(&uts_sem); |
@@ -70317,7 +70304,7 @@ index 6fab59a..4ad079b 100644 | |||
70317 | __OLD_UTS_LEN); | 70304 | __OLD_UTS_LEN); |
70318 | error |= __put_user(0, name->machine + __OLD_UTS_LEN); | 70305 | error |= __put_user(0, name->machine + __OLD_UTS_LEN); |
70319 | up_read(&uts_sem); | 70306 | up_read(&uts_sem); |
70320 | @@ -2024,7 +2063,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, | 70307 | @@ -2026,7 +2062,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, |
70321 | error = get_dumpable(me->mm); | 70308 | error = get_dumpable(me->mm); |
70322 | break; | 70309 | break; |
70323 | case PR_SET_DUMPABLE: | 70310 | case PR_SET_DUMPABLE: |
@@ -76384,7 +76371,7 @@ index 0337e2b..47914a0 100644 | |||
76384 | 76371 | ||
76385 | return err; | 76372 | return err; |
76386 | diff --git a/net/core/dev.c b/net/core/dev.c | 76373 | diff --git a/net/core/dev.c b/net/core/dev.c |
76387 | index 89e33a5..16d9d25 100644 | 76374 | index 2fb9f59..d9a07df 100644 |
76388 | --- a/net/core/dev.c | 76375 | --- a/net/core/dev.c |
76389 | +++ b/net/core/dev.c | 76376 | +++ b/net/core/dev.c |
76390 | @@ -1138,9 +1138,13 @@ void dev_load(struct net *net, const char *name) | 76377 | @@ -1138,9 +1138,13 @@ void dev_load(struct net *net, const char *name) |
@@ -76446,7 +76433,7 @@ index 89e33a5..16d9d25 100644 | |||
76446 | { | 76433 | { |
76447 | struct softnet_data *sd = &__get_cpu_var(softnet_data); | 76434 | struct softnet_data *sd = &__get_cpu_var(softnet_data); |
76448 | 76435 | ||
76449 | @@ -3328,7 +3332,7 @@ ncls: | 76436 | @@ -3331,7 +3335,7 @@ ncls: |
76450 | ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev); | 76437 | ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev); |
76451 | } else { | 76438 | } else { |
76452 | drop: | 76439 | drop: |
@@ -76455,7 +76442,7 @@ index 89e33a5..16d9d25 100644 | |||
76455 | kfree_skb(skb); | 76442 | kfree_skb(skb); |
76456 | /* Jamal, now you will not able to escape explaining | 76443 | /* Jamal, now you will not able to escape explaining |
76457 | * me how you were going to use this. :-) | 76444 | * me how you were going to use this. :-) |
76458 | @@ -3895,7 +3899,7 @@ void netif_napi_del(struct napi_struct *napi) | 76445 | @@ -3898,7 +3902,7 @@ void netif_napi_del(struct napi_struct *napi) |
76459 | } | 76446 | } |
76460 | EXPORT_SYMBOL(netif_napi_del); | 76447 | EXPORT_SYMBOL(netif_napi_del); |
76461 | 76448 | ||
@@ -76464,7 +76451,7 @@ index 89e33a5..16d9d25 100644 | |||
76464 | { | 76451 | { |
76465 | struct softnet_data *sd = &__get_cpu_var(softnet_data); | 76452 | struct softnet_data *sd = &__get_cpu_var(softnet_data); |
76466 | unsigned long time_limit = jiffies + 2; | 76453 | unsigned long time_limit = jiffies + 2; |
76467 | @@ -4365,8 +4369,13 @@ static int ptype_seq_show(struct seq_file *seq, void *v) | 76454 | @@ -4368,8 +4372,13 @@ static int ptype_seq_show(struct seq_file *seq, void *v) |
76468 | else | 76455 | else |
76469 | seq_printf(seq, "%04x", ntohs(pt->type)); | 76456 | seq_printf(seq, "%04x", ntohs(pt->type)); |
76470 | 76457 | ||
@@ -76478,7 +76465,7 @@ index 89e33a5..16d9d25 100644 | |||
76478 | } | 76465 | } |
76479 | 76466 | ||
76480 | return 0; | 76467 | return 0; |
76481 | @@ -5919,7 +5928,7 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, | 76468 | @@ -5922,7 +5931,7 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, |
76482 | } else { | 76469 | } else { |
76483 | netdev_stats_to_stats64(storage, &dev->stats); | 76470 | netdev_stats_to_stats64(storage, &dev->stats); |
76484 | } | 76471 | } |
@@ -76754,10 +76741,10 @@ index a55eecc..dd8428c 100644 | |||
76754 | 76741 | ||
76755 | *lenp = len; | 76742 | *lenp = len; |
76756 | diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c | 76743 | diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c |
76757 | index 8e2b475..7263d89 100644 | 76744 | index f444ac7..b7bdda9 100644 |
76758 | --- a/net/ipv4/fib_frontend.c | 76745 | --- a/net/ipv4/fib_frontend.c |
76759 | +++ b/net/ipv4/fib_frontend.c | 76746 | +++ b/net/ipv4/fib_frontend.c |
76760 | @@ -1019,12 +1019,12 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, | 76747 | @@ -1020,12 +1020,12 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, |
76761 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | 76748 | #ifdef CONFIG_IP_ROUTE_MULTIPATH |
76762 | fib_sync_up(dev); | 76749 | fib_sync_up(dev); |
76763 | #endif | 76750 | #endif |
@@ -76772,7 +76759,7 @@ index 8e2b475..7263d89 100644 | |||
76772 | if (ifa->ifa_dev->ifa_list == NULL) { | 76759 | if (ifa->ifa_dev->ifa_list == NULL) { |
76773 | /* Last address was deleted from this interface. | 76760 | /* Last address was deleted from this interface. |
76774 | * Disable IP. | 76761 | * Disable IP. |
76775 | @@ -1061,7 +1061,7 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo | 76762 | @@ -1062,7 +1062,7 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo |
76776 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | 76763 | #ifdef CONFIG_IP_ROUTE_MULTIPATH |
76777 | fib_sync_up(dev); | 76764 | fib_sync_up(dev); |
76778 | #endif | 76765 | #endif |
@@ -76782,7 +76769,7 @@ index 8e2b475..7263d89 100644 | |||
76782 | break; | 76769 | break; |
76783 | case NETDEV_DOWN: | 76770 | case NETDEV_DOWN: |
76784 | diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c | 76771 | diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c |
76785 | index a747100..c5c8de1 100644 | 76772 | index 9633661..4e0bc08 100644 |
76786 | --- a/net/ipv4/fib_semantics.c | 76773 | --- a/net/ipv4/fib_semantics.c |
76787 | +++ b/net/ipv4/fib_semantics.c | 76774 | +++ b/net/ipv4/fib_semantics.c |
76788 | @@ -767,7 +767,7 @@ __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh) | 76775 | @@ -767,7 +767,7 @@ __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh) |
@@ -77078,10 +77065,10 @@ index d23c657..cb69cc2 100644 | |||
77078 | 77065 | ||
77079 | static int raw_seq_show(struct seq_file *seq, void *v) | 77066 | static int raw_seq_show(struct seq_file *seq, void *v) |
77080 | diff --git a/net/ipv4/route.c b/net/ipv4/route.c | 77067 | diff --git a/net/ipv4/route.c b/net/ipv4/route.c |
77081 | index fd9af60..dca4e54 100644 | 77068 | index 2a1383c..ff99572 100644 |
77082 | --- a/net/ipv4/route.c | 77069 | --- a/net/ipv4/route.c |
77083 | +++ b/net/ipv4/route.c | 77070 | +++ b/net/ipv4/route.c |
77084 | @@ -2501,7 +2501,7 @@ static __net_initdata struct pernet_operations sysctl_route_ops = { | 77071 | @@ -2523,7 +2523,7 @@ static __net_initdata struct pernet_operations sysctl_route_ops = { |
77085 | 77072 | ||
77086 | static __net_init int rt_genid_init(struct net *net) | 77073 | static __net_init int rt_genid_init(struct net *net) |
77087 | { | 77074 | { |
@@ -77104,7 +77091,7 @@ index d377f48..c2211ed 100644 | |||
77104 | u32 start, u32 end) | 77091 | u32 start, u32 end) |
77105 | { | 77092 | { |
77106 | diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c | 77093 | diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c |
77107 | index 00a748d..e6d546b 100644 | 77094 | index db7bfad..bfea796 100644 |
77108 | --- a/net/ipv4/tcp_ipv4.c | 77095 | --- a/net/ipv4/tcp_ipv4.c |
77109 | +++ b/net/ipv4/tcp_ipv4.c | 77096 | +++ b/net/ipv4/tcp_ipv4.c |
77110 | @@ -90,6 +90,10 @@ int sysctl_tcp_low_latency __read_mostly; | 77097 | @@ -90,6 +90,10 @@ int sysctl_tcp_low_latency __read_mostly; |
@@ -77118,7 +77105,7 @@ index 00a748d..e6d546b 100644 | |||
77118 | #ifdef CONFIG_TCP_MD5SIG | 77105 | #ifdef CONFIG_TCP_MD5SIG |
77119 | static int tcp_v4_md5_hash_hdr(char *md5_hash, const struct tcp_md5sig_key *key, | 77106 | static int tcp_v4_md5_hash_hdr(char *md5_hash, const struct tcp_md5sig_key *key, |
77120 | __be32 daddr, __be32 saddr, const struct tcphdr *th); | 77107 | __be32 daddr, __be32 saddr, const struct tcphdr *th); |
77121 | @@ -1663,6 +1667,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) | 77108 | @@ -1664,6 +1668,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) |
77122 | return 0; | 77109 | return 0; |
77123 | 77110 | ||
77124 | reset: | 77111 | reset: |
@@ -77128,7 +77115,7 @@ index 00a748d..e6d546b 100644 | |||
77128 | tcp_v4_send_reset(rsk, skb); | 77115 | tcp_v4_send_reset(rsk, skb); |
77129 | discard: | 77116 | discard: |
77130 | kfree_skb(skb); | 77117 | kfree_skb(skb); |
77131 | @@ -1763,12 +1770,19 @@ int tcp_v4_rcv(struct sk_buff *skb) | 77118 | @@ -1764,12 +1771,19 @@ int tcp_v4_rcv(struct sk_buff *skb) |
77132 | TCP_SKB_CB(skb)->sacked = 0; | 77119 | TCP_SKB_CB(skb)->sacked = 0; |
77133 | 77120 | ||
77134 | sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest); | 77121 | sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest); |
@@ -77151,7 +77138,7 @@ index 00a748d..e6d546b 100644 | |||
77151 | 77138 | ||
77152 | if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) { | 77139 | if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) { |
77153 | NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP); | 77140 | NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP); |
77154 | @@ -1819,6 +1833,10 @@ no_tcp_socket: | 77141 | @@ -1820,6 +1834,10 @@ no_tcp_socket: |
77155 | bad_packet: | 77142 | bad_packet: |
77156 | TCP_INC_STATS_BH(net, TCP_MIB_INERRS); | 77143 | TCP_INC_STATS_BH(net, TCP_MIB_INERRS); |
77157 | } else { | 77144 | } else { |
@@ -77162,7 +77149,7 @@ index 00a748d..e6d546b 100644 | |||
77162 | tcp_v4_send_reset(NULL, skb); | 77149 | tcp_v4_send_reset(NULL, skb); |
77163 | } | 77150 | } |
77164 | 77151 | ||
77165 | @@ -2414,7 +2432,11 @@ static void get_openreq4(const struct sock *sk, const struct request_sock *req, | 77152 | @@ -2415,7 +2433,11 @@ static void get_openreq4(const struct sock *sk, const struct request_sock *req, |
77166 | 0, /* non standard timer */ | 77153 | 0, /* non standard timer */ |
77167 | 0, /* open_requests have no inode */ | 77154 | 0, /* open_requests have no inode */ |
77168 | atomic_read(&sk->sk_refcnt), | 77155 | atomic_read(&sk->sk_refcnt), |
@@ -77174,7 +77161,7 @@ index 00a748d..e6d546b 100644 | |||
77174 | len); | 77161 | len); |
77175 | } | 77162 | } |
77176 | 77163 | ||
77177 | @@ -2464,7 +2486,12 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len) | 77164 | @@ -2465,7 +2487,12 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len) |
77178 | sock_i_uid(sk), | 77165 | sock_i_uid(sk), |
77179 | icsk->icsk_probes_out, | 77166 | icsk->icsk_probes_out, |
77180 | sock_i_ino(sk), | 77167 | sock_i_ino(sk), |
@@ -77188,7 +77175,7 @@ index 00a748d..e6d546b 100644 | |||
77188 | jiffies_to_clock_t(icsk->icsk_rto), | 77175 | jiffies_to_clock_t(icsk->icsk_rto), |
77189 | jiffies_to_clock_t(icsk->icsk_ack.ato), | 77176 | jiffies_to_clock_t(icsk->icsk_ack.ato), |
77190 | (icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong, | 77177 | (icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong, |
77191 | @@ -2492,7 +2519,13 @@ static void get_timewait4_sock(const struct inet_timewait_sock *tw, | 77178 | @@ -2493,7 +2520,13 @@ static void get_timewait4_sock(const struct inet_timewait_sock *tw, |
77192 | " %02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %pK%n", | 77179 | " %02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %pK%n", |
77193 | i, src, srcp, dest, destp, tw->tw_substate, 0, 0, | 77180 | i, src, srcp, dest, destp, tw->tw_substate, 0, 0, |
77194 | 3, jiffies_to_clock_t(ttd), 0, 0, 0, 0, | 77181 | 3, jiffies_to_clock_t(ttd), 0, 0, 0, 0, |
@@ -77397,7 +77384,7 @@ index 2814f66..fa2b223 100644 | |||
77397 | 77384 | ||
77398 | int udp4_seq_show(struct seq_file *seq, void *v) | 77385 | int udp4_seq_show(struct seq_file *seq, void *v) |
77399 | diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c | 77386 | diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c |
77400 | index ea3e9af..b60262e 100644 | 77387 | index b10374d..0baa1f9 100644 |
77401 | --- a/net/ipv6/addrconf.c | 77388 | --- a/net/ipv6/addrconf.c |
77402 | +++ b/net/ipv6/addrconf.c | 77389 | +++ b/net/ipv6/addrconf.c |
77403 | @@ -2144,7 +2144,7 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg) | 77390 | @@ -2144,7 +2144,7 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg) |
@@ -77562,7 +77549,7 @@ index 4a5f78b..3f22ebe 100644 | |||
77562 | 77549 | ||
77563 | static int raw6_seq_show(struct seq_file *seq, void *v) | 77550 | static int raw6_seq_show(struct seq_file *seq, void *v) |
77564 | diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c | 77551 | diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c |
77565 | index acd32e3..f73f8f7 100644 | 77552 | index 7e32d42..5d975ba 100644 |
77566 | --- a/net/ipv6/tcp_ipv6.c | 77553 | --- a/net/ipv6/tcp_ipv6.c |
77567 | +++ b/net/ipv6/tcp_ipv6.c | 77554 | +++ b/net/ipv6/tcp_ipv6.c |
77568 | @@ -106,6 +106,10 @@ static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) | 77555 | @@ -106,6 +106,10 @@ static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) |
@@ -77576,7 +77563,7 @@ index acd32e3..f73f8f7 100644 | |||
77576 | static void tcp_v6_hash(struct sock *sk) | 77563 | static void tcp_v6_hash(struct sock *sk) |
77577 | { | 77564 | { |
77578 | if (sk->sk_state != TCP_CLOSE) { | 77565 | if (sk->sk_state != TCP_CLOSE) { |
77579 | @@ -1510,6 +1514,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) | 77566 | @@ -1511,6 +1515,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) |
77580 | return 0; | 77567 | return 0; |
77581 | 77568 | ||
77582 | reset: | 77569 | reset: |
@@ -77586,7 +77573,7 @@ index acd32e3..f73f8f7 100644 | |||
77586 | tcp_v6_send_reset(sk, skb); | 77573 | tcp_v6_send_reset(sk, skb); |
77587 | discard: | 77574 | discard: |
77588 | if (opt_skb) | 77575 | if (opt_skb) |
77589 | @@ -1591,12 +1598,20 @@ static int tcp_v6_rcv(struct sk_buff *skb) | 77576 | @@ -1592,12 +1599,20 @@ static int tcp_v6_rcv(struct sk_buff *skb) |
77590 | TCP_SKB_CB(skb)->sacked = 0; | 77577 | TCP_SKB_CB(skb)->sacked = 0; |
77591 | 77578 | ||
77592 | sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest); | 77579 | sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest); |
@@ -77609,7 +77596,7 @@ index acd32e3..f73f8f7 100644 | |||
77609 | 77596 | ||
77610 | if (hdr->hop_limit < inet6_sk(sk)->min_hopcount) { | 77597 | if (hdr->hop_limit < inet6_sk(sk)->min_hopcount) { |
77611 | NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP); | 77598 | NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP); |
77612 | @@ -1645,6 +1660,10 @@ no_tcp_socket: | 77599 | @@ -1646,6 +1661,10 @@ no_tcp_socket: |
77613 | bad_packet: | 77600 | bad_packet: |
77614 | TCP_INC_STATS_BH(net, TCP_MIB_INERRS); | 77601 | TCP_INC_STATS_BH(net, TCP_MIB_INERRS); |
77615 | } else { | 77602 | } else { |
@@ -77620,7 +77607,7 @@ index acd32e3..f73f8f7 100644 | |||
77620 | tcp_v6_send_reset(NULL, skb); | 77607 | tcp_v6_send_reset(NULL, skb); |
77621 | } | 77608 | } |
77622 | 77609 | ||
77623 | @@ -1856,7 +1875,13 @@ static void get_openreq6(struct seq_file *seq, | 77610 | @@ -1857,7 +1876,13 @@ static void get_openreq6(struct seq_file *seq, |
77624 | uid, | 77611 | uid, |
77625 | 0, /* non standard timer */ | 77612 | 0, /* non standard timer */ |
77626 | 0, /* open_requests have no inode */ | 77613 | 0, /* open_requests have no inode */ |
@@ -77635,7 +77622,7 @@ index acd32e3..f73f8f7 100644 | |||
77635 | } | 77622 | } |
77636 | 77623 | ||
77637 | static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i) | 77624 | static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i) |
77638 | @@ -1906,7 +1931,12 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i) | 77625 | @@ -1907,7 +1932,12 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i) |
77639 | sock_i_uid(sp), | 77626 | sock_i_uid(sp), |
77640 | icsk->icsk_probes_out, | 77627 | icsk->icsk_probes_out, |
77641 | sock_i_ino(sp), | 77628 | sock_i_ino(sp), |
@@ -77649,7 +77636,7 @@ index acd32e3..f73f8f7 100644 | |||
77649 | jiffies_to_clock_t(icsk->icsk_rto), | 77636 | jiffies_to_clock_t(icsk->icsk_rto), |
77650 | jiffies_to_clock_t(icsk->icsk_ack.ato), | 77637 | jiffies_to_clock_t(icsk->icsk_ack.ato), |
77651 | (icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong, | 77638 | (icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong, |
77652 | @@ -1941,7 +1971,13 @@ static void get_timewait6_sock(struct seq_file *seq, | 77639 | @@ -1942,7 +1972,13 @@ static void get_timewait6_sock(struct seq_file *seq, |
77653 | dest->s6_addr32[2], dest->s6_addr32[3], destp, | 77640 | dest->s6_addr32[2], dest->s6_addr32[3], destp, |
77654 | tw->tw_substate, 0, 0, | 77641 | tw->tw_substate, 0, 0, |
77655 | 3, jiffies_to_clock_t(ttd), 0, 0, 0, 0, | 77642 | 3, jiffies_to_clock_t(ttd), 0, 0, 0, 0, |
@@ -78230,10 +78217,10 @@ index effa10c..9058928 100644 | |||
78230 | cp->old_state = cp->state; | 78217 | cp->old_state = cp->state; |
78231 | /* | 78218 | /* |
78232 | diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c | 78219 | diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c |
78233 | index 65b616a..760a66b 100644 | 78220 | index c3c6291..3376d73 100644 |
78234 | --- a/net/netfilter/ipvs/ip_vs_xmit.c | 78221 | --- a/net/netfilter/ipvs/ip_vs_xmit.c |
78235 | +++ b/net/netfilter/ipvs/ip_vs_xmit.c | 78222 | +++ b/net/netfilter/ipvs/ip_vs_xmit.c |
78236 | @@ -1151,7 +1151,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, | 78223 | @@ -1157,7 +1157,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, |
78237 | else | 78224 | else |
78238 | rc = NF_ACCEPT; | 78225 | rc = NF_ACCEPT; |
78239 | /* do not touch skb anymore */ | 78226 | /* do not touch skb anymore */ |
@@ -78242,7 +78229,7 @@ index 65b616a..760a66b 100644 | |||
78242 | goto out; | 78229 | goto out; |
78243 | } | 78230 | } |
78244 | 78231 | ||
78245 | @@ -1272,7 +1272,7 @@ ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, | 78232 | @@ -1278,7 +1278,7 @@ ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, |
78246 | else | 78233 | else |
78247 | rc = NF_ACCEPT; | 78234 | rc = NF_ACCEPT; |
78248 | /* do not touch skb anymore */ | 78235 | /* do not touch skb anymore */ |
@@ -78392,10 +78379,10 @@ index 4fe4fb4..87a89e5 100644 | |||
78392 | return 0; | 78379 | return 0; |
78393 | } | 78380 | } |
78394 | diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c | 78381 | diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c |
78395 | index 5270238..5d37fbc 100644 | 78382 | index 9172179..a4035c4 100644 |
78396 | --- a/net/netlink/af_netlink.c | 78383 | --- a/net/netlink/af_netlink.c |
78397 | +++ b/net/netlink/af_netlink.c | 78384 | +++ b/net/netlink/af_netlink.c |
78398 | @@ -767,7 +767,7 @@ static void netlink_overrun(struct sock *sk) | 78385 | @@ -769,7 +769,7 @@ static void netlink_overrun(struct sock *sk) |
78399 | sk->sk_error_report(sk); | 78386 | sk->sk_error_report(sk); |
78400 | } | 78387 | } |
78401 | } | 78388 | } |
@@ -78404,7 +78391,7 @@ index 5270238..5d37fbc 100644 | |||
78404 | } | 78391 | } |
78405 | 78392 | ||
78406 | static struct sock *netlink_getsockbypid(struct sock *ssk, u32 pid) | 78393 | static struct sock *netlink_getsockbypid(struct sock *ssk, u32 pid) |
78407 | @@ -2046,7 +2046,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v) | 78394 | @@ -2059,7 +2059,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v) |
78408 | sk_wmem_alloc_get(s), | 78395 | sk_wmem_alloc_get(s), |
78409 | nlk->cb, | 78396 | nlk->cb, |
78410 | atomic_read(&s->sk_refcnt), | 78397 | atomic_read(&s->sk_refcnt), |