Skip to content

Commit

Permalink
kernel: bump 4.9 to 4.9.212 (coolsnowwolf#2964)
Browse files Browse the repository at this point in the history
* kernel: bump 4.9 to 4.9.212

Refreshed all patches.

Fixes:
- CVE-2019-14896
- CVE-2019-14897

Compile-tested on: x86_64
Runtime-tested on: none

Signed-off-by: CN_SZTL <[email protected]>

* kernel4.9: remove patches for layerscape
  • Loading branch information
1715173329 authored Feb 13, 2020
1 parent cb90c7f commit 0625c87
Show file tree
Hide file tree
Showing 43 changed files with 386 additions and 218 deletions.
6 changes: 3 additions & 3 deletions include/kernel-version.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ ifdef CONFIG_TESTING_KERNEL
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif

LINUX_VERSION-4.9 = .208
LINUX_VERSION-4.9 = .212
LINUX_VERSION-4.14 = .169
LINUX_VERSION-4.19 = .101

LINUX_KERNEL_HASH-4.9.208 = b7ad1c9841d671d026c55a4c91c77205f8b488ca5f980f838591c68662e0525a
LINUX_KERNEL_HASH-4.9.212 = ade738a606c9b52ecf764e94b4e77116caa3a2b8abd30f4534d220ac6894be30
LINUX_KERNEL_HASH-4.14.169 = d88ea97993c56b1fa0b0a05061bcde476c6be4fc3bb2de8bd97a8f8ff7278249
LINUX_KERNEL_HASH-4.19.101 = be26156abdb38ac0576a34a235ef456bb8ca67fbbe56fc6649b8d069159f8bc4

Expand Down Expand Up @@ -40,4 +40,4 @@ KERNEL_PATCHVER ?= $(KERNEL)

# disable the md5sum check for unknown kernel versions
LINUX_KERNEL_HASH:=$(LINUX_KERNEL_HASH-$(strip $(LINUX_VERSION)))
LINUX_KERNEL_HASH?=x
LINUX_KERNEL_HASH?=x
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -120,6 +120,7 @@ obj-$(CONFIG_XZ_DEC) += xz/
@@ -122,6 +122,7 @@ obj-$(CONFIG_XZ_DEC) += xz/
obj-$(CONFIG_RAID6_PQ) += raid6/
obj-$(CONFIG_LZMA_COMPRESS) += lzma/
obj-$(CONFIG_LZMA_DECOMPRESS) += lzma/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@

/* Atmel chips don't use the same PRI format as AMD chips */
static void fixup_convert_atmel_pri(struct mtd_info *mtd)
@@ -1790,6 +1794,7 @@ static int cfi_amdstd_write_words(struct
@@ -1796,6 +1800,7 @@ static int cfi_amdstd_write_words(struct
/*
* FIXME: interleaved mode not tested, and probably not supported!
*/
+#if !FORCE_WORD_WRITE
static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
unsigned long adr, const u_char *buf,
int len)
@@ -1918,7 +1923,6 @@ static int __xipram do_write_buffer(stru
@@ -1924,7 +1929,6 @@ static int __xipram do_write_buffer(stru
return ret;
}

-
static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{
@@ -1993,6 +1997,7 @@ static int cfi_amdstd_write_buffers(stru
@@ -1999,6 +2003,7 @@ static int cfi_amdstd_write_buffers(stru

return 0;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1213,4 +1213,12 @@ config GPIO_VIPERBOARD
@@ -1214,4 +1214,12 @@ config GPIO_VIPERBOARD

endmenu

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
+#endif
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1154,7 +1154,6 @@ menu "SPI GPIO expanders"
@@ -1155,7 +1155,6 @@ menu "SPI GPIO expanders"

config GPIO_74X164
tristate "74x164 serial-in/parallel-out 8-bits shift register"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1220,4 +1220,9 @@ config GPIO_NXP_74HC153
@@ -1221,4 +1221,9 @@ config GPIO_NXP_74HC153
Platform driver for NXP 74HC153 Dual 4-input Multiplexer. This
provides a GPIO interface supporting input mode only.

Expand Down
2 changes: 1 addition & 1 deletion target/linux/ar71xx/patches-4.9/500-MIPS-fw-myloader.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1153,6 +1153,9 @@ config MIPS_MSC
@@ -1152,6 +1152,9 @@ config MIPS_MSC
config MIPS_NILE4
bool

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
#define AR71XX_GPIO_COUNT 16
#define AR7240_GPIO_COUNT 18
#define AR7241_GPIO_COUNT 20
@@ -570,4 +681,237 @@
@@ -570,4 +681,235 @@
#define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13
#define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7

Expand Down Expand Up @@ -433,8 +433,6 @@
+#define QCA955X_GMAC_REG_ETH_CFG 0x00
+
+#define QCA955X_ETH_CFG_RGMII_EN BIT(0)
+#define QCA955X_ETH_CFG_GE0_MII_EN BIT(1)
+#define QCA955X_ETH_CFG_GE0_MII_SLAVE BIT(4)
+#define QCA955X_ETH_CFG_MII_GE0 BIT(1)
+#define QCA955X_ETH_CFG_GMII_GE0 BIT(2)
+#define QCA955X_ETH_CFG_MII_GE0_MASTER BIT(3)
Expand Down
2 changes: 1 addition & 1 deletion target/linux/ar71xx/patches-4.9/604-MIPS-ath79-no-of.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -196,7 +196,6 @@ config ATH79
@@ -197,7 +197,6 @@ config ATH79
select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_MIPS16
select SYS_SUPPORTS_ZBOOT_UART_PROM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
return;
--- a/arch/mips/ath79/irq.c
+++ b/arch/mips/ath79/irq.c
@@ -56,6 +56,34 @@ static void ar934x_ip2_irq_init(void)
@@ -62,6 +62,34 @@ static void ar934x_ip2_irq_init(void)
irq_set_chained_handler(ATH79_CPU_IRQ(2), ar934x_ip2_irq_dispatch);
}

Expand Down Expand Up @@ -342,7 +342,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
static void qca955x_ip2_irq_dispatch(struct irq_desc *desc)
{
u32 status;
@@ -143,7 +171,7 @@ void __init arch_init_irq(void)
@@ -149,7 +177,7 @@ void __init arch_init_irq(void)
soc_is_ar913x() || soc_is_ar933x()) {
irq_wb_chan2 = 3;
irq_wb_chan3 = 2;
Expand All @@ -351,15 +351,15 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
irq_wb_chan3 = 2;
}

@@ -154,6 +182,7 @@ void __init arch_init_irq(void)
@@ -160,6 +188,7 @@ void __init arch_init_irq(void)
else if (soc_is_ar724x() ||
soc_is_ar933x() ||
soc_is_ar934x() ||
+ soc_is_qca953x() ||
soc_is_qca955x())
misc_is_ar71xx = false;
else
@@ -164,6 +193,8 @@ void __init arch_init_irq(void)
@@ -170,6 +199,8 @@ void __init arch_init_irq(void)

if (soc_is_ar934x())
ar934x_ip2_irq_init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
return;
--- a/arch/mips/ath79/irq.c
+++ b/arch/mips/ath79/irq.c
@@ -156,6 +156,87 @@ static void qca955x_irq_init(void)
@@ -162,6 +162,87 @@ static void qca955x_irq_init(void)
irq_set_chained_handler(ATH79_CPU_IRQ(3), qca955x_ip3_irq_dispatch);
}

Expand Down Expand Up @@ -379,7 +379,7 @@
void __init arch_init_irq(void)
{
unsigned irq_wb_chan2 = -1;
@@ -183,7 +264,9 @@ void __init arch_init_irq(void)
@@ -189,7 +270,9 @@ void __init arch_init_irq(void)
soc_is_ar933x() ||
soc_is_ar934x() ||
soc_is_qca953x() ||
Expand All @@ -390,7 +390,7 @@
misc_is_ar71xx = false;
else
BUG();
@@ -197,4 +280,6 @@ void __init arch_init_irq(void)
@@ -203,4 +286,6 @@ void __init arch_init_irq(void)
qca953x_irq_init();
else if (soc_is_qca955x())
qca955x_irq_init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
static void ar934x_ip2_irq_dispatch(struct irq_desc *desc)
{
u32 status;
@@ -50,8 +53,7 @@ static void ar934x_ip2_irq_init(void)
@@ -56,8 +59,7 @@ static void ar934x_ip2_irq_init(void)

for (i = ATH79_IP2_IRQ_BASE;
i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
Expand All @@ -20,7 +20,7 @@

irq_set_chained_handler(ATH79_CPU_IRQ(2), ar934x_ip2_irq_dispatch);
}
@@ -79,7 +81,7 @@ static void qca953x_irq_init(void)
@@ -85,7 +87,7 @@ static void qca953x_irq_init(void)

for (i = ATH79_IP2_IRQ_BASE;
i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
Expand All @@ -29,7 +29,7 @@

irq_set_chained_handler(ATH79_CPU_IRQ(2), qca953x_ip2_irq_dispatch);
}
@@ -143,15 +145,13 @@ static void qca955x_irq_init(void)
@@ -149,15 +151,13 @@ static void qca955x_irq_init(void)

for (i = ATH79_IP2_IRQ_BASE;
i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
Expand All @@ -47,7 +47,7 @@

irq_set_chained_handler(ATH79_CPU_IRQ(3), qca955x_ip3_irq_dispatch);
}
@@ -222,13 +222,13 @@ static void qca956x_irq_init(void)
@@ -228,13 +228,13 @@ static void qca956x_irq_init(void)

for (i = ATH79_IP2_IRQ_BASE;
i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
Expand All @@ -63,7 +63,7 @@

irq_set_chained_handler(ATH79_CPU_IRQ(3), qca956x_ip3_irq_dispatch);

@@ -237,12 +237,40 @@ static void qca956x_irq_init(void)
@@ -243,12 +243,40 @@ static void qca956x_irq_init(void)
late_time_init = &qca956x_enable_timer_cb;
}

Expand Down
10 changes: 5 additions & 5 deletions target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@
memcpy(p, foc->val, foc->len);
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -537,7 +537,7 @@ static struct sk_buff *add_grec(struct s
@@ -548,7 +548,7 @@ static struct sk_buff *add_grec(struct s
if (!skb)
return NULL;
psrc = (__be32 *)skb_put(skb, sizeof(__be32));
Expand Down Expand Up @@ -652,7 +652,7 @@
return false;

return true;
@@ -633,13 +637,13 @@ static inline void ipv6_addr_set_v4mappe
@@ -604,13 +608,13 @@ static inline void ipv6_addr_set_v4mappe
*/
static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
{
Expand All @@ -668,7 +668,7 @@
if (xb)
return i * 32 + 31 - __fls(ntohl(xb));
}
@@ -808,17 +812,18 @@ static inline int ip6_default_np_autolab
@@ -779,17 +783,18 @@ static inline int ip6_default_np_autolab
static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
__be32 flowlabel)
{
Expand Down Expand Up @@ -795,7 +795,7 @@

--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3910,14 +3910,16 @@ static bool tcp_parse_aligned_timestamp(
@@ -3934,14 +3934,16 @@ static bool tcp_parse_aligned_timestamp(
{
const __be32 *ptr = (const __be32 *)(th + 1);

Expand Down Expand Up @@ -888,7 +888,7 @@
*sum = csum_fold(csum_partial(diff, sizeof(diff),
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1789,15 +1789,15 @@ static int vxlan_build_skb(struct sk_buf
@@ -1800,15 +1800,15 @@ static int vxlan_build_skb(struct sk_buf
goto out_free;

vxh = (struct vxlanhdr *) __skb_push(skb, sizeof(*vxh));
Expand Down
2 changes: 1 addition & 1 deletion target/linux/ar71xx/patches-4.9/930-chipidea-pullup.patch
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
ret = hw_device_init(ci, base);
if (ret < 0) {
dev_err(dev, "can't initialize hardware\n");
@@ -963,7 +966,7 @@ static int ci_hdrc_probe(struct platform
@@ -970,7 +973,7 @@ static int ci_hdrc_probe(struct platform
goto deinit_gadget;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
--- a/arch/mips/ath79/irq.c
+++ b/arch/mips/ath79/irq.c
@@ -69,15 +69,21 @@ static void qca953x_ip2_irq_dispatch(str
u32 status;

status = ath79_reset_rr(QCA953X_RESET_REG_PCIE_WMAC_INT_STATUS);
+ status &= QCA953X_PCIE_WMAC_INT_PCIE_ALL | QCA953X_PCIE_WMAC_INT_WMAC_ALL;
+
+ if (status == 0) {
+ spurious_interrupt();
+ return;
+ }

if (status & QCA953X_PCIE_WMAC_INT_PCIE_ALL) {
ath79_ddr_wb_flush(3);
generic_handle_irq(ATH79_IP2_IRQ(0));
- } else if (status & QCA953X_PCIE_WMAC_INT_WMAC_ALL) {
+ }
+
+ if (status & QCA953X_PCIE_WMAC_INT_WMAC_ALL) {
ath79_ddr_wb_flush(4);
generic_handle_irq(ATH79_IP2_IRQ(1));
- } else {
- spurious_interrupt();
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <[email protected]>
int eth_gro_complete(struct sk_buff *skb, int nhoff);
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -391,6 +391,34 @@ struct net_device *alloc_etherdev_mqs(in
@@ -396,6 +396,34 @@ struct net_device *alloc_etherdev_mqs(in
}
EXPORT_SYMBOL(alloc_etherdev_mqs);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Signed-off-by: David S. Miller <[email protected]>
if (tcp_small_queue_check(sk, skb, 0))
break;

@@ -3561,8 +3561,6 @@ void __tcp_send_ack(struct sock *sk, u32
@@ -3569,8 +3569,6 @@ void __tcp_send_ack(struct sock *sk, u32
/* We do not want pure acks influencing TCP Small Queues or fq/pacing
* too much.
* SKB_TRUESIZE(max(1 .. 66, MAX_TCP_HEADER)) is unfortunately ~784
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ Signed-off-by: David S. Miller <[email protected]>
dma_intr_ena = smsc9420_reg_read(pd, DMAC_INTR_ENA);
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2700,7 +2700,7 @@ static int stmmac_poll(struct napi_struc
@@ -2702,7 +2702,7 @@ static int stmmac_poll(struct napi_struc

work_done = stmmac_rx(priv, budget);
if (work_done < budget) {
Expand Down
24 changes: 24 additions & 0 deletions target/linux/generic/hack-4.9/202-reduce_module_size.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From fd66884da2f96d2a7ea73f58b1b86251b959a913 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <[email protected]>
Date: Fri, 7 Jul 2017 16:56:19 +0200
Subject: kernel: strip unnecessary symbol table information from kernel modules

reduces default squashfs size on ar71xx by about 4k

lede-commit: 058d331a39077f159ca8922f1f422a1346d6aa67
Signed-off-by: Felix Fietkau <[email protected]>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/Makefile
+++ b/Makefile
@@ -398,7 +398,7 @@ KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
KBUILD_AFLAGS_MODULE := -DMODULE
KBUILD_CFLAGS_MODULE := -DMODULE
-KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
+KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
GCC_PLUGINS_CFLAGS :=
CLANG_FLAGS :=

2 changes: 1 addition & 1 deletion target/linux/generic/hack-4.9/220-gc_sections.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Signed-off-by: Gabor Juhos <[email protected]>

--- a/Makefile
+++ b/Makefile
@@ -402,6 +402,11 @@ KBUILD_LDFLAGS_MODULE := -T $(srctree)/s
@@ -402,6 +402,11 @@ KBUILD_LDFLAGS_MODULE = -T $(srctree)/sc
GCC_PLUGINS_CFLAGS :=
CLANG_FLAGS :=

Expand Down
Loading

0 comments on commit 0625c87

Please sign in to comment.