]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.19
authorSasha Levin <sashal@kernel.org>
Sat, 13 Jul 2024 16:34:08 +0000 (12:34 -0400)
committerSasha Levin <sashal@kernel.org>
Sat, 13 Jul 2024 16:34:08 +0000 (12:34 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.19/arm-davinci-convert-comma-to-semicolon.patch [new file with mode: 0644]
queue-4.19/s390-mark-psw-in-__load_psw_mask-as-__unitialized.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/arm-davinci-convert-comma-to-semicolon.patch b/queue-4.19/arm-davinci-convert-comma-to-semicolon.patch
new file mode 100644 (file)
index 0000000..d45e059
--- /dev/null
@@ -0,0 +1,36 @@
+From 1a4e9904a92366553e9626621045542e5ed375f9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 10 Jul 2024 16:16:48 +0800
+Subject: ARM: davinci: Convert comma to semicolon
+
+From: Chen Ni <nichen@iscas.ac.cn>
+
+[ Upstream commit acc3815db1a02d654fbc19726ceaadca0d7dd81c ]
+
+Replace a comma between expression statements by a semicolon.
+
+Fixes: efc1bb8a6fd5 ("davinci: add power management support")
+Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
+Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 b5cc05dc2cb27..ef078ce01db74 100644
+--- a/arch/arm/mach-davinci/pm.c
++++ b/arch/arm/mach-davinci/pm.c
+@@ -65,7 +65,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-4.19/s390-mark-psw-in-__load_psw_mask-as-__unitialized.patch b/queue-4.19/s390-mark-psw-in-__load_psw_mask-as-__unitialized.patch
new file mode 100644 (file)
index 0000000..5745dad
--- /dev/null
@@ -0,0 +1,47 @@
+From ebae77ad122f2785aa21f9f30af4989b7d5a96d9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 30 Apr 2024 16:30:01 +0200
+Subject: s390: Mark psw in __load_psw_mask() as __unitialized
+
+From: Sven Schnelle <svens@linux.ibm.com>
+
+[ 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 <hca@linux.ibm.com>
+Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
+Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 7f2953c15c37b..93ba3befd6d40 100644
+--- a/arch/s390/include/asm/processor.h
++++ b/arch/s390/include/asm/processor.h
+@@ -289,8 +289,8 @@ static inline void __load_psw(psw_t psw)
+  */
+ static inline void __load_psw_mask(unsigned long mask)
+ {
++      psw_t psw __uninitialized;
+       unsigned long addr;
+-      psw_t psw;
+       psw.mask = mask;
+-- 
+2.43.0
+
index ce126ad3edad073419c003b9fe0407d1b5b93477..a2dac6d972d8eb4da15706eafe3e69fecba72542 100644 (file)
@@ -44,3 +44,5 @@ tcp-fix-incorrect-undo-caused-by-dsack-of-tlp-retran.patch
 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
+s390-mark-psw-in-__load_psw_mask-as-__unitialized.patch
+arm-davinci-convert-comma-to-semicolon.patch