diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-05-20 10:35:36 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-05-20 10:35:36 +0000 |
commit | a06f245009bedc8a7564225f7844c316ea6dd7f8 (patch) | |
tree | fd514bd2bb46645ac65b3cbdefdd319f315e1c54 | |
parent | 13e7303be19a003b85e73795409e1bcb7bfa9666 (diff) | |
download | alpine_aports-a06f245009bedc8a7564225f7844c316ea6dd7f8.tar.bz2 alpine_aports-a06f245009bedc8a7564225f7844c316ea6dd7f8.tar.xz alpine_aports-a06f245009bedc8a7564225f7844c316ea6dd7f8.zip |
main/linux-grsec: upgrade to 3.4.46
-rw-r--r-- | main/linux-grsec/APKBUILD | 8 | ||||
-rw-r--r-- | main/linux-grsec/grsecurity-2.9.1-3.4.46-0.patch (renamed from main/linux-grsec/grsecurity-2.9.1-3.4.45-0.patch) | 192 | ||||
-rw-r--r-- | main/linux-grsec/r8169-fix-vlan-tag-reordering.patch | 73 |
3 files changed, 99 insertions, 174 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD index 2bcb26fa98..c6918bd4d9 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.4.45 | 5 | pkgver=3.4.46 |
6 | _kernver=3.4 | 6 | _kernver=3.4 |
7 | pkgrel=0 | 7 | pkgrel=0 |
8 | pkgdesc="Linux kernel with grsecurity" | 8 | pkgdesc="Linux kernel with grsecurity" |
@@ -21,7 +21,6 @@ source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz | |||
21 | intel_idle.patch | 21 | intel_idle.patch |
22 | 22 | ||
23 | r8169-num-rx-desc.patch | 23 | r8169-num-rx-desc.patch |
24 | r8169-fix-vlan-tag-reordering.patch | ||
25 | 24 | ||
26 | kernelconfig.x86 | 25 | kernelconfig.x86 |
27 | kernelconfig.x86_64 | 26 | kernelconfig.x86_64 |
@@ -144,12 +143,11 @@ dev() { | |||
144 | } | 143 | } |
145 | 144 | ||
146 | md5sums="967f72983655e2479f951195953e8480 linux-3.4.tar.xz | 145 | md5sums="967f72983655e2479f951195953e8480 linux-3.4.tar.xz |
147 | adb183c04b48eb1276abcae46858dc29 patch-3.4.45.xz | 146 | e1d3a755f848fd62a568442721a612b9 patch-3.4.46.xz |
148 | df2f69cbe183fd07db7d7520659406a1 grsecurity-2.9.1-3.4.45-0.patch | 147 | 4bb10e5e64a6de50610052fd49112651 grsecurity-2.9.1-3.4.46-0.patch |
149 | 776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch | 148 | 776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch |
150 | cb6fcd6e966e73c87a839c4c0183f81f 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch | 149 | cb6fcd6e966e73c87a839c4c0183f81f 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch |
151 | d2f7ba780ff7567c21381428264d7fdd intel_idle.patch | 150 | d2f7ba780ff7567c21381428264d7fdd intel_idle.patch |
152 | daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch | 151 | daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch |
153 | 44a37e1289e1056300574848aea8bd31 r8169-fix-vlan-tag-reordering.patch | ||
154 | 50a13359236dbd676fa355f0b4fd27ff kernelconfig.x86 | 152 | 50a13359236dbd676fa355f0b4fd27ff kernelconfig.x86 |
155 | c402f52babc729d1280c1677075aa0d7 kernelconfig.x86_64" | 153 | c402f52babc729d1280c1677075aa0d7 kernelconfig.x86_64" |
diff --git a/main/linux-grsec/grsecurity-2.9.1-3.4.45-0.patch b/main/linux-grsec/grsecurity-2.9.1-3.4.46-0.patch index 043f0de09e..cc2fc56349 100644 --- a/main/linux-grsec/grsecurity-2.9.1-3.4.45-0.patch +++ b/main/linux-grsec/grsecurity-2.9.1-3.4.46-0.patch | |||
@@ -269,7 +269,7 @@ index 88fd7f5..b318a78 100644 | |||
269 | ============================================================== | 269 | ============================================================== |
270 | 270 | ||
271 | diff --git a/Makefile b/Makefile | 271 | diff --git a/Makefile b/Makefile |
272 | index 0ec4a35..f4096ca 100644 | 272 | index 3d88eb8..872526a 100644 |
273 | --- a/Makefile | 273 | --- a/Makefile |
274 | +++ b/Makefile | 274 | +++ b/Makefile |
275 | @@ -245,8 +245,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ | 275 | @@ -245,8 +245,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
@@ -20821,7 +20821,7 @@ index e334389..6839087 100644 | |||
20821 | 20821 | ||
20822 | local_irq_disable(); | 20822 | local_irq_disable(); |
20823 | diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c | 20823 | diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c |
20824 | index 4ff0ab9..fbab291 100644 | 20824 | index 90f5c0e..bf2f7d4 100644 |
20825 | --- a/arch/x86/kvm/vmx.c | 20825 | --- a/arch/x86/kvm/vmx.c |
20826 | +++ b/arch/x86/kvm/vmx.c | 20826 | +++ b/arch/x86/kvm/vmx.c |
20827 | @@ -1303,7 +1303,11 @@ static void reload_tss(void) | 20827 | @@ -1303,7 +1303,11 @@ static void reload_tss(void) |
@@ -20881,7 +20881,7 @@ index 4ff0ab9..fbab291 100644 | |||
20881 | 20881 | ||
20882 | rdmsr(MSR_IA32_SYSENTER_CS, low32, high32); | 20882 | rdmsr(MSR_IA32_SYSENTER_CS, low32, high32); |
20883 | vmcs_write32(HOST_IA32_SYSENTER_CS, low32); | 20883 | vmcs_write32(HOST_IA32_SYSENTER_CS, low32); |
20884 | @@ -6180,6 +6194,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) | 20884 | @@ -6186,6 +6200,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) |
20885 | "jmp .Lkvm_vmx_return \n\t" | 20885 | "jmp .Lkvm_vmx_return \n\t" |
20886 | ".Llaunched: " __ex(ASM_VMX_VMRESUME) "\n\t" | 20886 | ".Llaunched: " __ex(ASM_VMX_VMRESUME) "\n\t" |
20887 | ".Lkvm_vmx_return: " | 20887 | ".Lkvm_vmx_return: " |
@@ -20894,7 +20894,7 @@ index 4ff0ab9..fbab291 100644 | |||
20894 | /* Save guest registers, load host registers, keep flags */ | 20894 | /* Save guest registers, load host registers, keep flags */ |
20895 | "mov %0, %c[wordsize](%%"R"sp) \n\t" | 20895 | "mov %0, %c[wordsize](%%"R"sp) \n\t" |
20896 | "pop %0 \n\t" | 20896 | "pop %0 \n\t" |
20897 | @@ -6228,6 +6248,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) | 20897 | @@ -6234,6 +6254,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) |
20898 | #endif | 20898 | #endif |
20899 | [cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2)), | 20899 | [cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2)), |
20900 | [wordsize]"i"(sizeof(ulong)) | 20900 | [wordsize]"i"(sizeof(ulong)) |
@@ -20906,7 +20906,7 @@ index 4ff0ab9..fbab291 100644 | |||
20906 | : "cc", "memory" | 20906 | : "cc", "memory" |
20907 | , R"ax", R"bx", R"di", R"si" | 20907 | , R"ax", R"bx", R"di", R"si" |
20908 | #ifdef CONFIG_X86_64 | 20908 | #ifdef CONFIG_X86_64 |
20909 | @@ -6256,7 +6281,16 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) | 20909 | @@ -6262,7 +6287,16 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) |
20910 | } | 20910 | } |
20911 | } | 20911 | } |
20912 | 20912 | ||
@@ -27431,7 +27431,7 @@ index 00aaf04..4a26505 100644 | |||
27431 | -} | 27431 | -} |
27432 | -__setup("vdso=", vdso_setup); | 27432 | -__setup("vdso=", vdso_setup); |
27433 | diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c | 27433 | diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c |
27434 | index 2992678..c25a457 100644 | 27434 | index a7678fa..7c74192 100644 |
27435 | --- a/arch/x86/xen/enlighten.c | 27435 | --- a/arch/x86/xen/enlighten.c |
27436 | +++ b/arch/x86/xen/enlighten.c | 27436 | +++ b/arch/x86/xen/enlighten.c |
27437 | @@ -96,8 +96,6 @@ EXPORT_SYMBOL_GPL(xen_start_info); | 27437 | @@ -96,8 +96,6 @@ EXPORT_SYMBOL_GPL(xen_start_info); |
@@ -27443,7 +27443,7 @@ index 2992678..c25a457 100644 | |||
27443 | RESERVE_BRK(shared_info_page_brk, PAGE_SIZE); | 27443 | RESERVE_BRK(shared_info_page_brk, PAGE_SIZE); |
27444 | __read_mostly int xen_have_vector_callback; | 27444 | __read_mostly int xen_have_vector_callback; |
27445 | EXPORT_SYMBOL_GPL(xen_have_vector_callback); | 27445 | EXPORT_SYMBOL_GPL(xen_have_vector_callback); |
27446 | @@ -884,14 +882,14 @@ static u32 xen_safe_apic_wait_icr_idle(void) | 27446 | @@ -899,14 +897,14 @@ static u32 xen_safe_apic_wait_icr_idle(void) |
27447 | 27447 | ||
27448 | static void set_xen_basic_apic_ops(void) | 27448 | static void set_xen_basic_apic_ops(void) |
27449 | { | 27449 | { |
@@ -27466,7 +27466,7 @@ index 2992678..c25a457 100644 | |||
27466 | } | 27466 | } |
27467 | 27467 | ||
27468 | #endif | 27468 | #endif |
27469 | @@ -1182,30 +1180,30 @@ static const struct pv_apic_ops xen_apic_ops __initconst = { | 27469 | @@ -1197,30 +1195,30 @@ static const struct pv_apic_ops xen_apic_ops __initconst = { |
27470 | #endif | 27470 | #endif |
27471 | }; | 27471 | }; |
27472 | 27472 | ||
@@ -27504,7 +27504,7 @@ index 2992678..c25a457 100644 | |||
27504 | { | 27504 | { |
27505 | if (pm_power_off) | 27505 | if (pm_power_off) |
27506 | pm_power_off(); | 27506 | pm_power_off(); |
27507 | @@ -1308,7 +1306,17 @@ asmlinkage void __init xen_start_kernel(void) | 27507 | @@ -1323,7 +1321,17 @@ asmlinkage void __init xen_start_kernel(void) |
27508 | __userpte_alloc_gfp &= ~__GFP_HIGHMEM; | 27508 | __userpte_alloc_gfp &= ~__GFP_HIGHMEM; |
27509 | 27509 | ||
27510 | /* Work out if we support NX */ | 27510 | /* Work out if we support NX */ |
@@ -27523,7 +27523,7 @@ index 2992678..c25a457 100644 | |||
27523 | 27523 | ||
27524 | xen_setup_features(); | 27524 | xen_setup_features(); |
27525 | 27525 | ||
27526 | @@ -1339,13 +1347,6 @@ asmlinkage void __init xen_start_kernel(void) | 27526 | @@ -1354,13 +1362,6 @@ asmlinkage void __init xen_start_kernel(void) |
27527 | 27527 | ||
27528 | machine_ops = xen_machine_ops; | 27528 | machine_ops = xen_machine_ops; |
27529 | 27529 | ||
@@ -29614,7 +29614,7 @@ index 946166e..356b39a 100644 | |||
29614 | cn_reply->len = sizeof(struct drbd_nl_cfg_reply) + | 29614 | cn_reply->len = sizeof(struct drbd_nl_cfg_reply) + |
29615 | (int)((char *)tl - (char *)reply->tag_list); | 29615 | (int)((char *)tl - (char *)reply->tag_list); |
29616 | diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c | 29616 | diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c |
29617 | index 43beaca..4a5b1dd 100644 | 29617 | index 13cbdd3..26b88df 100644 |
29618 | --- a/drivers/block/drbd/drbd_receiver.c | 29618 | --- a/drivers/block/drbd/drbd_receiver.c |
29619 | +++ b/drivers/block/drbd/drbd_receiver.c | 29619 | +++ b/drivers/block/drbd/drbd_receiver.c |
29620 | @@ -894,7 +894,7 @@ retry: | 29620 | @@ -894,7 +894,7 @@ retry: |
@@ -29693,7 +29693,7 @@ index 43beaca..4a5b1dd 100644 | |||
29693 | atomic_inc(&e->epoch->active); | 29693 | atomic_inc(&e->epoch->active); |
29694 | spin_unlock(&mdev->epoch_lock); | 29694 | spin_unlock(&mdev->epoch_lock); |
29695 | 29695 | ||
29696 | @@ -3885,7 +3885,7 @@ static void drbd_disconnect(struct drbd_conf *mdev) | 29696 | @@ -3884,7 +3884,7 @@ static void drbd_disconnect(struct drbd_conf *mdev) |
29697 | D_ASSERT(list_empty(&mdev->done_ee)); | 29697 | D_ASSERT(list_empty(&mdev->done_ee)); |
29698 | 29698 | ||
29699 | /* ok, no more ee's on the fly, it is safe to reset the epoch_size */ | 29699 | /* ok, no more ee's on the fly, it is safe to reset the epoch_size */ |
@@ -35351,7 +35351,7 @@ index 4a518a3..936b334 100644 | |||
35351 | #define VXGE_HW_VIRTUAL_PATH_HANDLE(vpath) \ | 35351 | #define VXGE_HW_VIRTUAL_PATH_HANDLE(vpath) \ |
35352 | ((struct __vxge_hw_vpath_handle *)(vpath)->vpath_handles.next) | 35352 | ((struct __vxge_hw_vpath_handle *)(vpath)->vpath_handles.next) |
35353 | diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c | 35353 | diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c |
35354 | index dd037dd..7a8f862 100644 | 35354 | index cf20388..30f7d18 100644 |
35355 | --- a/drivers/net/ethernet/realtek/r8169.c | 35355 | --- a/drivers/net/ethernet/realtek/r8169.c |
35356 | +++ b/drivers/net/ethernet/realtek/r8169.c | 35356 | +++ b/drivers/net/ethernet/realtek/r8169.c |
35357 | @@ -710,17 +710,17 @@ struct rtl8169_private { | 35357 | @@ -710,17 +710,17 @@ struct rtl8169_private { |
@@ -45079,7 +45079,7 @@ index d918b55..d75e53c 100644 | |||
45079 | 45079 | ||
45080 | /* locality groups */ | 45080 | /* locality groups */ |
45081 | diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c | 45081 | diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c |
45082 | index ec970cb..3538f6f 100644 | 45082 | index 19e4518..187c008 100644 |
45083 | --- a/fs/ext4/mballoc.c | 45083 | --- a/fs/ext4/mballoc.c |
45084 | +++ b/fs/ext4/mballoc.c | 45084 | +++ b/fs/ext4/mballoc.c |
45085 | @@ -1747,7 +1747,7 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac, | 45085 | @@ -1747,7 +1747,7 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac, |
@@ -45091,7 +45091,7 @@ index ec970cb..3538f6f 100644 | |||
45091 | 45091 | ||
45092 | break; | 45092 | break; |
45093 | } | 45093 | } |
45094 | @@ -2041,7 +2041,7 @@ repeat: | 45094 | @@ -2045,7 +2045,7 @@ repeat: |
45095 | ac->ac_status = AC_STATUS_CONTINUE; | 45095 | ac->ac_status = AC_STATUS_CONTINUE; |
45096 | ac->ac_flags |= EXT4_MB_HINT_FIRST; | 45096 | ac->ac_flags |= EXT4_MB_HINT_FIRST; |
45097 | cr = 3; | 45097 | cr = 3; |
@@ -45100,7 +45100,7 @@ index ec970cb..3538f6f 100644 | |||
45100 | goto repeat; | 45100 | goto repeat; |
45101 | } | 45101 | } |
45102 | } | 45102 | } |
45103 | @@ -2545,25 +2545,25 @@ int ext4_mb_release(struct super_block *sb) | 45103 | @@ -2549,25 +2549,25 @@ int ext4_mb_release(struct super_block *sb) |
45104 | if (sbi->s_mb_stats) { | 45104 | if (sbi->s_mb_stats) { |
45105 | ext4_msg(sb, KERN_INFO, | 45105 | ext4_msg(sb, KERN_INFO, |
45106 | "mballoc: %u blocks %u reqs (%u success)", | 45106 | "mballoc: %u blocks %u reqs (%u success)", |
@@ -45136,7 +45136,7 @@ index ec970cb..3538f6f 100644 | |||
45136 | } | 45136 | } |
45137 | 45137 | ||
45138 | free_percpu(sbi->s_locality_groups); | 45138 | free_percpu(sbi->s_locality_groups); |
45139 | @@ -3045,16 +3045,16 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac) | 45139 | @@ -3049,16 +3049,16 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac) |
45140 | struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb); | 45140 | struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb); |
45141 | 45141 | ||
45142 | if (sbi->s_mb_stats && ac->ac_g_ex.fe_len > 1) { | 45142 | if (sbi->s_mb_stats && ac->ac_g_ex.fe_len > 1) { |
@@ -45159,7 +45159,7 @@ index ec970cb..3538f6f 100644 | |||
45159 | } | 45159 | } |
45160 | 45160 | ||
45161 | if (ac->ac_op == EXT4_MB_HISTORY_ALLOC) | 45161 | if (ac->ac_op == EXT4_MB_HISTORY_ALLOC) |
45162 | @@ -3458,7 +3458,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac) | 45162 | @@ -3462,7 +3462,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac) |
45163 | trace_ext4_mb_new_inode_pa(ac, pa); | 45163 | trace_ext4_mb_new_inode_pa(ac, pa); |
45164 | 45164 | ||
45165 | ext4_mb_use_inode_pa(ac, pa); | 45165 | ext4_mb_use_inode_pa(ac, pa); |
@@ -45168,7 +45168,7 @@ index ec970cb..3538f6f 100644 | |||
45168 | 45168 | ||
45169 | ei = EXT4_I(ac->ac_inode); | 45169 | ei = EXT4_I(ac->ac_inode); |
45170 | grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group); | 45170 | grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group); |
45171 | @@ -3518,7 +3518,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac) | 45171 | @@ -3522,7 +3522,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac) |
45172 | trace_ext4_mb_new_group_pa(ac, pa); | 45172 | trace_ext4_mb_new_group_pa(ac, pa); |
45173 | 45173 | ||
45174 | ext4_mb_use_group_pa(ac, pa); | 45174 | ext4_mb_use_group_pa(ac, pa); |
@@ -45177,7 +45177,7 @@ index ec970cb..3538f6f 100644 | |||
45177 | 45177 | ||
45178 | grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group); | 45178 | grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group); |
45179 | lg = ac->ac_lg; | 45179 | lg = ac->ac_lg; |
45180 | @@ -3607,7 +3607,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, | 45180 | @@ -3611,7 +3611,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, |
45181 | * from the bitmap and continue. | 45181 | * from the bitmap and continue. |
45182 | */ | 45182 | */ |
45183 | } | 45183 | } |
@@ -45186,7 +45186,7 @@ index ec970cb..3538f6f 100644 | |||
45186 | 45186 | ||
45187 | return err; | 45187 | return err; |
45188 | } | 45188 | } |
45189 | @@ -3625,7 +3625,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b, | 45189 | @@ -3629,7 +3629,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b, |
45190 | ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit); | 45190 | ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit); |
45191 | BUG_ON(group != e4b->bd_group && pa->pa_len != 0); | 45191 | BUG_ON(group != e4b->bd_group && pa->pa_len != 0); |
45192 | mb_free_blocks(pa->pa_inode, e4b, bit, pa->pa_len); | 45192 | mb_free_blocks(pa->pa_inode, e4b, bit, pa->pa_len); |
@@ -46857,7 +46857,7 @@ index a9ba244..d9df391 100644 | |||
46857 | kfree(s); | 46857 | kfree(s); |
46858 | } | 46858 | } |
46859 | diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c | 46859 | diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c |
46860 | index 001ef01..f7d5f07 100644 | 46860 | index 36ad5b4..a106a1d 100644 |
46861 | --- a/fs/hugetlbfs/inode.c | 46861 | --- a/fs/hugetlbfs/inode.c |
46862 | +++ b/fs/hugetlbfs/inode.c | 46862 | +++ b/fs/hugetlbfs/inode.c |
46863 | @@ -920,7 +920,7 @@ static struct file_system_type hugetlbfs_fs_type = { | 46863 | @@ -920,7 +920,7 @@ static struct file_system_type hugetlbfs_fs_type = { |
@@ -64896,7 +64896,7 @@ index a2ef814..31a8e3f 100644 | |||
64896 | #define SCTP_DISABLE_DEBUG | 64896 | #define SCTP_DISABLE_DEBUG |
64897 | #define SCTP_ASSERT(expr, str, func) | 64897 | #define SCTP_ASSERT(expr, str, func) |
64898 | diff --git a/include/net/sock.h b/include/net/sock.h | 64898 | diff --git a/include/net/sock.h b/include/net/sock.h |
64899 | index 59a8947..0e0bd26 100644 | 64899 | index f673ba5..04a6be7 100644 |
64900 | --- a/include/net/sock.h | 64900 | --- a/include/net/sock.h |
64901 | +++ b/include/net/sock.h | 64901 | +++ b/include/net/sock.h |
64902 | @@ -303,7 +303,7 @@ struct sock { | 64902 | @@ -303,7 +303,7 @@ struct sock { |
@@ -64908,7 +64908,7 @@ index 59a8947..0e0bd26 100644 | |||
64908 | int sk_rcvbuf; | 64908 | int sk_rcvbuf; |
64909 | 64909 | ||
64910 | struct sk_filter __rcu *sk_filter; | 64910 | struct sk_filter __rcu *sk_filter; |
64911 | @@ -1693,7 +1693,7 @@ static inline void sk_nocaps_add(struct sock *sk, netdev_features_t flags) | 64911 | @@ -1705,7 +1705,7 @@ static inline void sk_nocaps_add(struct sock *sk, netdev_features_t flags) |
64912 | } | 64912 | } |
64913 | 64913 | ||
64914 | static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb, | 64914 | static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb, |
@@ -64917,7 +64917,7 @@ index 59a8947..0e0bd26 100644 | |||
64917 | int copy, int offset) | 64917 | int copy, int offset) |
64918 | { | 64918 | { |
64919 | if (skb->ip_summed == CHECKSUM_NONE) { | 64919 | if (skb->ip_summed == CHECKSUM_NONE) { |
64920 | @@ -1955,7 +1955,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk) | 64920 | @@ -1967,7 +1967,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk) |
64921 | } | 64921 | } |
64922 | } | 64922 | } |
64923 | 64923 | ||
@@ -64927,7 +64927,7 @@ index 59a8947..0e0bd26 100644 | |||
64927 | static inline struct page *sk_stream_alloc_page(struct sock *sk) | 64927 | static inline struct page *sk_stream_alloc_page(struct sock *sk) |
64928 | { | 64928 | { |
64929 | diff --git a/include/net/tcp.h b/include/net/tcp.h | 64929 | diff --git a/include/net/tcp.h b/include/net/tcp.h |
64930 | index 2757a11..39b0464 100644 | 64930 | index 8376a6a..efb6a24 100644 |
64931 | --- a/include/net/tcp.h | 64931 | --- a/include/net/tcp.h |
64932 | +++ b/include/net/tcp.h | 64932 | +++ b/include/net/tcp.h |
64933 | @@ -479,7 +479,7 @@ extern void tcp_retransmit_timer(struct sock *sk); | 64933 | @@ -479,7 +479,7 @@ extern void tcp_retransmit_timer(struct sock *sk); |
@@ -64959,7 +64959,7 @@ index 2757a11..39b0464 100644 | |||
64959 | }; | 64959 | }; |
64960 | 64960 | ||
64961 | #define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0])) | 64961 | #define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0])) |
64962 | @@ -1426,7 +1426,7 @@ struct tcp_seq_afinfo { | 64962 | @@ -1427,7 +1427,7 @@ struct tcp_seq_afinfo { |
64963 | char *name; | 64963 | char *name; |
64964 | sa_family_t family; | 64964 | sa_family_t family; |
64965 | const struct file_operations *seq_fops; | 64965 | const struct file_operations *seq_fops; |
@@ -65855,7 +65855,7 @@ index 5215a81..cfc0cac 100644 | |||
65855 | sem_params.flg = semflg; | 65855 | sem_params.flg = semflg; |
65856 | sem_params.u.nsems = nsems; | 65856 | sem_params.u.nsems = nsems; |
65857 | diff --git a/ipc/shm.c b/ipc/shm.c | 65857 | diff --git a/ipc/shm.c b/ipc/shm.c |
65858 | index 85d81b4..11f020e 100644 | 65858 | index a02ef57..4de5931 100644 |
65859 | --- a/ipc/shm.c | 65859 | --- a/ipc/shm.c |
65860 | +++ b/ipc/shm.c | 65860 | +++ b/ipc/shm.c |
65861 | @@ -69,6 +69,14 @@ static void shm_destroy (struct ipc_namespace *ns, struct shmid_kernel *shp); | 65861 | @@ -69,6 +69,14 @@ static void shm_destroy (struct ipc_namespace *ns, struct shmid_kernel *shp); |
@@ -65873,7 +65873,7 @@ index 85d81b4..11f020e 100644 | |||
65873 | void shm_init_ns(struct ipc_namespace *ns) | 65873 | void shm_init_ns(struct ipc_namespace *ns) |
65874 | { | 65874 | { |
65875 | ns->shm_ctlmax = SHMMAX; | 65875 | ns->shm_ctlmax = SHMMAX; |
65876 | @@ -508,6 +516,14 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) | 65876 | @@ -510,6 +518,14 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) |
65877 | shp->shm_lprid = 0; | 65877 | shp->shm_lprid = 0; |
65878 | shp->shm_atim = shp->shm_dtim = 0; | 65878 | shp->shm_atim = shp->shm_dtim = 0; |
65879 | shp->shm_ctim = get_seconds(); | 65879 | shp->shm_ctim = get_seconds(); |
@@ -65888,7 +65888,7 @@ index 85d81b4..11f020e 100644 | |||
65888 | shp->shm_segsz = size; | 65888 | shp->shm_segsz = size; |
65889 | shp->shm_nattch = 0; | 65889 | shp->shm_nattch = 0; |
65890 | shp->shm_file = file; | 65890 | shp->shm_file = file; |
65891 | @@ -559,18 +575,19 @@ static inline int shm_more_checks(struct kern_ipc_perm *ipcp, | 65891 | @@ -561,18 +577,19 @@ static inline int shm_more_checks(struct kern_ipc_perm *ipcp, |
65892 | return 0; | 65892 | return 0; |
65893 | } | 65893 | } |
65894 | 65894 | ||
@@ -65913,7 +65913,7 @@ index 85d81b4..11f020e 100644 | |||
65913 | shm_params.key = key; | 65913 | shm_params.key = key; |
65914 | shm_params.flg = shmflg; | 65914 | shm_params.flg = shmflg; |
65915 | shm_params.u.size = size; | 65915 | shm_params.u.size = size; |
65916 | @@ -988,6 +1005,12 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr) | 65916 | @@ -990,6 +1007,12 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr) |
65917 | f_mode = FMODE_READ | FMODE_WRITE; | 65917 | f_mode = FMODE_READ | FMODE_WRITE; |
65918 | } | 65918 | } |
65919 | if (shmflg & SHM_EXEC) { | 65919 | if (shmflg & SHM_EXEC) { |
@@ -65926,7 +65926,7 @@ index 85d81b4..11f020e 100644 | |||
65926 | prot |= PROT_EXEC; | 65926 | prot |= PROT_EXEC; |
65927 | acc_mode |= S_IXUGO; | 65927 | acc_mode |= S_IXUGO; |
65928 | } | 65928 | } |
65929 | @@ -1011,9 +1034,21 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr) | 65929 | @@ -1013,9 +1036,21 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr) |
65930 | if (err) | 65930 | if (err) |
65931 | goto out_unlock; | 65931 | goto out_unlock; |
65932 | 65932 | ||
@@ -67291,7 +67291,7 @@ index 4e2e472..cd0c7ae 100644 | |||
67291 | 67291 | ||
67292 | /* Don't allow clients that don't understand the native | 67292 | /* Don't allow clients that don't understand the native |
67293 | diff --git a/kernel/kmod.c b/kernel/kmod.c | 67293 | diff --git a/kernel/kmod.c b/kernel/kmod.c |
67294 | index 05698a7..a4c1e3a 100644 | 67294 | index f2490e1..10aae14 100644 |
67295 | --- a/kernel/kmod.c | 67295 | --- a/kernel/kmod.c |
67296 | +++ b/kernel/kmod.c | 67296 | +++ b/kernel/kmod.c |
67297 | @@ -66,7 +66,7 @@ static void free_modprobe_argv(struct subprocess_info *info) | 67297 | @@ -66,7 +66,7 @@ static void free_modprobe_argv(struct subprocess_info *info) |
@@ -70320,7 +70320,7 @@ index 0b537f2..9e71eca 100644 | |||
70320 | return -ENOMEM; | 70320 | return -ENOMEM; |
70321 | return 0; | 70321 | return 0; |
70322 | diff --git a/kernel/timer.c b/kernel/timer.c | 70322 | diff --git a/kernel/timer.c b/kernel/timer.c |
70323 | index 6dfdb72..fe81808 100644 | 70323 | index dd93d90..e3ac8af 100644 |
70324 | --- a/kernel/timer.c | 70324 | --- a/kernel/timer.c |
70325 | +++ b/kernel/timer.c | 70325 | +++ b/kernel/timer.c |
70326 | @@ -1356,7 +1356,7 @@ void update_process_times(int user_tick) | 70326 | @@ -1356,7 +1356,7 @@ void update_process_times(int user_tick) |
@@ -72480,7 +72480,7 @@ index ef726e8..cd7f1ec 100644 | |||
72480 | capable(CAP_IPC_LOCK)) | 72480 | capable(CAP_IPC_LOCK)) |
72481 | ret = do_mlockall(flags); | 72481 | ret = do_mlockall(flags); |
72482 | diff --git a/mm/mmap.c b/mm/mmap.c | 72482 | diff --git a/mm/mmap.c b/mm/mmap.c |
72483 | index 3635d47..e8bd34b 100644 | 72483 | index ed884dd..b4b18e7 100644 |
72484 | --- a/mm/mmap.c | 72484 | --- a/mm/mmap.c |
72485 | +++ b/mm/mmap.c | 72485 | +++ b/mm/mmap.c |
72486 | @@ -46,6 +46,16 @@ | 72486 | @@ -46,6 +46,16 @@ |
@@ -72761,7 +72761,7 @@ index 3635d47..e8bd34b 100644 | |||
72761 | return mmap_region(file, addr, len, flags, vm_flags, pgoff); | 72761 | return mmap_region(file, addr, len, flags, vm_flags, pgoff); |
72762 | } | 72762 | } |
72763 | 72763 | ||
72764 | @@ -1192,7 +1303,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma) | 72764 | @@ -1196,7 +1307,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma) |
72765 | vm_flags_t vm_flags = vma->vm_flags; | 72765 | vm_flags_t vm_flags = vma->vm_flags; |
72766 | 72766 | ||
72767 | /* If it was private or non-writable, the write bit is already clear */ | 72767 | /* If it was private or non-writable, the write bit is already clear */ |
@@ -72770,7 +72770,7 @@ index 3635d47..e8bd34b 100644 | |||
72770 | return 0; | 72770 | return 0; |
72771 | 72771 | ||
72772 | /* The backer wishes to know when pages are first written to? */ | 72772 | /* The backer wishes to know when pages are first written to? */ |
72773 | @@ -1241,14 +1352,24 @@ unsigned long mmap_region(struct file *file, unsigned long addr, | 72773 | @@ -1245,14 +1356,24 @@ unsigned long mmap_region(struct file *file, unsigned long addr, |
72774 | unsigned long charged = 0; | 72774 | unsigned long charged = 0; |
72775 | struct inode *inode = file ? file->f_path.dentry->d_inode : NULL; | 72775 | struct inode *inode = file ? file->f_path.dentry->d_inode : NULL; |
72776 | 72776 | ||
@@ -72797,7 +72797,7 @@ index 3635d47..e8bd34b 100644 | |||
72797 | } | 72797 | } |
72798 | 72798 | ||
72799 | /* Check against address space limit. */ | 72799 | /* Check against address space limit. */ |
72800 | @@ -1297,6 +1418,16 @@ munmap_back: | 72800 | @@ -1301,6 +1422,16 @@ munmap_back: |
72801 | goto unacct_error; | 72801 | goto unacct_error; |
72802 | } | 72802 | } |
72803 | 72803 | ||
@@ -72814,7 +72814,7 @@ index 3635d47..e8bd34b 100644 | |||
72814 | vma->vm_mm = mm; | 72814 | vma->vm_mm = mm; |
72815 | vma->vm_start = addr; | 72815 | vma->vm_start = addr; |
72816 | vma->vm_end = addr + len; | 72816 | vma->vm_end = addr + len; |
72817 | @@ -1321,6 +1452,19 @@ munmap_back: | 72817 | @@ -1325,6 +1456,19 @@ munmap_back: |
72818 | error = file->f_op->mmap(file, vma); | 72818 | error = file->f_op->mmap(file, vma); |
72819 | if (error) | 72819 | if (error) |
72820 | goto unmap_and_free_vma; | 72820 | goto unmap_and_free_vma; |
@@ -72834,7 +72834,7 @@ index 3635d47..e8bd34b 100644 | |||
72834 | if (vm_flags & VM_EXECUTABLE) | 72834 | if (vm_flags & VM_EXECUTABLE) |
72835 | added_exe_file_vma(mm); | 72835 | added_exe_file_vma(mm); |
72836 | 72836 | ||
72837 | @@ -1358,6 +1502,11 @@ munmap_back: | 72837 | @@ -1362,6 +1506,11 @@ munmap_back: |
72838 | vma_link(mm, vma, prev, rb_link, rb_parent); | 72838 | vma_link(mm, vma, prev, rb_link, rb_parent); |
72839 | file = vma->vm_file; | 72839 | file = vma->vm_file; |
72840 | 72840 | ||
@@ -72846,7 +72846,7 @@ index 3635d47..e8bd34b 100644 | |||
72846 | /* Once vma denies write, undo our temporary denial count */ | 72846 | /* Once vma denies write, undo our temporary denial count */ |
72847 | if (correct_wcount) | 72847 | if (correct_wcount) |
72848 | atomic_inc(&inode->i_writecount); | 72848 | atomic_inc(&inode->i_writecount); |
72849 | @@ -1366,6 +1515,7 @@ out: | 72849 | @@ -1370,6 +1519,7 @@ out: |
72850 | 72850 | ||
72851 | mm->total_vm += len >> PAGE_SHIFT; | 72851 | mm->total_vm += len >> PAGE_SHIFT; |
72852 | vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT); | 72852 | vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT); |
@@ -72854,7 +72854,7 @@ index 3635d47..e8bd34b 100644 | |||
72854 | if (vm_flags & VM_LOCKED) { | 72854 | if (vm_flags & VM_LOCKED) { |
72855 | if (!mlock_vma_pages_range(vma, addr, addr + len)) | 72855 | if (!mlock_vma_pages_range(vma, addr, addr + len)) |
72856 | mm->locked_vm += (len >> PAGE_SHIFT); | 72856 | mm->locked_vm += (len >> PAGE_SHIFT); |
72857 | @@ -1383,6 +1533,12 @@ unmap_and_free_vma: | 72857 | @@ -1387,6 +1537,12 @@ unmap_and_free_vma: |
72858 | unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end); | 72858 | unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end); |
72859 | charged = 0; | 72859 | charged = 0; |
72860 | free_vma: | 72860 | free_vma: |
@@ -72867,7 +72867,7 @@ index 3635d47..e8bd34b 100644 | |||
72867 | kmem_cache_free(vm_area_cachep, vma); | 72867 | kmem_cache_free(vm_area_cachep, vma); |
72868 | unacct_error: | 72868 | unacct_error: |
72869 | if (charged) | 72869 | if (charged) |
72870 | @@ -1390,6 +1546,44 @@ unacct_error: | 72870 | @@ -1394,6 +1550,44 @@ unacct_error: |
72871 | return error; | 72871 | return error; |
72872 | } | 72872 | } |
72873 | 72873 | ||
@@ -72912,7 +72912,7 @@ index 3635d47..e8bd34b 100644 | |||
72912 | /* Get an address range which is currently unmapped. | 72912 | /* Get an address range which is currently unmapped. |
72913 | * For shmat() with addr=0. | 72913 | * For shmat() with addr=0. |
72914 | * | 72914 | * |
72915 | @@ -1416,18 +1610,23 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, | 72915 | @@ -1420,18 +1614,23 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, |
72916 | if (flags & MAP_FIXED) | 72916 | if (flags & MAP_FIXED) |
72917 | return addr; | 72917 | return addr; |
72918 | 72918 | ||
@@ -72943,7 +72943,7 @@ index 3635d47..e8bd34b 100644 | |||
72943 | } | 72943 | } |
72944 | 72944 | ||
72945 | full_search: | 72945 | full_search: |
72946 | @@ -1438,34 +1637,40 @@ full_search: | 72946 | @@ -1442,34 +1641,40 @@ full_search: |
72947 | * Start a new search - just in case we missed | 72947 | * Start a new search - just in case we missed |
72948 | * some holes. | 72948 | * some holes. |
72949 | */ | 72949 | */ |
@@ -72995,7 +72995,7 @@ index 3635d47..e8bd34b 100644 | |||
72995 | mm->free_area_cache = addr; | 72995 | mm->free_area_cache = addr; |
72996 | } | 72996 | } |
72997 | 72997 | ||
72998 | @@ -1481,7 +1686,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, | 72998 | @@ -1485,7 +1690,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, |
72999 | { | 72999 | { |
73000 | struct vm_area_struct *vma; | 73000 | struct vm_area_struct *vma; |
73001 | struct mm_struct *mm = current->mm; | 73001 | struct mm_struct *mm = current->mm; |
@@ -73004,7 +73004,7 @@ index 3635d47..e8bd34b 100644 | |||
73004 | 73004 | ||
73005 | /* requested length too big for entire address space */ | 73005 | /* requested length too big for entire address space */ |
73006 | if (len > TASK_SIZE) | 73006 | if (len > TASK_SIZE) |
73007 | @@ -1490,13 +1695,18 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, | 73007 | @@ -1494,13 +1699,18 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, |
73008 | if (flags & MAP_FIXED) | 73008 | if (flags & MAP_FIXED) |
73009 | return addr; | 73009 | return addr; |
73010 | 73010 | ||
@@ -73027,7 +73027,7 @@ index 3635d47..e8bd34b 100644 | |||
73027 | } | 73027 | } |
73028 | 73028 | ||
73029 | /* check if free_area_cache is useful for us */ | 73029 | /* check if free_area_cache is useful for us */ |
73030 | @@ -1520,7 +1730,7 @@ try_again: | 73030 | @@ -1524,7 +1734,7 @@ try_again: |
73031 | * return with success: | 73031 | * return with success: |
73032 | */ | 73032 | */ |
73033 | vma = find_vma(mm, addr); | 73033 | vma = find_vma(mm, addr); |
@@ -73036,7 +73036,7 @@ index 3635d47..e8bd34b 100644 | |||
73036 | /* remember the address as a hint for next time */ | 73036 | /* remember the address as a hint for next time */ |
73037 | return (mm->free_area_cache = addr); | 73037 | return (mm->free_area_cache = addr); |
73038 | 73038 | ||
73039 | @@ -1529,8 +1739,8 @@ try_again: | 73039 | @@ -1533,8 +1743,8 @@ try_again: |
73040 | mm->cached_hole_size = vma->vm_start - addr; | 73040 | mm->cached_hole_size = vma->vm_start - addr; |
73041 | 73041 | ||
73042 | /* try just below the current vma->vm_start */ | 73042 | /* try just below the current vma->vm_start */ |
@@ -73047,7 +73047,7 @@ index 3635d47..e8bd34b 100644 | |||
73047 | 73047 | ||
73048 | fail: | 73048 | fail: |
73049 | /* | 73049 | /* |
73050 | @@ -1553,13 +1763,21 @@ fail: | 73050 | @@ -1557,13 +1767,21 @@ fail: |
73051 | * can happen with large stack limits and large mmap() | 73051 | * can happen with large stack limits and large mmap() |
73052 | * allocations. | 73052 | * allocations. |
73053 | */ | 73053 | */ |
@@ -73071,7 +73071,7 @@ index 3635d47..e8bd34b 100644 | |||
73071 | mm->cached_hole_size = ~0UL; | 73071 | mm->cached_hole_size = ~0UL; |
73072 | 73072 | ||
73073 | return addr; | 73073 | return addr; |
73074 | @@ -1568,6 +1786,12 @@ fail: | 73074 | @@ -1572,6 +1790,12 @@ fail: |
73075 | 73075 | ||
73076 | void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr) | 73076 | void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr) |
73077 | { | 73077 | { |
@@ -73084,7 +73084,7 @@ index 3635d47..e8bd34b 100644 | |||
73084 | /* | 73084 | /* |
73085 | * Is this a new hole at the highest possible address? | 73085 | * Is this a new hole at the highest possible address? |
73086 | */ | 73086 | */ |
73087 | @@ -1575,8 +1799,10 @@ void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr) | 73087 | @@ -1579,8 +1803,10 @@ void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr) |
73088 | mm->free_area_cache = addr; | 73088 | mm->free_area_cache = addr; |
73089 | 73089 | ||
73090 | /* dont allow allocations above current base */ | 73090 | /* dont allow allocations above current base */ |
@@ -73096,7 +73096,7 @@ index 3635d47..e8bd34b 100644 | |||
73096 | } | 73096 | } |
73097 | 73097 | ||
73098 | unsigned long | 73098 | unsigned long |
73099 | @@ -1672,6 +1898,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr, | 73099 | @@ -1676,6 +1902,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr, |
73100 | return vma; | 73100 | return vma; |
73101 | } | 73101 | } |
73102 | 73102 | ||
@@ -73125,7 +73125,7 @@ index 3635d47..e8bd34b 100644 | |||
73125 | /* | 73125 | /* |
73126 | * Verify that the stack growth is acceptable and | 73126 | * Verify that the stack growth is acceptable and |
73127 | * update accounting. This is shared with both the | 73127 | * update accounting. This is shared with both the |
73128 | @@ -1688,6 +1936,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns | 73128 | @@ -1692,6 +1940,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns |
73129 | return -ENOMEM; | 73129 | return -ENOMEM; |
73130 | 73130 | ||
73131 | /* Stack limit test */ | 73131 | /* Stack limit test */ |
@@ -73133,7 +73133,7 @@ index 3635d47..e8bd34b 100644 | |||
73133 | if (size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur)) | 73133 | if (size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur)) |
73134 | return -ENOMEM; | 73134 | return -ENOMEM; |
73135 | 73135 | ||
73136 | @@ -1698,6 +1947,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns | 73136 | @@ -1702,6 +1951,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns |
73137 | locked = mm->locked_vm + grow; | 73137 | locked = mm->locked_vm + grow; |
73138 | limit = ACCESS_ONCE(rlim[RLIMIT_MEMLOCK].rlim_cur); | 73138 | limit = ACCESS_ONCE(rlim[RLIMIT_MEMLOCK].rlim_cur); |
73139 | limit >>= PAGE_SHIFT; | 73139 | limit >>= PAGE_SHIFT; |
@@ -73141,7 +73141,7 @@ index 3635d47..e8bd34b 100644 | |||
73141 | if (locked > limit && !capable(CAP_IPC_LOCK)) | 73141 | if (locked > limit && !capable(CAP_IPC_LOCK)) |
73142 | return -ENOMEM; | 73142 | return -ENOMEM; |
73143 | } | 73143 | } |
73144 | @@ -1728,37 +1978,48 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns | 73144 | @@ -1732,37 +1982,48 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns |
73145 | * PA-RISC uses this for its stack; IA64 for its Register Backing Store. | 73145 | * PA-RISC uses this for its stack; IA64 for its Register Backing Store. |
73146 | * vma is the last one with address > vma->vm_end. Have to extend vma. | 73146 | * vma is the last one with address > vma->vm_end. Have to extend vma. |
73147 | */ | 73147 | */ |
@@ -73199,7 +73199,7 @@ index 3635d47..e8bd34b 100644 | |||
73199 | unsigned long size, grow; | 73199 | unsigned long size, grow; |
73200 | 73200 | ||
73201 | size = address - vma->vm_start; | 73201 | size = address - vma->vm_start; |
73202 | @@ -1773,6 +2034,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address) | 73202 | @@ -1777,6 +2038,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address) |
73203 | } | 73203 | } |
73204 | } | 73204 | } |
73205 | } | 73205 | } |
@@ -73208,7 +73208,7 @@ index 3635d47..e8bd34b 100644 | |||
73208 | vma_unlock_anon_vma(vma); | 73208 | vma_unlock_anon_vma(vma); |
73209 | khugepaged_enter_vma_merge(vma); | 73209 | khugepaged_enter_vma_merge(vma); |
73210 | return error; | 73210 | return error; |
73211 | @@ -1786,6 +2049,8 @@ int expand_downwards(struct vm_area_struct *vma, | 73211 | @@ -1790,6 +2053,8 @@ int expand_downwards(struct vm_area_struct *vma, |
73212 | unsigned long address) | 73212 | unsigned long address) |
73213 | { | 73213 | { |
73214 | int error; | 73214 | int error; |
@@ -73217,7 +73217,7 @@ index 3635d47..e8bd34b 100644 | |||
73217 | 73217 | ||
73218 | /* | 73218 | /* |
73219 | * We must make sure the anon_vma is allocated | 73219 | * We must make sure the anon_vma is allocated |
73220 | @@ -1799,6 +2064,15 @@ int expand_downwards(struct vm_area_struct *vma, | 73220 | @@ -1803,6 +2068,15 @@ int expand_downwards(struct vm_area_struct *vma, |
73221 | if (error) | 73221 | if (error) |
73222 | return error; | 73222 | return error; |
73223 | 73223 | ||
@@ -73233,7 +73233,7 @@ index 3635d47..e8bd34b 100644 | |||
73233 | vma_lock_anon_vma(vma); | 73233 | vma_lock_anon_vma(vma); |
73234 | 73234 | ||
73235 | /* | 73235 | /* |
73236 | @@ -1808,9 +2082,17 @@ int expand_downwards(struct vm_area_struct *vma, | 73236 | @@ -1812,9 +2086,17 @@ int expand_downwards(struct vm_area_struct *vma, |
73237 | */ | 73237 | */ |
73238 | 73238 | ||
73239 | /* Somebody else might have raced and expanded it already */ | 73239 | /* Somebody else might have raced and expanded it already */ |
@@ -73252,7 +73252,7 @@ index 3635d47..e8bd34b 100644 | |||
73252 | size = vma->vm_end - address; | 73252 | size = vma->vm_end - address; |
73253 | grow = (vma->vm_start - address) >> PAGE_SHIFT; | 73253 | grow = (vma->vm_start - address) >> PAGE_SHIFT; |
73254 | 73254 | ||
73255 | @@ -1820,11 +2102,22 @@ int expand_downwards(struct vm_area_struct *vma, | 73255 | @@ -1824,11 +2106,22 @@ int expand_downwards(struct vm_area_struct *vma, |
73256 | if (!error) { | 73256 | if (!error) { |
73257 | vma->vm_start = address; | 73257 | vma->vm_start = address; |
73258 | vma->vm_pgoff -= grow; | 73258 | vma->vm_pgoff -= grow; |
@@ -73275,7 +73275,7 @@ index 3635d47..e8bd34b 100644 | |||
73275 | khugepaged_enter_vma_merge(vma); | 73275 | khugepaged_enter_vma_merge(vma); |
73276 | return error; | 73276 | return error; |
73277 | } | 73277 | } |
73278 | @@ -1894,6 +2187,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma) | 73278 | @@ -1898,6 +2191,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma) |
73279 | do { | 73279 | do { |
73280 | long nrpages = vma_pages(vma); | 73280 | long nrpages = vma_pages(vma); |
73281 | 73281 | ||
@@ -73289,7 +73289,7 @@ index 3635d47..e8bd34b 100644 | |||
73289 | mm->total_vm -= nrpages; | 73289 | mm->total_vm -= nrpages; |
73290 | vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages); | 73290 | vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages); |
73291 | vma = remove_vma(vma); | 73291 | vma = remove_vma(vma); |
73292 | @@ -1939,6 +2239,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma, | 73292 | @@ -1943,6 +2243,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma, |
73293 | insertion_point = (prev ? &prev->vm_next : &mm->mmap); | 73293 | insertion_point = (prev ? &prev->vm_next : &mm->mmap); |
73294 | vma->vm_prev = NULL; | 73294 | vma->vm_prev = NULL; |
73295 | do { | 73295 | do { |
@@ -73306,7 +73306,7 @@ index 3635d47..e8bd34b 100644 | |||
73306 | rb_erase(&vma->vm_rb, &mm->mm_rb); | 73306 | rb_erase(&vma->vm_rb, &mm->mm_rb); |
73307 | mm->map_count--; | 73307 | mm->map_count--; |
73308 | tail_vma = vma; | 73308 | tail_vma = vma; |
73309 | @@ -1967,14 +2277,33 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, | 73309 | @@ -1971,14 +2281,33 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, |
73310 | struct vm_area_struct *new; | 73310 | struct vm_area_struct *new; |
73311 | int err = -ENOMEM; | 73311 | int err = -ENOMEM; |
73312 | 73312 | ||
@@ -73340,7 +73340,7 @@ index 3635d47..e8bd34b 100644 | |||
73340 | /* most fields are the same, copy all, and then fixup */ | 73340 | /* most fields are the same, copy all, and then fixup */ |
73341 | *new = *vma; | 73341 | *new = *vma; |
73342 | 73342 | ||
73343 | @@ -1987,6 +2316,22 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, | 73343 | @@ -1991,6 +2320,22 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, |
73344 | new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT); | 73344 | new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT); |
73345 | } | 73345 | } |
73346 | 73346 | ||
@@ -73363,7 +73363,7 @@ index 3635d47..e8bd34b 100644 | |||
73363 | pol = mpol_dup(vma_policy(vma)); | 73363 | pol = mpol_dup(vma_policy(vma)); |
73364 | if (IS_ERR(pol)) { | 73364 | if (IS_ERR(pol)) { |
73365 | err = PTR_ERR(pol); | 73365 | err = PTR_ERR(pol); |
73366 | @@ -2012,6 +2357,42 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, | 73366 | @@ -2016,6 +2361,42 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, |
73367 | else | 73367 | else |
73368 | err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new); | 73368 | err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new); |
73369 | 73369 | ||
@@ -73406,7 +73406,7 @@ index 3635d47..e8bd34b 100644 | |||
73406 | /* Success. */ | 73406 | /* Success. */ |
73407 | if (!err) | 73407 | if (!err) |
73408 | return 0; | 73408 | return 0; |
73409 | @@ -2024,10 +2405,18 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, | 73409 | @@ -2028,10 +2409,18 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, |
73410 | removed_exe_file_vma(mm); | 73410 | removed_exe_file_vma(mm); |
73411 | fput(new->vm_file); | 73411 | fput(new->vm_file); |
73412 | } | 73412 | } |
@@ -73426,7 +73426,7 @@ index 3635d47..e8bd34b 100644 | |||
73426 | kmem_cache_free(vm_area_cachep, new); | 73426 | kmem_cache_free(vm_area_cachep, new); |
73427 | out_err: | 73427 | out_err: |
73428 | return err; | 73428 | return err; |
73429 | @@ -2040,6 +2429,15 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, | 73429 | @@ -2044,6 +2433,15 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, |
73430 | int split_vma(struct mm_struct *mm, struct vm_area_struct *vma, | 73430 | int split_vma(struct mm_struct *mm, struct vm_area_struct *vma, |
73431 | unsigned long addr, int new_below) | 73431 | unsigned long addr, int new_below) |
73432 | { | 73432 | { |
@@ -73442,7 +73442,7 @@ index 3635d47..e8bd34b 100644 | |||
73442 | if (mm->map_count >= sysctl_max_map_count) | 73442 | if (mm->map_count >= sysctl_max_map_count) |
73443 | return -ENOMEM; | 73443 | return -ENOMEM; |
73444 | 73444 | ||
73445 | @@ -2051,11 +2449,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma, | 73445 | @@ -2055,11 +2453,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma, |
73446 | * work. This now handles partial unmappings. | 73446 | * work. This now handles partial unmappings. |
73447 | * Jeremy Fitzhardinge <jeremy@goop.org> | 73447 | * Jeremy Fitzhardinge <jeremy@goop.org> |
73448 | */ | 73448 | */ |
@@ -73473,7 +73473,7 @@ index 3635d47..e8bd34b 100644 | |||
73473 | if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start) | 73473 | if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start) |
73474 | return -EINVAL; | 73474 | return -EINVAL; |
73475 | 73475 | ||
73476 | @@ -2130,6 +2547,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len) | 73476 | @@ -2134,6 +2551,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len) |
73477 | /* Fix up all other VM information */ | 73477 | /* Fix up all other VM information */ |
73478 | remove_vma_list(mm, vma); | 73478 | remove_vma_list(mm, vma); |
73479 | 73479 | ||
@@ -73482,7 +73482,7 @@ index 3635d47..e8bd34b 100644 | |||
73482 | return 0; | 73482 | return 0; |
73483 | } | 73483 | } |
73484 | EXPORT_SYMBOL(do_munmap); | 73484 | EXPORT_SYMBOL(do_munmap); |
73485 | @@ -2139,6 +2558,13 @@ int vm_munmap(unsigned long start, size_t len) | 73485 | @@ -2143,6 +2562,13 @@ int vm_munmap(unsigned long start, size_t len) |
73486 | int ret; | 73486 | int ret; |
73487 | struct mm_struct *mm = current->mm; | 73487 | struct mm_struct *mm = current->mm; |
73488 | 73488 | ||
@@ -73496,7 +73496,7 @@ index 3635d47..e8bd34b 100644 | |||
73496 | down_write(&mm->mmap_sem); | 73496 | down_write(&mm->mmap_sem); |
73497 | ret = do_munmap(mm, start, len); | 73497 | ret = do_munmap(mm, start, len); |
73498 | up_write(&mm->mmap_sem); | 73498 | up_write(&mm->mmap_sem); |
73499 | @@ -2152,16 +2578,6 @@ SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len) | 73499 | @@ -2156,16 +2582,6 @@ SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len) |
73500 | return vm_munmap(addr, len); | 73500 | return vm_munmap(addr, len); |
73501 | } | 73501 | } |
73502 | 73502 | ||
@@ -73513,7 +73513,7 @@ index 3635d47..e8bd34b 100644 | |||
73513 | /* | 73513 | /* |
73514 | * this is really a simplified "do_mmap". it only handles | 73514 | * this is really a simplified "do_mmap". it only handles |
73515 | * anonymous maps. eventually we may be able to do some | 73515 | * anonymous maps. eventually we may be able to do some |
73516 | @@ -2175,6 +2591,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) | 73516 | @@ -2179,6 +2595,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) |
73517 | struct rb_node ** rb_link, * rb_parent; | 73517 | struct rb_node ** rb_link, * rb_parent; |
73518 | pgoff_t pgoff = addr >> PAGE_SHIFT; | 73518 | pgoff_t pgoff = addr >> PAGE_SHIFT; |
73519 | int error; | 73519 | int error; |
@@ -73521,7 +73521,7 @@ index 3635d47..e8bd34b 100644 | |||
73521 | 73521 | ||
73522 | len = PAGE_ALIGN(len); | 73522 | len = PAGE_ALIGN(len); |
73523 | if (!len) | 73523 | if (!len) |
73524 | @@ -2186,16 +2603,30 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) | 73524 | @@ -2190,16 +2607,30 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) |
73525 | 73525 | ||
73526 | flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; | 73526 | flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; |
73527 | 73527 | ||
@@ -73553,7 +73553,7 @@ index 3635d47..e8bd34b 100644 | |||
73553 | locked += mm->locked_vm; | 73553 | locked += mm->locked_vm; |
73554 | lock_limit = rlimit(RLIMIT_MEMLOCK); | 73554 | lock_limit = rlimit(RLIMIT_MEMLOCK); |
73555 | lock_limit >>= PAGE_SHIFT; | 73555 | lock_limit >>= PAGE_SHIFT; |
73556 | @@ -2212,22 +2643,22 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) | 73556 | @@ -2216,22 +2647,22 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) |
73557 | /* | 73557 | /* |
73558 | * Clear old maps. this also does some error checking for us | 73558 | * Clear old maps. this also does some error checking for us |
73559 | */ | 73559 | */ |
@@ -73581,7 +73581,7 @@ index 3635d47..e8bd34b 100644 | |||
73581 | return -ENOMEM; | 73581 | return -ENOMEM; |
73582 | 73582 | ||
73583 | /* Can we just expand an old private anonymous mapping? */ | 73583 | /* Can we just expand an old private anonymous mapping? */ |
73584 | @@ -2241,7 +2672,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) | 73584 | @@ -2245,7 +2676,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) |
73585 | */ | 73585 | */ |
73586 | vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); | 73586 | vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
73587 | if (!vma) { | 73587 | if (!vma) { |
@@ -73590,7 +73590,7 @@ index 3635d47..e8bd34b 100644 | |||
73590 | return -ENOMEM; | 73590 | return -ENOMEM; |
73591 | } | 73591 | } |
73592 | 73592 | ||
73593 | @@ -2255,11 +2686,12 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) | 73593 | @@ -2259,11 +2690,12 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) |
73594 | vma_link(mm, vma, prev, rb_link, rb_parent); | 73594 | vma_link(mm, vma, prev, rb_link, rb_parent); |
73595 | out: | 73595 | out: |
73596 | perf_event_mmap(vma); | 73596 | perf_event_mmap(vma); |
@@ -73605,7 +73605,7 @@ index 3635d47..e8bd34b 100644 | |||
73605 | return addr; | 73605 | return addr; |
73606 | } | 73606 | } |
73607 | 73607 | ||
73608 | @@ -2315,8 +2747,10 @@ void exit_mmap(struct mm_struct *mm) | 73608 | @@ -2319,8 +2751,10 @@ void exit_mmap(struct mm_struct *mm) |
73609 | * Walk the list again, actually closing and freeing it, | 73609 | * Walk the list again, actually closing and freeing it, |
73610 | * with preemption enabled, without holding any MM locks. | 73610 | * with preemption enabled, without holding any MM locks. |
73611 | */ | 73611 | */ |
@@ -73617,7 +73617,7 @@ index 3635d47..e8bd34b 100644 | |||
73617 | 73617 | ||
73618 | BUG_ON(mm->nr_ptes > (FIRST_USER_ADDRESS+PMD_SIZE-1)>>PMD_SHIFT); | 73618 | BUG_ON(mm->nr_ptes > (FIRST_USER_ADDRESS+PMD_SIZE-1)>>PMD_SHIFT); |
73619 | } | 73619 | } |
73620 | @@ -2330,6 +2764,13 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma) | 73620 | @@ -2334,6 +2768,13 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma) |
73621 | struct vm_area_struct * __vma, * prev; | 73621 | struct vm_area_struct * __vma, * prev; |
73622 | struct rb_node ** rb_link, * rb_parent; | 73622 | struct rb_node ** rb_link, * rb_parent; |
73623 | 73623 | ||
@@ -73631,7 +73631,7 @@ index 3635d47..e8bd34b 100644 | |||
73631 | /* | 73631 | /* |
73632 | * The vm_pgoff of a purely anonymous vma should be irrelevant | 73632 | * The vm_pgoff of a purely anonymous vma should be irrelevant |
73633 | * until its first write fault, when page's anon_vma and index | 73633 | * until its first write fault, when page's anon_vma and index |
73634 | @@ -2352,7 +2793,22 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma) | 73634 | @@ -2356,7 +2797,22 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma) |
73635 | if ((vma->vm_flags & VM_ACCOUNT) && | 73635 | if ((vma->vm_flags & VM_ACCOUNT) && |
73636 | security_vm_enough_memory_mm(mm, vma_pages(vma))) | 73636 | security_vm_enough_memory_mm(mm, vma_pages(vma))) |
73637 | return -ENOMEM; | 73637 | return -ENOMEM; |
@@ -73654,7 +73654,7 @@ index 3635d47..e8bd34b 100644 | |||
73654 | return 0; | 73654 | return 0; |
73655 | } | 73655 | } |
73656 | 73656 | ||
73657 | @@ -2371,6 +2827,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, | 73657 | @@ -2375,6 +2831,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, |
73658 | struct mempolicy *pol; | 73658 | struct mempolicy *pol; |
73659 | bool faulted_in_anon_vma = true; | 73659 | bool faulted_in_anon_vma = true; |
73660 | 73660 | ||
@@ -73663,7 +73663,7 @@ index 3635d47..e8bd34b 100644 | |||
73663 | /* | 73663 | /* |
73664 | * If anonymous vma has not yet been faulted, update new pgoff | 73664 | * If anonymous vma has not yet been faulted, update new pgoff |
73665 | * to match new location, to increase its chance of merging. | 73665 | * to match new location, to increase its chance of merging. |
73666 | @@ -2438,6 +2896,39 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, | 73666 | @@ -2442,6 +2900,39 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, |
73667 | return NULL; | 73667 | return NULL; |
73668 | } | 73668 | } |
73669 | 73669 | ||
@@ -73703,7 +73703,7 @@ index 3635d47..e8bd34b 100644 | |||
73703 | /* | 73703 | /* |
73704 | * Return true if the calling process may expand its vm space by the passed | 73704 | * Return true if the calling process may expand its vm space by the passed |
73705 | * number of pages | 73705 | * number of pages |
73706 | @@ -2449,6 +2940,12 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages) | 73706 | @@ -2453,6 +2944,12 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages) |
73707 | 73707 | ||
73708 | lim = rlimit(RLIMIT_AS) >> PAGE_SHIFT; | 73708 | lim = rlimit(RLIMIT_AS) >> PAGE_SHIFT; |
73709 | 73709 | ||
@@ -73716,7 +73716,7 @@ index 3635d47..e8bd34b 100644 | |||
73716 | if (cur + npages > lim) | 73716 | if (cur + npages > lim) |
73717 | return 0; | 73717 | return 0; |
73718 | return 1; | 73718 | return 1; |
73719 | @@ -2519,6 +3016,22 @@ int install_special_mapping(struct mm_struct *mm, | 73719 | @@ -2523,6 +3020,22 @@ int install_special_mapping(struct mm_struct *mm, |
73720 | vma->vm_start = addr; | 73720 | vma->vm_start = addr; |
73721 | vma->vm_end = addr + len; | 73721 | vma->vm_end = addr + len; |
73722 | 73722 | ||
@@ -76208,7 +76208,7 @@ index da7e0c8..07ccc3e 100644 | |||
76208 | 76208 | ||
76209 | return err; | 76209 | return err; |
76210 | diff --git a/net/core/dev.c b/net/core/dev.c | 76210 | diff --git a/net/core/dev.c b/net/core/dev.c |
76211 | index dd12421..abff0e6 100644 | 76211 | index 7db83d6..0934b2b 100644 |
76212 | --- a/net/core/dev.c | 76212 | --- a/net/core/dev.c |
76213 | +++ b/net/core/dev.c | 76213 | +++ b/net/core/dev.c |
76214 | @@ -1139,9 +1139,13 @@ void dev_load(struct net *net, const char *name) | 76214 | @@ -1139,9 +1139,13 @@ void dev_load(struct net *net, const char *name) |
@@ -76427,7 +76427,7 @@ index 611c5ef..88f6d6d 100644 | |||
76427 | { | 76427 | { |
76428 | int new_fd; | 76428 | int new_fd; |
76429 | diff --git a/net/core/sock.c b/net/core/sock.c | 76429 | diff --git a/net/core/sock.c b/net/core/sock.c |
76430 | index f8b5030..75d1195 100644 | 76430 | index 561eb57..6278501 100644 |
76431 | --- a/net/core/sock.c | 76431 | --- a/net/core/sock.c |
76432 | +++ b/net/core/sock.c | 76432 | +++ b/net/core/sock.c |
76433 | @@ -340,7 +340,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) | 76433 | @@ -340,7 +340,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) |
@@ -76522,7 +76522,7 @@ index f8b5030..75d1195 100644 | |||
76522 | return -EFAULT; | 76522 | return -EFAULT; |
76523 | lenout: | 76523 | lenout: |
76524 | if (put_user(len, optlen)) | 76524 | if (put_user(len, optlen)) |
76525 | @@ -2139,7 +2139,7 @@ void sock_init_data(struct socket *sock, struct sock *sk) | 76525 | @@ -2127,7 +2127,7 @@ void sock_init_data(struct socket *sock, struct sock *sk) |
76526 | */ | 76526 | */ |
76527 | smp_wmb(); | 76527 | smp_wmb(); |
76528 | atomic_set(&sk->sk_refcnt, 1); | 76528 | atomic_set(&sk->sk_refcnt, 1); |
@@ -77438,7 +77438,7 @@ index 3ee2870..f19606b 100644 | |||
77438 | 77438 | ||
77439 | static int raw6_seq_show(struct seq_file *seq, void *v) | 77439 | static int raw6_seq_show(struct seq_file *seq, void *v) |
77440 | diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c | 77440 | diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c |
77441 | index 3889e02..889d1ea 100644 | 77441 | index 7ee7121..a992f08 100644 |
77442 | --- a/net/ipv6/tcp_ipv6.c | 77442 | --- a/net/ipv6/tcp_ipv6.c |
77443 | +++ b/net/ipv6/tcp_ipv6.c | 77443 | +++ b/net/ipv6/tcp_ipv6.c |
77444 | @@ -94,6 +94,10 @@ static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk, | 77444 | @@ -94,6 +94,10 @@ static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk, |
@@ -77541,7 +77541,7 @@ index 3889e02..889d1ea 100644 | |||
77541 | 77541 | ||
77542 | static int tcp6_seq_show(struct seq_file *seq, void *v) | 77542 | static int tcp6_seq_show(struct seq_file *seq, void *v) |
77543 | diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c | 77543 | diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c |
77544 | index 37b0699..d323408 100644 | 77544 | index aa2f18b..69e7646 100644 |
77545 | --- a/net/ipv6/udp.c | 77545 | --- a/net/ipv6/udp.c |
77546 | +++ b/net/ipv6/udp.c | 77546 | +++ b/net/ipv6/udp.c |
77547 | @@ -50,6 +50,10 @@ | 77547 | @@ -50,6 +50,10 @@ |
@@ -78292,10 +78292,10 @@ index 7ed9b1d..79780cd 100644 | |||
78292 | *uaddr_len = sizeof(struct sockaddr_ax25); | 78292 | *uaddr_len = sizeof(struct sockaddr_ax25); |
78293 | } | 78293 | } |
78294 | diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c | 78294 | diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c |
78295 | index 38ca5e0..2395340 100644 | 78295 | index cfcd783..9dec8ce 100644 |
78296 | --- a/net/packet/af_packet.c | 78296 | --- a/net/packet/af_packet.c |
78297 | +++ b/net/packet/af_packet.c | 78297 | +++ b/net/packet/af_packet.c |
78298 | @@ -1696,7 +1696,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, | 78298 | @@ -1682,7 +1682,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, |
78299 | 78299 | ||
78300 | spin_lock(&sk->sk_receive_queue.lock); | 78300 | spin_lock(&sk->sk_receive_queue.lock); |
78301 | po->stats.tp_packets++; | 78301 | po->stats.tp_packets++; |
@@ -78304,7 +78304,7 @@ index 38ca5e0..2395340 100644 | |||
78304 | __skb_queue_tail(&sk->sk_receive_queue, skb); | 78304 | __skb_queue_tail(&sk->sk_receive_queue, skb); |
78305 | spin_unlock(&sk->sk_receive_queue.lock); | 78305 | spin_unlock(&sk->sk_receive_queue.lock); |
78306 | sk->sk_data_ready(sk, skb->len); | 78306 | sk->sk_data_ready(sk, skb->len); |
78307 | @@ -1705,7 +1705,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, | 78307 | @@ -1691,7 +1691,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, |
78308 | drop_n_acct: | 78308 | drop_n_acct: |
78309 | spin_lock(&sk->sk_receive_queue.lock); | 78309 | spin_lock(&sk->sk_receive_queue.lock); |
78310 | po->stats.tp_drops++; | 78310 | po->stats.tp_drops++; |
@@ -78313,7 +78313,7 @@ index 38ca5e0..2395340 100644 | |||
78313 | spin_unlock(&sk->sk_receive_queue.lock); | 78313 | spin_unlock(&sk->sk_receive_queue.lock); |
78314 | 78314 | ||
78315 | drop_n_restore: | 78315 | drop_n_restore: |
78316 | @@ -2651,6 +2651,7 @@ out: | 78316 | @@ -2637,6 +2637,7 @@ out: |
78317 | 78317 | ||
78318 | static int packet_recv_error(struct sock *sk, struct msghdr *msg, int len) | 78318 | static int packet_recv_error(struct sock *sk, struct msghdr *msg, int len) |
78319 | { | 78319 | { |
@@ -78321,7 +78321,7 @@ index 38ca5e0..2395340 100644 | |||
78321 | struct sock_exterr_skb *serr; | 78321 | struct sock_exterr_skb *serr; |
78322 | struct sk_buff *skb, *skb2; | 78322 | struct sk_buff *skb, *skb2; |
78323 | int copied, err; | 78323 | int copied, err; |
78324 | @@ -2672,8 +2673,9 @@ static int packet_recv_error(struct sock *sk, struct msghdr *msg, int len) | 78324 | @@ -2658,8 +2659,9 @@ static int packet_recv_error(struct sock *sk, struct msghdr *msg, int len) |
78325 | sock_recv_timestamp(msg, sk, skb); | 78325 | sock_recv_timestamp(msg, sk, skb); |
78326 | 78326 | ||
78327 | serr = SKB_EXT_ERR(skb); | 78327 | serr = SKB_EXT_ERR(skb); |
@@ -78332,7 +78332,7 @@ index 38ca5e0..2395340 100644 | |||
78332 | 78332 | ||
78333 | msg->msg_flags |= MSG_ERRQUEUE; | 78333 | msg->msg_flags |= MSG_ERRQUEUE; |
78334 | err = copied; | 78334 | err = copied; |
78335 | @@ -3304,7 +3306,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, | 78335 | @@ -3290,7 +3292,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, |
78336 | case PACKET_HDRLEN: | 78336 | case PACKET_HDRLEN: |
78337 | if (len > sizeof(int)) | 78337 | if (len > sizeof(int)) |
78338 | len = sizeof(int); | 78338 | len = sizeof(int); |
@@ -78341,7 +78341,7 @@ index 38ca5e0..2395340 100644 | |||
78341 | return -EFAULT; | 78341 | return -EFAULT; |
78342 | switch (val) { | 78342 | switch (val) { |
78343 | case TPACKET_V1: | 78343 | case TPACKET_V1: |
78344 | @@ -3354,7 +3356,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, | 78344 | @@ -3340,7 +3342,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, |
78345 | 78345 | ||
78346 | if (put_user(len, optlen)) | 78346 | if (put_user(len, optlen)) |
78347 | return -EFAULT; | 78347 | return -EFAULT; |
diff --git a/main/linux-grsec/r8169-fix-vlan-tag-reordering.patch b/main/linux-grsec/r8169-fix-vlan-tag-reordering.patch deleted file mode 100644 index 474e567471..0000000000 --- a/main/linux-grsec/r8169-fix-vlan-tag-reordering.patch +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | From ce11ff5e5963e441feb591e76278528f876c332d Mon Sep 17 00:00:00 2001 | ||
2 | From: =?utf8?q?fran=C3=A7ois=20romieu?= <romieu@fr.zoreil.com> | ||
3 | Date: Thu, 24 Jan 2013 13:30:06 +0000 | ||
4 | Subject: [PATCH] r8169: fix vlan tag read ordering. | ||
5 | |||
6 | Control of receive descriptor must not be returned to ethernet chipset | ||
7 | before vlan tag processing is done. | ||
8 | |||
9 | VLAN tag receive word is now reset both in normal and error path. | ||
10 | |||
11 | Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> | ||
12 | Spotted-by: Timo Teras <timo.teras@iki.fi> | ||
13 | Cc: Hayes Wang <hayeswang@realtek.com> | ||
14 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
15 | --- | ||
16 | drivers/net/ethernet/realtek/r8169.c | 14 ++++++-------- | ||
17 | 1 files changed, 6 insertions(+), 8 deletions(-) | ||
18 | |||
19 | diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c | ||
20 | index c28bc31..1170232 100644 | ||
21 | --- a/drivers/net/ethernet/realtek/r8169.c | ||
22 | +++ b/drivers/net/ethernet/realtek/r8169.c | ||
23 | @@ -1826,8 +1826,6 @@ static void rtl8169_rx_vlan_tag(struct RxDesc *desc, struct sk_buff *skb) | ||
24 | |||
25 | if (opts2 & RxVlanTag) | ||
26 | __vlan_hwaccel_put_tag(skb, swab16(opts2 & 0xffff)); | ||
27 | - | ||
28 | - desc->opts2 = 0; | ||
29 | } | ||
30 | |||
31 | static int rtl8169_gset_tbi(struct net_device *dev, struct ethtool_cmd *cmd) | ||
32 | @@ -6064,8 +6062,6 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget | ||
33 | !(status & (RxRWT | RxFOVF)) && | ||
34 | (dev->features & NETIF_F_RXALL)) | ||
35 | goto process_pkt; | ||
36 | - | ||
37 | - rtl8169_mark_to_asic(desc, rx_buf_sz); | ||
38 | } else { | ||
39 | struct sk_buff *skb; | ||
40 | dma_addr_t addr; | ||
41 | @@ -6086,16 +6082,14 @@ process_pkt: | ||
42 | if (unlikely(rtl8169_fragmented_frame(status))) { | ||
43 | dev->stats.rx_dropped++; | ||
44 | dev->stats.rx_length_errors++; | ||
45 | - rtl8169_mark_to_asic(desc, rx_buf_sz); | ||
46 | - continue; | ||
47 | + goto release_descriptor; | ||
48 | } | ||
49 | |||
50 | skb = rtl8169_try_rx_copy(tp->Rx_databuff[entry], | ||
51 | tp, pkt_size, addr); | ||
52 | - rtl8169_mark_to_asic(desc, rx_buf_sz); | ||
53 | if (!skb) { | ||
54 | dev->stats.rx_dropped++; | ||
55 | - continue; | ||
56 | + goto release_descriptor; | ||
57 | } | ||
58 | |||
59 | rtl8169_rx_csum(skb, status); | ||
60 | @@ -6111,6 +6105,10 @@ process_pkt: | ||
61 | tp->rx_stats.bytes += pkt_size; | ||
62 | u64_stats_update_end(&tp->rx_stats.syncp); | ||
63 | } | ||
64 | +release_descriptor: | ||
65 | + desc->opts2 = 0; | ||
66 | + wmb(); | ||
67 | + rtl8169_mark_to_asic(desc, rx_buf_sz); | ||
68 | } | ||
69 | |||
70 | count = cur_rx - tp->cur_rx; | ||
71 | -- | ||
72 | 1.7.6.5 | ||
73 | |||