kernel: bump 4.9 to 4.9.227
authorKoen Vandeputte <[email protected]>
Tue, 16 Jun 2020 13:37:44 +0000 (15:37 +0200)
committerKoen Vandeputte <[email protected]>
Tue, 16 Jun 2020 14:18:54 +0000 (16:18 +0200)
Refreshed all patches.

Altered patches:
- 201-extra_optimization.patch

Fixes:
- CVE-2020-10757

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <[email protected]>
include/kernel-version.mk
target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch
target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch
target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch
target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch
target/linux/generic/hack-4.9/207-disable-modorder.patch
target/linux/generic/hack-4.9/220-gc_sections.patch
target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
target/linux/generic/pending-4.9/201-extra_optimization.patch
target/linux/generic/pending-4.9/332-arc-add-OWRTDTB-section.patch
target/linux/generic/pending-4.9/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch

index f7d73cdcf88c16e2cdb034a29d28c603971dbf6d..257644dee74766f361e30f04619c61df2b12d423 100644 (file)
@@ -2,10 +2,10 @@
 
 LINUX_RELEASE?=1
 
-LINUX_VERSION-4.9 = .223
+LINUX_VERSION-4.9 = .227
 LINUX_VERSION-4.14 = .180
 
-LINUX_KERNEL_HASH-4.9.223 = cf5300e6f5d8c66c2bed8f00d53f9c58103731809862427012e4010f5d782ae5
+LINUX_KERNEL_HASH-4.9.227 = 38c485b411a14e825f8a66a5c2e64f1480397325a5f692b4929f68d228070c5f
 LINUX_KERNEL_HASH-4.14.180 = 444ef973d9b6a6ea174e4a9086f0aea980d8575d13302e431ad688f22e27ed0e
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
index 4656bb1db3b4ec966f9d4ed671c019dcd4a591b2..f919aa2203f535a3ca0c36c8dfba971489f7f6b0 100644 (file)
@@ -52,7 +52,7 @@ Signed-off-by: Linus Torvalds <[email protected]>
  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;
  }
  
index 03481d13c8885250b123cdae09e1ba75a9005a80..7dd86b5a653f8cda33a2142844e4834db5153cbe 100644 (file)
@@ -63,7 +63,7 @@ Signed-off-by: Linus Torvalds <[email protected]>
  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 <[email protected]>
  {
        unsigned int size = PAGE_SIZE;
        struct page *page;
-@@ -4001,19 +4001,19 @@ refill:
+@@ -4002,19 +4002,19 @@ refill:
  
        return nc->va + offset;
  }
index cb2bdfc7eeb5ee08c90647af6213c3fd3126012c..5a1cfcdef5bd9791cbceef54636818b4c5fcb0b2 100644 (file)
@@ -33,7 +33,7 @@ Signed-off-by: Linus Torvalds <[email protected]>
  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 <[email protected]>
  {
        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 <[email protected]>
  
  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:
index 712348c8354c734a0f9956cf54d13f818809a7ee..2de053f35442b081e89774c47c0e93003281397f 100644 (file)
@@ -657,7 +657,7 @@ Signed-off-by: David S. Miller <[email protected]>
                gfar_write(&regs->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) {
index 62f67ac95d21a6fc87c0cefae0d0a61781ba1b62..d07c38f19e9e6338e88fc1dad090ebbf43be8ed5 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -1240,7 +1240,6 @@ all: modules
+@@ -1245,7 +1245,6 @@ all: modules
  
  PHONY += modules
  modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
        @$(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_:
+@@ -1275,7 +1274,6 @@ _modinst_:
                rm -f $(MODLIB)/build ; \
                ln -s $(CURDIR) $(MODLIB)/build ; \
        fi
index e795d666dfbf0dc678bd0e2c5ef28393f171f757..8da4a36205661ddbcd771c3a7008f939362f194a 100644 (file)
@@ -43,7 +43,7 @@ Signed-off-by: Gabor Juhos <[email protected]>
 -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
index 0f6ce1f80235a75ead3c34e762cba88129caeeb1..56b70697eed19acc119682213878145bc77e6d4e 100644 (file)
@@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <[email protected]>
 
 --- 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)
index 813951158cbc7f7d4432aad6a9904c3941533816..cf17cd76ac7787d205c2832678177372ab99758e 100644 (file)
@@ -14,19 +14,15 @@ Signed-off-by: Felix Fietkau <[email protected]>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -658,12 +658,12 @@ KBUILD_CFLAGS    += $(call cc-option,-fdata
+@@ -658,9 +658,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
index 6f248343ab77e21084ae4bd55998694574436edc..66455a6b2efc48251e328118a1b3ebe9780758f0 100644 (file)
@@ -38,7 +38,7 @@ Signed-off-by: Alexey Brodkin <[email protected]>
  ;----------------------------------------------------------------
 --- 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 <[email protected]>
  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) {
index b9c7aa06c90652623bdf480017e90df562b625d5..f71aac4956ada3fe7d39df119bd05a1233e872b0 100644 (file)
@@ -141,7 +141,7 @@ Signed-off-by: Jonas Gorski <[email protected]>
  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 <[email protected]>
                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 <[email protected]>
  /*
   *    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 <[email protected]>
                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 <[email protected]>
                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 <[email protected]>
                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 <[email protected]>
                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 <[email protected]>
  #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 <[email protected]>
  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 <[email protected]>
  #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);