From 0f07496f520cef7c58efe125d542cbc063bbc558 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 3 Jul 2020 21:46:40 +0200 Subject: [PATCH] kernel: Update kernel 4.9 to version 4.9.229 Fixes: - CVE-2020-10757 Run tested: ar71xx Build tested: ar71xx Signed-off-by: Hauke Mehrtens --- include/kernel-version.mk | 4 ++-- .../files/drivers/mtd/nand/ar934x_nfc.c | 2 +- .../files/drivers/mtd/nand/rb4xx_nand.c | 4 ++-- .../files/drivers/mtd/nand/rb750_nand.c | 4 ++-- .../files/drivers/mtd/nand/rb91x_nand.c | 4 ++-- .../910-unaligned_access_hacks.patch | 4 ++-- ...-dtco-targets-when-filtering-symbols.patch | 2 +- .../950-0044-Add-SMI-NAND-driver.patch | 4 ++-- .../011-kbuild-export-SUBARCH.patch | 2 +- ...tcp-allow-drivers-to-tweak-TSQ-logic.patch | 2 +- ...or-releasing-multiple-instances-of-a.patch | 2 +- ...c_page_frag-to-page_frag_alloc-and-_.patch | 4 ++-- ..._frag-functions-to-__page_frag_cache.patch | 6 +++--- ...mtd-nand-Add-Winbond-manufacturer-id.patch | 2 +- ...90-net-generalize-napi_complete_done.patch | 4 ++-- .../hack-4.9/202-reduce_module_size.patch | 2 +- .../hack-4.9/207-disable-modorder.patch | 4 ++-- .../generic/hack-4.9/220-gc_sections.patch | 6 +++--- .../260-crypto_test_dependencies.patch | 2 +- .../661-use_fq_codel_by_default.patch | 2 +- .../hack-4.9/662-remove_pfifo_fast.patch | 2 +- .../generic/hack-4.9/721-phy_packets.patch | 2 +- .../hack-4.9/901-debloat_sock_diag.patch | 2 +- .../generic/hack-4.9/902-debloat_proc.patch | 2 +- ...e_mem_map-with-ARCH_PFN_OFFSET-calcu.patch | 2 +- ...ng-comment-related-to-link-detection.patch | 4 ++-- .../pending-4.9/201-extra_optimization.patch | 12 ++++------- .../pending-4.9/304-mips_disable_fpu.patch | 2 +- .../332-arc-add-OWRTDTB-section.patch | 4 ++-- ...ng-with-source-address-failed-policy.patch | 20 +++++++++---------- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 10 +++++----- .../pending-4.9/834-ledtrig-libata.patch | 16 +++++++-------- .../202-core-linux-support-layerscape.patch | 2 +- .../804-crypto-support-layerscape.patch | 2 +- .../817-usb-support-layerscape.patch | 2 +- .../200-pcengines-apu2-reboot.patch | 2 +- 36 files changed, 74 insertions(+), 78 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 898e923286..3caa941b72 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -2,10 +2,10 @@ LINUX_RELEASE?=1 -LINUX_VERSION-4.9 = .223 +LINUX_VERSION-4.9 = .229 LINUX_VERSION-4.14 = .187 -LINUX_KERNEL_HASH-4.9.223 = cf5300e6f5d8c66c2bed8f00d53f9c58103731809862427012e4010f5d782ae5 +LINUX_KERNEL_HASH-4.9.229 = 3256c2835fd95a1a739603e78b02d363eac2ce73a39fa19b13b32da4fc370fdc LINUX_KERNEL_HASH-4.14.187 = 5b223475eaeea196aa7e127d3f253bca5c35d8afdc72ca75230ce1ecdd1454bd remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c b/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c index a135e0f52f..8ef8b751b0 100644 --- a/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c +++ b/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c @@ -1562,7 +1562,7 @@ ar934x_nfc_remove(struct platform_device *pdev) nfc = platform_get_drvdata(pdev); if (nfc) { mtd = ar934x_nfc_to_mtd(nfc); - nand_release(mtd); + nand_release(&nfc->nand_chip); ar934x_nfc_free_buf(nfc); free_irq(nfc->irq, nfc); } diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c b/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c index 5bbe9789fb..5fd0ef07ac 100644 --- a/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c +++ b/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c @@ -331,7 +331,7 @@ static int rb4xx_nand_probe(struct platform_device *pdev) return 0; err_release_nand: - nand_release(mtd); + nand_release(&info->chip); err_set_drvdata: platform_set_drvdata(pdev, NULL); err_free_info: @@ -352,7 +352,7 @@ static int rb4xx_nand_remove(struct platform_device *pdev) { struct rb4xx_nand_info *info = platform_get_drvdata(pdev); - nand_release(rbinfo_to_mtd(info)); + nand_release(&info->chip)); platform_set_drvdata(pdev, NULL); kfree(info); gpio_free(RB4XX_NAND_GPIO_NCE); diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c b/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c index dbada68dd0..f57b718e41 100644 --- a/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c +++ b/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c @@ -389,7 +389,7 @@ static int rb750_nand_probe(struct platform_device *pdev) return 0; err_release_nand: - nand_release(mtd); + nand_release(&info->chip); err_set_drvdata: platform_set_drvdata(pdev, NULL); err_free_info: @@ -401,7 +401,7 @@ static int rb750_nand_remove(struct platform_device *pdev) { struct rb750_nand_info *info = platform_get_drvdata(pdev); - nand_release(rbinfo_to_mtd(info)); + nand_release(&info->chip); platform_set_drvdata(pdev, NULL); kfree(info); diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c b/target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c index c808f39989..864768c1f0 100644 --- a/target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c +++ b/target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c @@ -430,7 +430,7 @@ static int rb91x_nand_probe(struct platform_device *pdev) return 0; err_release_nand: - nand_release(mtd); + nand_release(&rbni->chip); return ret; } @@ -438,7 +438,7 @@ static int rb91x_nand_remove(struct platform_device *pdev) { struct rb91x_nand_info *info = platform_get_drvdata(pdev); - nand_release(rbinfo_to_mtd(info)); + nand_release(&rbni->chip); return 0; } diff --git a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch index 2579a12cdd..ebf44b21bd 100644 --- a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch @@ -267,7 +267,7 @@ case IPV6_2292HOPOPTS: --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c -@@ -397,7 +397,7 @@ static void ip6gre_err(struct sk_buff *s +@@ -400,7 +400,7 @@ static void ip6gre_err(struct sk_buff *s return; ipv6h = (const struct ipv6hdr *)skb->data; greh = (const struct gre_base_hdr *)(skb->data + offset); @@ -888,7 +888,7 @@ *sum = csum_fold(csum_partial(diff, sizeof(diff), --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c -@@ -1800,15 +1800,15 @@ static int vxlan_build_skb(struct sk_buf +@@ -1804,15 +1804,15 @@ static int vxlan_build_skb(struct sk_buf goto out_free; vxh = (struct vxlanhdr *) __skb_push(skb, sizeof(*vxh)); diff --git a/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch b/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch index 37bcc65ed5..28f337b0e3 100644 --- a/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch +++ b/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch @@ -9,7 +9,7 @@ Subject: [PATCH] kbuild: Ignore dtco targets when filtering symbols --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include -@@ -294,7 +294,7 @@ ksym_dep_filter = +@@ -295,7 +295,7 @@ ksym_dep_filter = $(CPP) $(call flags_nodeps,c_flags) -D__KSYM_DEPS__ $< ;; \ as_*_S|cpp_s_S) \ $(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \ diff --git a/target/linux/brcm2708/patches-4.9/950-0044-Add-SMI-NAND-driver.patch b/target/linux/brcm2708/patches-4.9/950-0044-Add-SMI-NAND-driver.patch index ec6010a296..8e1d09880e 100644 --- a/target/linux/brcm2708/patches-4.9/950-0044-Add-SMI-NAND-driver.patch +++ b/target/linux/brcm2708/patches-4.9/950-0044-Add-SMI-NAND-driver.patch @@ -312,7 +312,7 @@ Signed-off-by: Luke Wren + if (!ret) + return 0; + -+ nand_release(mtd); ++ nand_release(this); + return -EINVAL; +} + @@ -320,7 +320,7 @@ Signed-off-by: Luke Wren +{ + struct bcm2835_smi_nand_host *host = platform_get_drvdata(pdev); + -+ nand_release(&host->mtd); ++ nand_release(&host->nand_chip); + + return 0; +} diff --git a/target/linux/generic/backport-4.9/011-kbuild-export-SUBARCH.patch b/target/linux/generic/backport-4.9/011-kbuild-export-SUBARCH.patch index 4c0e07581d..a9d91e65ea 100644 --- a/target/linux/generic/backport-4.9/011-kbuild-export-SUBARCH.patch +++ b/target/linux/generic/backport-4.9/011-kbuild-export-SUBARCH.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -407,8 +407,8 @@ KERNELRELEASE = $(shell cat include/conf +@@ -403,8 +403,8 @@ KERNELRELEASE = $(shell cat include/conf KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION diff --git a/target/linux/generic/backport-4.9/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch b/target/linux/generic/backport-4.9/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch index 11f1cd565d..3ba94528ab 100644 --- a/target/linux/generic/backport-4.9/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch +++ b/target/linux/generic/backport-4.9/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch @@ -55,7 +55,7 @@ Cc: Kir Kolyshkin rwlock_t sk_callback_lock; --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -2484,6 +2484,7 @@ void sock_init_data(struct socket *sock, +@@ -2486,6 +2486,7 @@ void sock_init_data(struct socket *sock, sk->sk_max_pacing_rate = ~0U; sk->sk_pacing_rate = ~0U; diff --git a/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch b/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch index 4656bb1db3..f919aa2203 100644 --- a/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch +++ b/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch @@ -52,7 +52,7 @@ Signed-off-by: Linus Torvalds extern void __free_page_frag(void *addr); --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -3935,6 +3935,20 @@ static struct page *__page_frag_refill(s +@@ -3936,6 +3936,20 @@ static struct page *__page_frag_refill(s return page; } diff --git a/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch b/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch index 03481d13c8..7dd86b5a65 100644 --- a/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch +++ b/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch @@ -63,7 +63,7 @@ Signed-off-by: Linus Torvalds void *napi_alloc_frag(unsigned int fragsz); --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -3949,8 +3949,8 @@ void __page_frag_drain(struct page *page +@@ -3950,8 +3950,8 @@ void __page_frag_drain(struct page *page } EXPORT_SYMBOL(__page_frag_drain); @@ -74,7 +74,7 @@ Signed-off-by: Linus Torvalds { unsigned int size = PAGE_SIZE; struct page *page; -@@ -4001,19 +4001,19 @@ refill: +@@ -4002,19 +4002,19 @@ refill: return nc->va + offset; } diff --git a/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch b/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch index cb2bdfc7ee..5a1cfcdef5 100644 --- a/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch +++ b/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch @@ -33,7 +33,7 @@ Signed-off-by: Linus Torvalds extern void page_frag_free(void *addr); --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -3914,8 +3914,8 @@ EXPORT_SYMBOL(free_pages); +@@ -3915,8 +3915,8 @@ EXPORT_SYMBOL(free_pages); * drivers to provide a backing region of memory for use as either an * sk_buff->head, or to be used in the "frags" portion of skb_shared_info. */ @@ -44,7 +44,7 @@ Signed-off-by: Linus Torvalds { struct page *page = NULL; gfp_t gfp = gfp_mask; -@@ -3935,19 +3935,20 @@ static struct page *__page_frag_refill(s +@@ -3936,19 +3936,20 @@ static struct page *__page_frag_refill(s return page; } @@ -68,7 +68,7 @@ Signed-off-by: Linus Torvalds void *page_frag_alloc(struct page_frag_cache *nc, unsigned int fragsz, gfp_t gfp_mask) -@@ -3958,7 +3959,7 @@ void *page_frag_alloc(struct page_frag_c +@@ -3959,7 +3960,7 @@ void *page_frag_alloc(struct page_frag_c if (unlikely(!nc->va)) { refill: diff --git a/target/linux/generic/backport-4.9/063-v4.11-0001-mtd-nand-Add-Winbond-manufacturer-id.patch b/target/linux/generic/backport-4.9/063-v4.11-0001-mtd-nand-Add-Winbond-manufacturer-id.patch index cbab378b2b..b6545bb714 100644 --- a/target/linux/generic/backport-4.9/063-v4.11-0001-mtd-nand-Add-Winbond-manufacturer-id.patch +++ b/target/linux/generic/backport-4.9/063-v4.11-0001-mtd-nand-Add-Winbond-manufacturer-id.patch @@ -24,7 +24,7 @@ Signed-off-by: Boris Brezillon --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h -@@ -928,6 +928,7 @@ static inline void nand_set_controller_d +@@ -926,6 +926,7 @@ static inline void nand_set_controller_d #define NAND_MFR_SANDISK 0x45 #define NAND_MFR_INTEL 0x89 #define NAND_MFR_ATO 0x9b diff --git a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch index 712348c835..8e3f76261e 100644 --- a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch +++ b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch @@ -657,7 +657,7 @@ Signed-off-by: David S. Miller gfar_write(®s->rstat, gfargrp->rstat); --- a/drivers/net/ethernet/freescale/ucc_geth.c +++ b/drivers/net/ethernet/freescale/ucc_geth.c -@@ -3303,7 +3303,7 @@ static int ucc_geth_poll(struct napi_str +@@ -3304,7 +3304,7 @@ static int ucc_geth_poll(struct napi_str howmany += ucc_geth_rx(ugeth, i, budget - howmany); if (howmany < budget) { @@ -927,7 +927,7 @@ Signed-off-by: David S. Miller } --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c -@@ -999,7 +999,7 @@ static int lpc_eth_poll(struct napi_stru +@@ -1000,7 +1000,7 @@ static int lpc_eth_poll(struct napi_stru rx_done = __lpc_handle_recv(ndev, budget); if (rx_done < budget) { diff --git a/target/linux/generic/hack-4.9/202-reduce_module_size.patch b/target/linux/generic/hack-4.9/202-reduce_module_size.patch index e486386777..9d66c38b99 100644 --- a/target/linux/generic/hack-4.9/202-reduce_module_size.patch +++ b/target/linux/generic/hack-4.9/202-reduce_module_size.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -398,7 +398,7 @@ KBUILD_AFLAGS_KERNEL := +@@ -394,7 +394,7 @@ KBUILD_AFLAGS_KERNEL := KBUILD_CFLAGS_KERNEL := KBUILD_AFLAGS_MODULE := -DMODULE KBUILD_CFLAGS_MODULE := -DMODULE diff --git a/target/linux/generic/hack-4.9/207-disable-modorder.patch b/target/linux/generic/hack-4.9/207-disable-modorder.patch index 62f67ac95d..5d7dbf1f06 100644 --- a/target/linux/generic/hack-4.9/207-disable-modorder.patch +++ b/target/linux/generic/hack-4.9/207-disable-modorder.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -1240,7 +1240,6 @@ all: modules +@@ -1248,7 +1248,6 @@ endif PHONY += modules modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau @$(kecho) ' Building modules, stage 2.'; $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild -@@ -1270,7 +1269,6 @@ _modinst_: +@@ -1278,7 +1277,6 @@ _modinst_: rm -f $(MODLIB)/build ; \ ln -s $(CURDIR) $(MODLIB)/build ; \ fi diff --git a/target/linux/generic/hack-4.9/220-gc_sections.patch b/target/linux/generic/hack-4.9/220-gc_sections.patch index e795d666df..cd55f27d00 100644 --- a/target/linux/generic/hack-4.9/220-gc_sections.patch +++ b/target/linux/generic/hack-4.9/220-gc_sections.patch @@ -21,7 +21,7 @@ Signed-off-by: Gabor Juhos --- a/Makefile +++ b/Makefile -@@ -402,6 +402,11 @@ KBUILD_LDFLAGS_MODULE = -T $(srctree)/sc +@@ -398,6 +398,11 @@ KBUILD_LDFLAGS_MODULE = -T $(srctree)/sc GCC_PLUGINS_CFLAGS := CLANG_FLAGS := @@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos # Read KERNELRELEASE from include/config/kernel.release (if it exists) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) -@@ -652,11 +657,6 @@ KBUILD_CFLAGS += $(call cc-disable-warni +@@ -648,11 +653,6 @@ KBUILD_CFLAGS += $(call cc-disable-warni KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias) @@ -43,7 +43,7 @@ Signed-off-by: Gabor Juhos -endif - ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE - KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION) + KBUILD_CFLAGS += -Os $(EXTRA_OPTIMIZATION) else --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig diff --git a/target/linux/generic/hack-4.9/260-crypto_test_dependencies.patch b/target/linux/generic/hack-4.9/260-crypto_test_dependencies.patch index f2570f5988..bd406552dc 100644 --- a/target/linux/generic/hack-4.9/260-crypto_test_dependencies.patch +++ b/target/linux/generic/hack-4.9/260-crypto_test_dependencies.patch @@ -43,7 +43,7 @@ Signed-off-by: Felix Fietkau algorithm registration. --- a/crypto/algboss.c +++ b/crypto/algboss.c -@@ -248,12 +248,16 @@ static int cryptomgr_schedule_test(struc +@@ -246,12 +246,16 @@ static int cryptomgr_schedule_test(struc type = alg->cra_flags; /* This piece of crap needs to disappear into per-type test hooks. */ diff --git a/target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch index 22d5a3893a..0b9e7dd431 100644 --- a/target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch +++ b/target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau EXPORT_SYMBOL(default_qdisc_ops); /* Main transmission queue. */ -@@ -764,7 +764,7 @@ static void attach_one_default_qdisc(str +@@ -765,7 +765,7 @@ static void attach_one_default_qdisc(str void *_unused) { struct Qdisc *qdisc; diff --git a/target/linux/generic/hack-4.9/662-remove_pfifo_fast.patch b/target/linux/generic/hack-4.9/662-remove_pfifo_fast.patch index d9fba6288d..a1117d3841 100644 --- a/target/linux/generic/hack-4.9/662-remove_pfifo_fast.patch +++ b/target/linux/generic/hack-4.9/662-remove_pfifo_fast.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -449,146 +449,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea +@@ -450,146 +450,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea .owner = THIS_MODULE, }; diff --git a/target/linux/generic/hack-4.9/721-phy_packets.patch b/target/linux/generic/hack-4.9/721-phy_packets.patch index e1ad675a76..ed51c22b94 100644 --- a/target/linux/generic/hack-4.9/721-phy_packets.patch +++ b/target/linux/generic/hack-4.9/721-phy_packets.patch @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -2972,10 +2972,20 @@ static int xmit_one(struct sk_buff *skb, +@@ -2968,10 +2968,20 @@ static int xmit_one(struct sk_buff *skb, if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/generic/hack-4.9/901-debloat_sock_diag.patch b/target/linux/generic/hack-4.9/901-debloat_sock_diag.patch index a78bb0f8a4..fd7233f8cc 100644 --- a/target/linux/generic/hack-4.9/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-4.9/901-debloat_sock_diag.patch @@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau obj-$(CONFIG_PROC_FS) += net-procfs.o --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -1463,9 +1463,11 @@ void sk_destruct(struct sock *sk) +@@ -1464,9 +1464,11 @@ void sk_destruct(struct sock *sk) static void __sk_free(struct sock *sk) { diff --git a/target/linux/generic/hack-4.9/902-debloat_proc.patch b/target/linux/generic/hack-4.9/902-debloat_proc.patch index 338bbea553..22bba555bf 100644 --- a/target/linux/generic/hack-4.9/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.9/902-debloat_proc.patch @@ -328,7 +328,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -3093,6 +3093,8 @@ static __net_initdata struct pernet_oper +@@ -3095,6 +3095,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index 0f6ce1f802..56b70697ee 100644 --- a/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -5924,7 +5924,7 @@ static void __ref alloc_node_mem_map(str +@@ -5925,7 +5925,7 @@ static void __ref alloc_node_mem_map(str mem_map = NODE_DATA(0)->node_mem_map; #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM) if (page_to_pfn(mem_map) != pgdat->node_start_pfn) diff --git a/target/linux/generic/pending-4.9/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch b/target/linux/generic/pending-4.9/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch index 8899664fba..663028274b 100644 --- a/target/linux/generic/pending-4.9/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch +++ b/target/linux/generic/pending-4.9/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch @@ -23,7 +23,7 @@ Tested-by: Aaron Brown --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c -@@ -5067,7 +5067,7 @@ static bool e1000e_has_link(struct e1000 +@@ -5065,7 +5065,7 @@ static bool e1000e_has_link(struct e1000 /* get_link_status is set on LSC (link status) interrupt or * Rx sequence error interrupt. get_link_status will stay @@ -32,7 +32,7 @@ Tested-by: Aaron Brown * for copper adapters ONLY */ switch (hw->phy.media_type) { -@@ -5085,7 +5085,7 @@ static bool e1000e_has_link(struct e1000 +@@ -5083,7 +5083,7 @@ static bool e1000e_has_link(struct e1000 break; case e1000_media_type_internal_serdes: ret_val = hw->mac.ops.check_for_link(hw); diff --git a/target/linux/generic/pending-4.9/201-extra_optimization.patch b/target/linux/generic/pending-4.9/201-extra_optimization.patch index 813951158c..7c64123f6e 100644 --- a/target/linux/generic/pending-4.9/201-extra_optimization.patch +++ b/target/linux/generic/pending-4.9/201-extra_optimization.patch @@ -14,19 +14,15 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -658,12 +658,12 @@ KBUILD_CFLAGS += $(call cc-option,-fdata +@@ -654,9 +654,9 @@ KBUILD_CFLAGS += $(call cc-option,-fdata endif ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE --KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) -+KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION) - else - ifdef CONFIG_PROFILE_ALL_BRANCHES --KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,) -+KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION) +-KBUILD_CFLAGS += -Os ++KBUILD_CFLAGS += -Os $(EXTRA_OPTIMIZATION) else -KBUILD_CFLAGS += -O2 +KBUILD_CFLAGS += -O2 -fno-reorder-blocks -fno-tree-ch $(EXTRA_OPTIMIZATION) endif - endif + # Tell gcc to never replace conditional load with a non-conditional one diff --git a/target/linux/generic/pending-4.9/304-mips_disable_fpu.patch b/target/linux/generic/pending-4.9/304-mips_disable_fpu.patch index b59b9feee9..e6ade684d7 100644 --- a/target/linux/generic/pending-4.9/304-mips_disable_fpu.patch +++ b/target/linux/generic/pending-4.9/304-mips_disable_fpu.patch @@ -47,7 +47,7 @@ v2: incorporated changes suggested by Jonas Gorski select OF --- a/arch/mips/Makefile +++ b/arch/mips/Makefile -@@ -287,7 +287,7 @@ OBJCOPYFLAGS += --remove-section=.regin +@@ -298,7 +298,7 @@ OBJCOPYFLAGS += --remove-section=.regin head-y := arch/mips/kernel/head.o libs-y += arch/mips/lib/ diff --git a/target/linux/generic/pending-4.9/332-arc-add-OWRTDTB-section.patch b/target/linux/generic/pending-4.9/332-arc-add-OWRTDTB-section.patch index 6f248343ab..66455a6b2e 100644 --- a/target/linux/generic/pending-4.9/332-arc-add-OWRTDTB-section.patch +++ b/target/linux/generic/pending-4.9/332-arc-add-OWRTDTB-section.patch @@ -38,7 +38,7 @@ Signed-off-by: Alexey Brodkin ;---------------------------------------------------------------- --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c -@@ -404,6 +404,8 @@ static inline bool uboot_arg_invalid(uns +@@ -405,6 +405,8 @@ static inline bool uboot_arg_invalid(uns /* We always pass 0 as magic from U-boot */ #define UBOOT_MAGIC_VALUE 0 @@ -47,7 +47,7 @@ Signed-off-by: Alexey Brodkin void __init handle_uboot_args(void) { bool use_embedded_dtb = true; -@@ -444,7 +446,7 @@ ignore_uboot_args: +@@ -445,7 +447,7 @@ ignore_uboot_args: #endif if (use_embedded_dtb) { diff --git a/target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index b9c7aa06c9..f71aac4956 100644 --- a/target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -141,7 +141,7 @@ Signed-off-by: Jonas Gorski static const struct rt6_info ip6_blk_hole_entry_template = { .dst = { .__refcnt = ATOMIC_INIT(1), -@@ -1970,6 +1987,11 @@ static struct rt6_info *ip6_route_info_c +@@ -1972,6 +1989,11 @@ static struct rt6_info *ip6_route_info_c rt->dst.output = ip6_pkt_prohibit_out; rt->dst.input = ip6_pkt_prohibit; break; @@ -153,7 +153,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -2613,6 +2635,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -2615,6 +2637,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -171,7 +171,7 @@ Signed-off-by: Jonas Gorski /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -2850,7 +2883,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -2852,7 +2885,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -3223,6 +3257,9 @@ static int rt6_fill_node(struct net *net +@@ -3225,6 +3259,9 @@ static int rt6_fill_node(struct net *net case -EACCES: rtm->rtm_type = RTN_PROHIBIT; break; @@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -3499,6 +3536,8 @@ static int ip6_route_dev_notify(struct n +@@ -3501,6 +3538,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -200,7 +200,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -3510,6 +3549,7 @@ static int ip6_route_dev_notify(struct n +@@ -3512,6 +3551,7 @@ static int ip6_route_dev_notify(struct n in6_dev_put(net->ipv6.ip6_null_entry->rt6i_idev); #ifdef CONFIG_IPV6_MULTIPLE_TABLES in6_dev_put(net->ipv6.ip6_prohibit_entry->rt6i_idev); @@ -208,7 +208,7 @@ Signed-off-by: Jonas Gorski in6_dev_put(net->ipv6.ip6_blk_hole_entry->rt6i_idev); #endif } -@@ -3725,6 +3765,17 @@ static int __net_init ip6_route_net_init +@@ -3727,6 +3767,17 @@ static int __net_init ip6_route_net_init net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); @@ -226,7 +226,7 @@ Signed-off-by: Jonas Gorski #endif net->ipv6.sysctl.flush_delay = 0; -@@ -3743,6 +3794,8 @@ out: +@@ -3745,6 +3796,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -3760,6 +3813,7 @@ static void __net_exit ip6_route_net_exi +@@ -3762,6 +3815,7 @@ static void __net_exit ip6_route_net_exi #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_blk_hole_entry); @@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -3833,6 +3887,9 @@ void __init ip6_route_init_special_entri +@@ -3835,6 +3889,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index e7e1a3a3bc..029f545360 100644 --- a/target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-4.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau __u16 tc_index; /* traffic control index */ --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4572,6 +4572,9 @@ static enum gro_result dev_gro_receive(s +@@ -4568,6 +4568,9 @@ static enum gro_result dev_gro_receive(s enum gro_result ret; int grow; @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau if (!(skb->dev->features & NETIF_F_GRO)) goto normal; -@@ -5867,6 +5870,48 @@ static void __netdev_adjacent_dev_unlink +@@ -5863,6 +5866,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info) -@@ -5939,6 +5984,7 @@ static int __netdev_upper_dev_link(struc +@@ -5935,6 +5980,7 @@ static int __netdev_upper_dev_link(struc goto rollback_lower_mesh; } @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -6065,6 +6111,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -6061,6 +6107,7 @@ void netdev_upper_dev_unlink(struct net_ list_for_each_entry(i, &upper_dev->all_adj_list.upper, list) __netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr); @@ -109,7 +109,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); } -@@ -6668,6 +6715,7 @@ int dev_set_mac_address(struct net_devic +@@ -6664,6 +6711,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch index 0913f3ebff..a369c7166e 100644 --- a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch @@ -45,7 +45,7 @@ Signed-off-by: Daniel Golle depends on ACPI --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c -@@ -731,6 +731,19 @@ u64 ata_tf_read_block(const struct ata_t +@@ -730,6 +730,19 @@ u64 ata_tf_read_block(const struct ata_t return block; } @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -4998,6 +5011,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -4997,6 +5010,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = tag; -@@ -5899,6 +5915,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -5898,6 +5914,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -5920,6 +5939,12 @@ static void ata_host_release(struct devi +@@ -5919,6 +5938,12 @@ static void ata_host_release(struct devi kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6366,7 +6391,23 @@ int ata_host_register(struct ata_host *h +@@ -6365,7 +6390,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } @@ -124,17 +124,17 @@ Signed-off-by: Daniel Golle rc = ata_tport_add(host->dev,host->ports[i]); --- a/include/linux/libata.h +++ b/include/linux/libata.h -@@ -38,6 +38,9 @@ - #include +@@ -39,6 +39,9 @@ #include #include + #include +#ifdef CONFIG_ATA_LEDS +#include +#endif /* * Define if arch has non-standard setup. This is a _PCI_ standard -@@ -884,6 +887,12 @@ struct ata_port { +@@ -887,6 +890,12 @@ struct ata_port { #ifdef CONFIG_ATA_ACPI struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ #endif diff --git a/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch b/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch index 3ad570e8b2..d807aba929 100644 --- a/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch @@ -421,7 +421,7 @@ Signed-off-by: Yangbo Lu * These are the defined Ethernet Protocol ID's. --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6660,9 +6660,18 @@ int dev_set_mtu(struct net_device *dev, +@@ -6656,9 +6656,18 @@ int dev_set_mtu(struct net_device *dev, if (new_mtu == dev->mtu) return 0; diff --git a/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch b/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch index ba41b6986a..e8af766171 100644 --- a/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch @@ -355,7 +355,7 @@ Signed-off-by: Yangbo Lu +MODULE_DESCRIPTION("Asynchronous compression type"); --- a/crypto/algboss.c +++ b/crypto/algboss.c -@@ -247,17 +247,9 @@ static int cryptomgr_schedule_test(struc +@@ -245,17 +245,9 @@ static int cryptomgr_schedule_test(struc memcpy(param->alg, alg->cra_name, sizeof(param->alg)); type = alg->cra_flags; diff --git a/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch index d029b7cc6c..ca244692c5 100644 --- a/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch @@ -1473,7 +1473,7 @@ Signed-off-by: Yangbo Lu while (ep_ring->dequeue != td->last_trb) --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -1616,14 +1616,38 @@ int xhci_urb_dequeue(struct usb_hcd *hcd +@@ -1617,14 +1617,38 @@ int xhci_urb_dequeue(struct usb_hcd *hcd ret = -ENOMEM; goto done; } diff --git a/target/linux/x86/patches-4.9/200-pcengines-apu2-reboot.patch b/target/linux/x86/patches-4.9/200-pcengines-apu2-reboot.patch index 0eaf1ed70c..0a312fbe3f 100644 --- a/target/linux/x86/patches-4.9/200-pcengines-apu2-reboot.patch +++ b/target/linux/x86/patches-4.9/200-pcengines-apu2-reboot.patch @@ -1,6 +1,6 @@ --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c -@@ -470,6 +470,16 @@ static struct dmi_system_id __initdata r +@@ -478,6 +478,16 @@ static struct dmi_system_id __initdata r }, }, -- 2.30.2