From: Sasha Levin Date: Sat, 13 Jul 2024 16:34:08 +0000 (-0400) Subject: Fixes for 5.4 X-Git-Tag: v6.1.99~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=270dd15565803e9ca8c9224590621ea0e00337e0;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.4 Signed-off-by: Sasha Levin --- diff --git a/queue-5.4/arm-davinci-convert-comma-to-semicolon.patch b/queue-5.4/arm-davinci-convert-comma-to-semicolon.patch new file mode 100644 index 00000000000..858b581d436 --- /dev/null +++ b/queue-5.4/arm-davinci-convert-comma-to-semicolon.patch @@ -0,0 +1,36 @@ +From 95d33b6e1c2eb93206f1a223f9f42e9d908041b6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 10 Jul 2024 16:16:48 +0800 +Subject: ARM: davinci: Convert comma to semicolon + +From: Chen Ni + +[ Upstream commit acc3815db1a02d654fbc19726ceaadca0d7dd81c ] + +Replace a comma between expression statements by a semicolon. + +Fixes: efc1bb8a6fd5 ("davinci: add power management support") +Signed-off-by: Chen Ni +Acked-by: Bartosz Golaszewski +Signed-off-by: Arnd Bergmann +Signed-off-by: Sasha Levin +--- + arch/arm/mach-davinci/pm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/mach-davinci/pm.c b/arch/arm/mach-davinci/pm.c +index e33c6bcb4598c..bae0a2e07d866 100644 +--- a/arch/arm/mach-davinci/pm.c ++++ b/arch/arm/mach-davinci/pm.c +@@ -62,7 +62,7 @@ static void davinci_pm_suspend(void) + + /* Configure sleep count in deep sleep register */ + val = __raw_readl(pm_config.deepsleep_reg); +- val &= ~DEEPSLEEP_SLEEPCOUNT_MASK, ++ val &= ~DEEPSLEEP_SLEEPCOUNT_MASK; + val |= pm_config.sleepcount; + __raw_writel(val, pm_config.deepsleep_reg); + +-- +2.43.0 + diff --git a/queue-5.4/octeontx2-af-fix-detection-of-ip-layer.patch b/queue-5.4/octeontx2-af-fix-detection-of-ip-layer.patch new file mode 100644 index 00000000000..a6a0e4ad731 --- /dev/null +++ b/queue-5.4/octeontx2-af-fix-detection-of-ip-layer.patch @@ -0,0 +1,50 @@ +From e686f4dad4b3faee95790ecc6d226cc480b2ff4b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 10 Jul 2024 13:21:25 +0530 +Subject: octeontx2-af: fix detection of IP layer + +From: Michal Mazur + +[ Upstream commit 404dc0fd6fb0bb942b18008c6f8c0320b80aca20 ] + +Checksum and length checks are not enabled for IPv4 header with +options and IPv6 with extension headers. +To fix this a change in enum npc_kpu_lc_ltype is required which will +allow adjustment of LTYPE_MASK to detect all types of IP headers. + +Fixes: 21e6699e5cd6 ("octeontx2-af: Add NPC KPU profile") +Signed-off-by: Michal Mazur +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/marvell/octeontx2/af/npc.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/marvell/octeontx2/af/npc.h b/drivers/net/ethernet/marvell/octeontx2/af/npc.h +index 5d4df315a0e19..86d5bda2c0bff 100644 +--- a/drivers/net/ethernet/marvell/octeontx2/af/npc.h ++++ b/drivers/net/ethernet/marvell/octeontx2/af/npc.h +@@ -38,14 +38,18 @@ enum npc_kpu_lb_ltype { + NPC_LT_LB_ITAG, + }; + ++/* Don't modify ltypes up to IP6_EXT, otherwise length and checksum of IP ++ * headers may not be checked correctly. IPv4 ltypes and IPv6 ltypes must ++ * differ only at bit 0 so mask 0xE can be used to detect extended headers. ++ */ + enum npc_kpu_lc_ltype { +- NPC_LT_LC_IP = 1, ++ NPC_LT_LC_PTP = 1, ++ NPC_LT_LC_IP, + NPC_LT_LC_IP6, + NPC_LT_LC_ARP, + NPC_LT_LC_RARP, + NPC_LT_LC_MPLS, + NPC_LT_LC_NSH, +- NPC_LT_LC_PTP, + NPC_LT_LC_FCOE, + }; + +-- +2.43.0 + diff --git a/queue-5.4/s390-mark-psw-in-__load_psw_mask-as-__unitialized.patch b/queue-5.4/s390-mark-psw-in-__load_psw_mask-as-__unitialized.patch new file mode 100644 index 00000000000..2d78120450a --- /dev/null +++ b/queue-5.4/s390-mark-psw-in-__load_psw_mask-as-__unitialized.patch @@ -0,0 +1,47 @@ +From 5ec1e69ebe932d2e2b9ac8456be43ba3d9235981 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 30 Apr 2024 16:30:01 +0200 +Subject: s390: Mark psw in __load_psw_mask() as __unitialized + +From: Sven Schnelle + +[ Upstream commit 7278a8fb8d032dfdc03d9b5d17e0bc451cdc1492 ] + +Without __unitialized, the following code is generated when +INIT_STACK_ALL_ZERO is enabled: + +86: d7 0f f0 a0 f0 a0 xc 160(16,%r15), 160(%r15) +8c: e3 40 f0 a0 00 24 stg %r4, 160(%r15) +92: c0 10 00 00 00 08 larl %r1, 0xa2 +98: e3 10 f0 a8 00 24 stg %r1, 168(%r15) +9e: b2 b2 f0 a0 lpswe 160(%r15) + +The xc is not adding any security because psw is fully initialized +with the following instructions. Add __unitialized to the psw +definitiation to avoid the superfluous clearing of psw. + +Reviewed-by: Heiko Carstens +Signed-off-by: Sven Schnelle +Signed-off-by: Alexander Gordeev +Signed-off-by: Sasha Levin +--- + arch/s390/include/asm/processor.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h +index 48d6ccdef5f77..00bb2d287f740 100644 +--- a/arch/s390/include/asm/processor.h ++++ b/arch/s390/include/asm/processor.h +@@ -256,8 +256,8 @@ static inline void __load_psw(psw_t psw) + */ + static __always_inline void __load_psw_mask(unsigned long mask) + { ++ psw_t psw __uninitialized; + unsigned long addr; +- psw_t psw; + + psw.mask = mask; + +-- +2.43.0 + diff --git a/queue-5.4/series b/queue-5.4/series index 33cbaf1beae..f0ae99c9e25 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -53,3 +53,6 @@ net-lantiq_etop-add-blank-line-after-declaration.patch net-ethernet-lantiq_etop-fix-double-free-in-detach.patch ppp-reject-claimed-as-lcp-but-actually-malformed-pac.patch udp-set-sock_rcu_free-earlier-in-udp_lib_get_port.patch +s390-mark-psw-in-__load_psw_mask-as-__unitialized.patch +arm-davinci-convert-comma-to-semicolon.patch +octeontx2-af-fix-detection-of-ip-layer.patch