From 9e1530b2a35e051664ed243efd1eac942883494a Mon Sep 17 00:00:00 2001 From: Stijn Segers Date: Sat, 4 Aug 2018 18:08:25 +0200 Subject: kernel: bump 4.9 to 4.9.117 for 18.06 * Refreshed patches. * Removed patches: - target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch superseded by upstream - target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch superseded by upstream - target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch accepted upstream - target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch accepted upstream - target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch accepted upstream - target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch * New backported patch to address ext4 breakage, introduced in 4.9.112: - backport-4.9/500-ext4-fix-check-to-prevent-initializing-reserved-inod.patch Also add ARM64_SSBD symbol to ARM64 targets still running kernel 4.9 Thanks to Koen Vandeputte for pointing out the need to add the ARM64_SSBD symbol, and the ext4 patch. Compile-tested on: ar71xx Run-tested on: ar71xx Signed-off-by: Stijn Segers --- ...c_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch | 2 +- .../pending-4.9/201-extra_optimization.patch | 2 +- ...610-netfilter_match_bypass_default_checks.patch | 6 +-- .../pending-4.9/630-packet_socket_type.patch | 6 +-- .../generic/pending-4.9/834-ledtrig-libata.patch | 10 ++--- .../pending-4.9/890-uart_optional_sysrq.patch | 2 +- .../900-gen_stats-fix-netlink-stats-padding.patch | 49 ---------------------- 7 files changed, 14 insertions(+), 63 deletions(-) delete mode 100644 target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch (limited to 'target/linux/generic/pending-4.9') 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 adae2e049c..5b886b30fd 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 -@@ -5918,7 +5918,7 @@ static void __ref alloc_node_mem_map(str +@@ -5932,7 +5932,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/201-extra_optimization.patch b/target/linux/generic/pending-4.9/201-extra_optimization.patch index 2da816e4e0..3e878e96d6 100644 --- a/target/linux/generic/pending-4.9/201-extra_optimization.patch +++ b/target/linux/generic/pending-4.9/201-extra_optimization.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -642,12 +642,12 @@ KBUILD_CFLAGS += $(call cc-option,-fdata +@@ -643,12 +643,12 @@ KBUILD_CFLAGS += $(call cc-option,-fdata endif ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE diff --git a/target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch index 217d20ec5d..d3a6afa804 100644 --- a/target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch +++ b/target/linux/generic/pending-4.9/610-netfilter_match_bypass_default_checks.patch @@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau if (!xt_percpu_counter_alloc(alloc_state, &e->counters)) return -ENOMEM; -@@ -829,6 +857,7 @@ copy_entries_to_user(unsigned int total_ +@@ -830,6 +858,7 @@ copy_entries_to_user(unsigned int total_ const struct xt_table_info *private = table->private; int ret = 0; const void *loc_cpu_entry; @@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau counters = alloc_counters(table); if (IS_ERR(counters)) -@@ -856,6 +885,14 @@ copy_entries_to_user(unsigned int total_ +@@ -857,6 +886,14 @@ copy_entries_to_user(unsigned int total_ goto free_counters; } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau for (i = sizeof(struct ipt_entry); i < e->target_offset; i += m->u.match_size) { -@@ -1245,12 +1282,15 @@ compat_copy_entry_to_user(struct ipt_ent +@@ -1246,12 +1283,15 @@ compat_copy_entry_to_user(struct ipt_ent compat_uint_t origsize; const struct xt_entry_match *ematch; int ret = 0; diff --git a/target/linux/generic/pending-4.9/630-packet_socket_type.patch b/target/linux/generic/pending-4.9/630-packet_socket_type.patch index 0bf9339d11..08d730ac31 100644 --- a/target/linux/generic/pending-4.9/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.9/630-packet_socket_type.patch @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3262,6 +3264,7 @@ static int packet_create(struct net *net +@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3875,6 +3878,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3927,6 +3940,13 @@ static int packet_getsockopt(struct sock +@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; 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 4b319bd399..b2c0b48980 100644 --- a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch @@ -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 -@@ -4991,6 +5004,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -4994,6 +5007,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; -@@ -5892,6 +5908,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -5895,6 +5911,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; -@@ -5913,6 +5932,12 @@ static void ata_host_release(struct devi +@@ -5916,6 +5935,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; } -@@ -6359,7 +6384,23 @@ int ata_host_register(struct ata_host *h +@@ -6362,7 +6387,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; } @@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle /* * Define if arch has non-standard setup. This is a _PCI_ standard -@@ -883,6 +886,12 @@ struct ata_port { +@@ -884,6 +887,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/generic/pending-4.9/890-uart_optional_sysrq.patch b/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch index 6cb745ee33..ff0824d343 100644 --- a/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch +++ b/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h -@@ -455,7 +455,7 @@ extern void uart_handle_cts_change(struc +@@ -456,7 +456,7 @@ extern void uart_handle_cts_change(struc extern void uart_insert_char(struct uart_port *port, unsigned int status, unsigned int overrun, unsigned int ch, unsigned int flag); diff --git a/target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch b/target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch deleted file mode 100644 index f5ceecca93..0000000000 --- a/target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch +++ /dev/null @@ -1,49 +0,0 @@ -The gen_stats facility will add a header for the toplevel nlattr of type -TCA_STATS2 that contains all stats added by qdisc callbacks. A reference -to this header is stored in the gnet_dump struct, and when all the -per-qdisc callbacks have finished adding their stats, the length of the -containing header will be adjusted to the right value. - -However, on architectures that need padding (i.e., that don't set -CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS), the padding nlattr is added -before the stats, which means that the stored pointer will point to the -padding, and so when the header is fixed up, the result is just a very -big padding nlattr. Because most qdiscs also supply the legacy TCA_STATS -struct, this problem has been mostly invisible, but we exposed it with -the netlink attribute-based statistics in CAKE. - -Fix the issue by fixing up the stored pointer if it points to a padding -nlattr. - -Tested-by: Pete Heist -Tested-by: Kevin Darbyshire-Bryant -Signed-off-by: Toke Høiland-Jørgensen ---- - net/core/gen_stats.c | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - ---- a/net/core/gen_stats.c -+++ b/net/core/gen_stats.c -@@ -77,8 +77,20 @@ gnet_stats_start_copy_compat(struct sk_b - d->lock = lock; - spin_lock_bh(lock); - } -- if (d->tail) -- return gnet_stats_copy(d, type, NULL, 0, padattr); -+ if (d->tail) { -+ int ret = gnet_stats_copy(d, type, NULL, 0, padattr); -+ -+ /* The initial attribute added in gnet_stats_copy() may be -+ * preceded by a padding attribute, in which case d->tail will -+ * end up pointing at the padding instead of the real attribute. -+ * Fix this so gnet_stats_finish_copy() adjusts the length of -+ * the right attribute. -+ */ -+ if (ret == 0 && d->tail->nla_type == padattr) -+ d->tail = (struct nlattr *)((char *)d->tail + -+ NLA_ALIGN(d->tail->nla_len)); -+ return ret; -+ } - - return 0; - } -- cgit v1.2.3