Skip to content
Snippets Groups Projects
Commit 88ba4145 authored by Stijn Tintel's avatar Stijn Tintel
Browse files

kernel: bump 4.14 to 4.14.20


Refresh patches.
Remove upstreamed patches:
- backport/080-v4.15-0001-arch-define-weak-abort.patch
- backport/081-v4.15-0002-kernel-exit.c-export-abort-to-modules.patch
Update patch that no longer applies:
pending/493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch

Fixes CVE-2017-8824.

Compile-tested: octeon, x86/64.
Runtime-tested: octeon, x86/64.

Signed-off-by: default avatarStijn Tintel <stijn@linux-ipv6.be>
parent 6c2e1ff8
No related branches found
No related tags found
No related merge requests found
Showing
with 41 additions and 168 deletions
......@@ -5,12 +5,12 @@ LINUX_RELEASE?=1
LINUX_VERSION-3.18 = .71
LINUX_VERSION-4.4 = .112
LINUX_VERSION-4.9 = .77
LINUX_VERSION-4.14 = .18
LINUX_VERSION-4.14 = .20
LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
LINUX_KERNEL_HASH-4.4.112 = 544b42cbeed022896115c76a18fc97b4507d5b41d7ac0ce1dce9afd6ffd11ecd
LINUX_KERNEL_HASH-4.9.77 = 7c29bc3fb96f1e23d98f664e786dddd53a1599f56431b9b7fdfba402a4b3705c
LINUX_KERNEL_HASH-4.14.18 = 866a94c1c38d923ae18e74b683d7a8a79b674ebdfe7f40f1a3be9a27d39fe354
LINUX_KERNEL_HASH-4.14.20 = 4ab7f42aa6af9c1e3b00cba6b1fa305a87407666aaa2fae555f7fbdaafb6d292
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
......
......@@ -20,7 +20,7 @@ Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -49,7 +49,7 @@
@@ -46,7 +46,7 @@
#define STMMAC_GET_ENTRY(x, size) ((x + 1) & (size - 1))
#undef FRAME_FILTER_DEBUG
......
......@@ -55,7 +55,7 @@ Cc: Kir Kolyshkin <kir@openvz.org>
rwlock_t sk_callback_lock;
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2744,6 +2744,7 @@ void sock_init_data(struct socket *sock,
@@ -2741,6 +2741,7 @@ void sock_init_data(struct socket *sock,
sk->sk_max_pacing_rate = ~0U;
sk->sk_pacing_rate = ~0U;
......
From 7c2c11b208be09c156573fc0076b7b3646e05219 Mon Sep 17 00:00:00 2001
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Date: Thu, 14 Dec 2017 15:33:19 -0800
Subject: [PATCH] arch: define weak abort()
gcc toggle -fisolate-erroneous-paths-dereference (default at -O2
onwards) isolates faulty code paths such as null pointer access, divide
by zero etc. If gcc port doesnt implement __builtin_trap, an abort() is
generated which causes kernel link error.
In this case, gcc is generating abort due to 'divide by zero' in
lib/mpi/mpih-div.c.
Currently 'frv' and 'arc' are failing. Previously other arch was also
broken like m32r was fixed by commit d22e3d69ee1a ("m32r: fix build
failure").
Let's define this weak function which is common for all arch and fix the
problem permanently. We can even remove the arch specific 'abort' after
this is done.
Link: http://lkml.kernel.org/r/1513118956-8718-1-git-send-email-sudipm.mukherjee@gmail.com
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
kernel/exit.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1755,3 +1755,11 @@ Efault:
return -EFAULT;
}
#endif
+
+__weak void abort(void)
+{
+ BUG();
+
+ /* if that doesn't kill us, halt */
+ panic("Oops failed to kill thread");
+}
From dc8635b78cd8669c37e230058d18c33af7451ab1 Mon Sep 17 00:00:00 2001
From: Andrew Morton <akpm@linux-foundation.org>
Date: Thu, 4 Jan 2018 16:17:56 -0800
Subject: [PATCH] kernel/exit.c: export abort() to modules
gcc -fisolate-erroneous-paths-dereference can generate calls to abort()
from modular code too.
[arnd@arndb.de: drop duplicate exports of abort()]
Link: http://lkml.kernel.org/r/20180102103311.706364-1-arnd@arndb.de
Reported-by: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
arch/arm/kernel/traps.c | 1 -
arch/m32r/kernel/traps.c | 1 -
arch/unicore32/kernel/traps.c | 1 -
kernel/exit.c | 1 +
4 files changed, 1 insertion(+), 3 deletions(-)
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -790,7 +790,6 @@ void abort(void)
/* if that doesn't kill us, halt */
panic("Oops failed to kill thread");
}
-EXPORT_SYMBOL(abort);
void __init trap_init(void)
{
--- a/arch/m32r/kernel/traps.c
+++ b/arch/m32r/kernel/traps.c
@@ -122,7 +122,6 @@ void abort(void)
/* if that doesn't kill us, halt */
panic("Oops failed to kill thread");
}
-EXPORT_SYMBOL(abort);
void __init trap_init(void)
{
--- a/arch/unicore32/kernel/traps.c
+++ b/arch/unicore32/kernel/traps.c
@@ -298,7 +298,6 @@ void abort(void)
/* if that doesn't kill us, halt */
panic("Oops failed to kill thread");
}
-EXPORT_SYMBOL(abort);
void __init trap_init(void)
{
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1763,3 +1763,4 @@ __weak void abort(void)
/* if that doesn't kill us, halt */
panic("Oops failed to kill thread");
}
+EXPORT_SYMBOL(abort);
......@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/Makefile
+++ b/Makefile
@@ -1212,7 +1212,6 @@ all: modules
@@ -1213,7 +1213,6 @@ all: modules
PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
......@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -1241,7 +1240,6 @@ _modinst_:
@@ -1242,7 +1241,6 @@ _modinst_:
rm -f $(MODLIB)/build ; \
ln -s $(CURDIR) $(MODLIB)/build ; \
fi
......
......@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
# 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)
@@ -784,11 +789,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
@@ -785,11 +790,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
endif
......
......@@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3383,6 +3383,8 @@ static __net_initdata struct pernet_oper
@@ -3380,6 +3380,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{
......
......@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/Makefile
+++ b/Makefile
@@ -638,12 +638,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
@@ -639,12 +639,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
......
......@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/mtd/ubi/block.c
+++ b/drivers/mtd/ubi/block.c
@@ -625,6 +625,44 @@ static void __init ubiblock_create_from_
@@ -633,6 +633,44 @@ static void __init ubiblock_create_from_
}
}
......@@ -53,7 +53,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
static void ubiblock_remove_all(void)
{
struct ubiblock *next;
@@ -655,6 +693,10 @@ int __init ubiblock_init(void)
@@ -665,6 +703,10 @@ int __init ubiblock_init(void)
*/
ubiblock_create_from_param();
......
......@@ -17,9 +17,9 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
#include "ubi-media.h"
#include "ubi.h"
@@ -445,6 +446,15 @@ int ubiblock_create(struct ubi_volume_in
add_disk(dev->gd);
dev_info(disk_to_dev(dev->gd), "created from ubi%d:%d(%s)",
dev->ubi_num, dev->vol_id, vi->name);
mutex_unlock(&devices_mutex);
+
+ if (!strcmp(vi->name, "rootfs") &&
+ IS_ENABLED(CONFIG_MTD_ROOTFS_ROOT_DEV) &&
......
......@@ -14,10 +14,8 @@ Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/clk/mediatek/clk-mt2701.c | 4 ++++
1 file changed, 4 insertions(+)
Index: linux-4.14.11/drivers/clk/mediatek/clk-mt2701.c
===================================================================
--- linux-4.14.11.orig/drivers/clk/mediatek/clk-mt2701.c
+++ linux-4.14.11/drivers/clk/mediatek/clk-mt2701.c
--- a/drivers/clk/mediatek/clk-mt2701.c
+++ b/drivers/clk/mediatek/clk-mt2701.c
@@ -771,6 +771,8 @@ static void mtk_infrasys_init_early(stru
if (r)
pr_err("%s(): could not register clock provider: %d\n",
......
......@@ -16,10 +16,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 35 +++++++++++++++++------------
1 file changed, 21 insertions(+), 14 deletions(-)
Index: linux-4.14.11/drivers/net/ethernet/mediatek/mtk_eth_soc.c
===================================================================
--- linux-4.14.11.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ linux-4.14.11/drivers/net/ethernet/mediatek/mtk_eth_soc.c
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -779,7 +779,16 @@ static int mtk_tx_map(struct sk_buff *sk
WRITE_ONCE(itxd->txd3, (TX_DMA_SWC | TX_DMA_PLEN0(skb_headlen(skb)) |
(!nr_frags * TX_DMA_LS0)));
......
......@@ -10,10 +10,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +++
2 files changed, 8 insertions(+)
Index: linux-4.14.11/drivers/net/dsa/mt7530.c
===================================================================
--- linux-4.14.11.orig/drivers/net/dsa/mt7530.c
+++ linux-4.14.11/drivers/net/dsa/mt7530.c
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -991,6 +991,11 @@ mt7530_setup(struct dsa_switch *ds)
val = mt7530_read(priv, MT7530_MHWTRAP);
val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS;
......
Index: linux-4.14.14/drivers/net/dsa/mt7530.c
===================================================================
--- linux-4.14.14.orig/drivers/net/dsa/mt7530.c
+++ linux-4.14.14/drivers/net/dsa/mt7530.c
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -670,6 +670,9 @@ static int
mt7530_cpu_port_enable(struct mt7530_priv *priv,
int port)
......@@ -98,10 +96,8 @@ Index: linux-4.14.14/drivers/net/dsa/mt7530.c
val |= MHWTRAP_MANUAL;
if (!dsa_is_cpu_port(ds, 5)) {
val |= MHWTRAP_P5_DIS;
Index: linux-4.14.14/include/net/dsa.h
===================================================================
--- linux-4.14.14.orig/include/net/dsa.h
+++ linux-4.14.14/include/net/dsa.h
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -185,6 +185,10 @@ struct dsa_port {
u8 stp_state;
struct net_device *bridge_dev;
......@@ -144,10 +140,8 @@ Index: linux-4.14.14/include/net/dsa.h
typedef int dsa_fdb_dump_cb_t(const unsigned char *addr, u16 vid,
bool is_static, void *data);
struct dsa_switch_ops {
Index: linux-4.14.14/net/dsa/dsa2.c
===================================================================
--- linux-4.14.14.orig/net/dsa/dsa2.c
+++ linux-4.14.14/net/dsa/dsa2.c
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -253,6 +253,8 @@ static int dsa_cpu_port_apply(struct dsa
memset(&port->devlink_port, 0, sizeof(port->devlink_port));
err = devlink_port_register(ds->devlink, &port->devlink_port,
......@@ -232,10 +226,8 @@ Index: linux-4.14.14/net/dsa/dsa2.c
/* Initialize enabled_port_mask now for drv->setup()
* to have access to a correct value, just like what
* net/dsa/dsa.c::dsa_switch_setup_one does.
Index: linux-4.14.14/net/dsa/dsa_priv.h
===================================================================
--- linux-4.14.14.orig/net/dsa/dsa_priv.h
+++ linux-4.14.14/net/dsa/dsa_priv.h
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -91,6 +91,8 @@ struct dsa_slave_priv {
/* TC context */
......@@ -255,10 +247,8 @@ Index: linux-4.14.14/net/dsa/dsa_priv.h
return p->dp->cpu_dp->netdev;
}
Index: linux-4.14.14/net/dsa/slave.c
===================================================================
--- linux-4.14.14.orig/net/dsa/slave.c
+++ linux-4.14.14/net/dsa/slave.c
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1257,7 +1257,7 @@ int dsa_slave_create(struct dsa_port *po
int ret;
......
......@@ -11,7 +11,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -643,8 +643,8 @@ static int mtk_tx_map(struct sk_buff *sk
@@ -709,8 +709,8 @@ static int mtk_tx_map(struct sk_buff *sk
txd4 |= TX_DMA_CHKSUM;
/* VLAN header offload */
......@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
mapped_addr = dma_map_single(eth->dev, skb->data,
skb_headlen(skb), DMA_TO_DEVICE);
@@ -1874,7 +1874,10 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -1979,7 +1979,10 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
/* Enable RX VLan Offloading */
......@@ -32,8 +32,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
+ else
+ mtk_w32(eth, 0, MTK_CDMP_EG_CTRL);
/* disable delay and normal interrupt */
mtk_w32(eth, 0, MTK_QDMA_DELAY_INT);
/* enable interrupt delay for RX */
mtk_w32(eth, MTK_PDMA_DELAY_RX_DELAY, MTK_PDMA_DELAY_INT);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -34,8 +34,6 @@
......
......@@ -17,7 +17,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -933,10 +933,16 @@ static int mtk_poll_rx(struct napi_struc
@@ -999,10 +999,16 @@ static int mtk_poll_rx(struct napi_struc
if (!(trxd.rxd2 & RX_DMA_DONE))
break;
......@@ -36,11 +36,11 @@ Signed-off-by: John Crispin <john@phrozen.org>
+ mac--;
+ }
netdev = eth->netdev[mac];
if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
!eth->netdev[mac]))
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -284,6 +284,7 @@
@@ -287,6 +287,7 @@
/* QDMA descriptor rxd4 */
#define RX_DMA_L4_VALID BIT(24)
......
......@@ -17,7 +17,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1894,6 +1894,8 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -1983,6 +1983,8 @@ static int mtk_hw_init(struct mtk_eth *e
*/
val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
......@@ -28,7 +28,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
if (MTK_HW_FEATURES & NETIF_F_HW_VLAN_CTAG_RX)
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -76,6 +76,10 @@
@@ -72,6 +72,10 @@
#define MTK_CDMQ_IG_CTRL 0x1400
#define MTK_CDMQ_STAG_EN BIT(0)
......
......@@ -16,7 +16,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -742,6 +742,11 @@ mt7530_cpu_port_enable(struct mt7530_pri
@@ -677,6 +677,11 @@ mt7530_cpu_port_enable(struct mt7530_pri
mt7530_write(priv, MT7530_PVC_P(port),
PORT_SPEC_TAG);
......
......@@ -8,10 +8,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
drivers/net/dsa/mt7530.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
Index: linux-4.14.12/drivers/net/dsa/mt7530.c
===================================================================
--- linux-4.14.12.orig/drivers/net/dsa/mt7530.c
+++ linux-4.14.12/drivers/net/dsa/mt7530.c
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1049,10 +1049,10 @@ static const struct dsa_switch_ops mt753
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment