kernel: bump 5.4 to 5.4.188

Added the new configuration options:
CONFIG_HARDEN_BRANCH_HISTORY=y
CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y

Manually adapted:
target/linux/generic/hack-5.4/220-gc_sections.patch

Compile-tested: lantiq/xrx200, armvirt/64
Run-tested: lantiq/xrx200, armvirt/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Hauke Mehrtens
2022-04-06 00:46:27 +02:00
parent 3008f1f441
commit 39bf2aee0e
15 changed files with 49 additions and 54 deletions

View File

@@ -22,11 +22,9 @@ Signed-off-by: Marek Behún <kabel@kernel.org>
net/dsa/switch.c | 31 ++++++++++++++++++++++---------
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index 6a9607518823..dd71e3301b27 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -65,19 +65,12 @@ static int dsa_switch_bridge_join(struct dsa_switch *ds,
@@ -65,19 +65,12 @@ static int dsa_switch_bridge_join(struct
return 0;
}
@@ -48,7 +46,7 @@ index 6a9607518823..dd71e3301b27 100644
/* If the bridge was vlan_filtering, the bridge core doesn't trigger an
* event for changing vlan_filtering setting upon slave ports leaving
* it. That is a good thing, because that lets us handle it and also
@@ -103,6 +96,26 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
@@ -103,6 +96,26 @@ static int dsa_switch_bridge_leave(struc
if (err && err != EOPNOTSUPP)
return err;
}
@@ -75,6 +73,3 @@ index 6a9607518823..dd71e3301b27 100644
return 0;
}
--
2.34.1

View File

@@ -39,11 +39,9 @@ Signed-off-by: Marek Behún <kabel@kernel.org>
net/dsa/switch.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index dd71e3301b27..f517d6d7efa2 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -112,9 +112,11 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
@@ -112,9 +112,11 @@ static int dsa_switch_bridge_leave(struc
ds->ops->crosschip_bridge_leave(ds, info->sw_index, info->port,
info->br);
@@ -58,6 +56,3 @@ index dd71e3301b27..f517d6d7efa2 100644
return 0;
}
--
2.34.1

View File

@@ -1872,6 +1872,7 @@ CONFIG_GPIO_SYSFS=y
CONFIG_HARDENED_USERCOPY=y
# CONFIG_HARDENED_USERCOPY_FALLBACK is not set
# CONFIG_HARDENED_USERCOPY_PAGESPAN is not set
CONFIG_HARDEN_BRANCH_HISTORY=y
CONFIG_HARDEN_EL2_VECTORS=y
# CONFIG_HARDLOCKUP_DETECTOR is not set
# CONFIG_HAVE_AOUT is not set
@@ -3056,6 +3057,7 @@ CONFIG_MISC_FILESYSTEMS=y
# CONFIG_MISDN_NETJET is not set
# CONFIG_MISDN_SPEEDFAX is not set
# CONFIG_MISDN_W6692 is not set
CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y
# CONFIG_MKISS is not set
# CONFIG_MLX4_CORE is not set
# CONFIG_MLX4_EN is not set

View File

@@ -72,7 +72,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/arch/arm/kernel/vmlinux.lds.h
+++ b/arch/arm/kernel/vmlinux.lds.h
@@ -22,13 +22,13 @@
@@ -22,7 +22,7 @@
#define ARM_MMU_DISCARD(x)
#else
#define ARM_MMU_KEEP(x)
@@ -80,6 +80,8 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+#define ARM_MMU_DISCARD(x) KEEP(x)
#endif
/*
@@ -41,7 +41,7 @@
#define PROC_INFO \
. = ALIGN(4); \
__proc_info_begin = .; \
@@ -88,7 +90,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
__proc_info_end = .;
#define HYPERVISOR_TEXT \
@@ -39,11 +39,11 @@
@@ -52,11 +52,11 @@
#define IDMAP_TEXT \
ALIGN_FUNCTION(); \
__idmap_text_start = .; \
@@ -102,7 +104,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
__hyp_idmap_text_end = .;
#define ARM_DISCARD \
@@ -86,12 +86,12 @@
@@ -99,12 +99,12 @@
. = ALIGN(8); \
.ARM.unwind_idx : { \
__start_unwind_idx = .; \
@@ -117,20 +119,21 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
__stop_unwind_tab = .; \
}
@@ -102,14 +102,14 @@
#define ARM_VECTORS \
__vectors_start = .; \
.vectors 0xffff0000 : AT(__vectors_start) { \
- *(.vectors) \
+ KEEP(*(.vectors)) \
} \
. = __vectors_start + SIZEOF(.vectors); \
__vectors_end = .; \
@@ -116,7 +116,7 @@
__vectors_lma = .; \
OVERLAY 0xffff0000 : NOCROSSREFS AT(__vectors_lma) { \
.vectors { \
- *(.vectors) \
+ KEEP(*(.vectors)) \
} \
.vectors.bhb.loop8 { \
*(.vectors.bhb.loop8) \
@@ -134,7 +134,7 @@
\
__stubs_start = .; \
.stubs ADDR(.vectors) + 0x1000 : AT(__stubs_start) { \
__stubs_lma = .; \
.stubs ADDR(.vectors) + 0x1000 : AT(__stubs_lma) { \
- *(.stubs) \
+ KEEP(*(.stubs)) \
} \
. = __stubs_start + SIZEOF(.stubs); \
__stubs_end = .; \
ARM_LMA(__stubs, .stubs); \
. = __stubs_lma + SIZEOF(.stubs); \

View File

@@ -92,7 +92,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
bool
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -402,16 +402,16 @@ config BCH_CONST_T
@@ -401,16 +401,16 @@ config BCH_CONST_T
# Textsearch support is select'ed if needed
#
config TEXTSEARCH

View File

@@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3643,6 +3643,8 @@ static __net_initdata struct pernet_oper
@@ -3641,6 +3641,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{

View File

@@ -1087,7 +1087,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
#define JFFS2_NODE_ACCURATE 0x2000
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -303,6 +303,12 @@ config ZSTD_DECOMPRESS
@@ -302,6 +302,12 @@ config ZSTD_DECOMPRESS
source "lib/xz/Kconfig"

View File

@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
@@ -3293,6 +3295,7 @@ static int packet_create(struct net *net
@@ -3296,6 +3298,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 <nbd@nbd.name>
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
@@ -3930,6 +3933,16 @@ packet_setsockopt(struct socket *sock, i
@@ -3939,6 +3942,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 <nbd@nbd.name>
default:
return -ENOPROTOOPT;
}
@@ -3986,6 +3999,13 @@ static int packet_getsockopt(struct sock
@@ -3995,6 +4008,13 @@ static int packet_getsockopt(struct sock
case PACKET_VNET_HDR:
val = po->has_vnet_hdr;
break;