Skip to contentSkip to conversation

5.10.191-rc1 review

PATCH In review Greg Kroah-Hartman 3 participants 141 messages Aug 24, 2023 – Aug 26, 2023 Page 2 of 2

Subsystems (2)
lore
Share & tools
lore
author maintainer
#130 lore raw

PATCH 127/135 x86/cpu: Cleanup the untrain mess

In reply to Greg Kroah-Hartman

From: Peter Zijlstra <[email protected]>

commit e7c25c441e9e0fa75b4c83e0b26306b702cfe90d upstream.

Since there can only be one active return_thunk, there only needs be one (matching) untrain_ret. It fundamentally doesn't make sense to allow multiple untrain_ret at the same time.

Fold all the 3 different untrain methods into a single (temporary) helper stub.

Fixes fb3bd914b3ec ("x86/srso: Add a Speculative RAS Overflow mitigation")
---
 arch/x86/include/asm/nospec-branch.h |   12 ++++--------
 arch/x86/kernel/cpu/bugs.c           |    1 +
 arch/x86/lib/retpoline.S             |    7 +++++++
 3 files changed, 12 insertions(+), 8 deletions(-)
arch/x86/include/asm/nospec-branch.h +4 -8
@@ -156,9 +156,9 @@
 .endm
 
 #ifdef CONFIG_CPU_UNRET_ENTRY
-#define CALL_ZEN_UNTRAIN_RET	"call retbleed_untrain_ret"
+#define CALL_UNTRAIN_RET	"call entry_untrain_ret"
 #else
-#define CALL_ZEN_UNTRAIN_RET	""
+#define CALL_UNTRAIN_RET	""
 #endif
 
 /*
@@ -177,14 +177,9 @@
 	defined(CONFIG_CPU_SRSO)
 	ANNOTATE_UNRET_END
 	ALTERNATIVE_2 "",						\
-	              CALL_ZEN_UNTRAIN_RET, X86_FEATURE_UNRET,		\
+		      CALL_UNTRAIN_RET, X86_FEATURE_UNRET,		\
 		      "call entry_ibpb", X86_FEATURE_ENTRY_IBPB
 #endif
-
-#ifdef CONFIG_CPU_SRSO
-	ALTERNATIVE_2 "", "call srso_untrain_ret", X86_FEATURE_SRSO, \
-			  "call srso_alias_untrain_ret", X86_FEATURE_SRSO_ALIAS
-#endif
 .endm
 
 #else /* __ASSEMBLY__ */
@@ -209,6 +204,7 @@ extern void retbleed_untrain_ret(void);
 extern void srso_untrain_ret(void);
 extern void srso_alias_untrain_ret(void);
 
+extern void entry_untrain_ret(void);
 extern void entry_ibpb(void);
 
 #ifdef CONFIG_RETPOLINE
arch/x86/kernel/cpu/bugs.c +1 -0
@@ -2359,6 +2359,7 @@ static void __init srso_select_mitigatio
 			 * like ftrace, static_call, etc.
 			 */
 			setup_force_cpu_cap(X86_FEATURE_RETHUNK);
+			setup_force_cpu_cap(X86_FEATURE_UNRET);
 
 			if (boot_cpu_data.x86 == 0x19) {
 				setup_force_cpu_cap(X86_FEATURE_SRSO_ALIAS);
arch/x86/lib/retpoline.S +7 -0
@@ -230,6 +230,13 @@ SYM_CODE_START(srso_return_thunk)
 	ud2
 SYM_CODE_END(srso_return_thunk)
 
+SYM_FUNC_START(entry_untrain_ret)
+	ALTERNATIVE_2 "jmp retbleed_untrain_ret", \
+		      "jmp srso_untrain_ret", X86_FEATURE_SRSO, \
+		      "jmp srso_alias_untrain_ret", X86_FEATURE_SRSO_ALIAS
+SYM_FUNC_END(entry_untrain_ret)
+__EXPORT_THUNK(entry_untrain_ret)
+
 SYM_CODE_START(__x86_return_thunk)
 	UNWIND_HINT_FUNC
 	ANNOTATE_NOENDBR
author maintainer
#121 lore raw

PATCH 118/135 mmc: f-sdh30: fix order of function calls in sdhci_f_sdh30_remove

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

commit 58abdd80b93b09023ca03007b608685c41e3a289 upstream.

The order of function calls in sdhci_f_sdh30_remove is wrong, let's call sdhci_pltfm_unregister first.

---
 drivers/mmc/host/sdhci_f_sdh30.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/mmc/host/sdhci_f_sdh30.c +5 -3
@@ -188,12 +188,14 @@ static int sdhci_f_sdh30_remove(struct p
 {
 	struct sdhci_host *host = platform_get_drvdata(pdev);
 	struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host);
-
-	clk_disable_unprepare(priv->clk_iface);
-	clk_disable_unprepare(priv->clk);
+	struct clk *clk_iface = priv->clk_iface;
+	struct clk *clk = priv->clk;
 
 	sdhci_pltfm_unregister(pdev);
 
+	clk_disable_unprepare(clk_iface);
+	clk_disable_unprepare(clk);
+
 	return 0;
 }
 
author maintainer
#140 lore raw
Quoted 4 lines · Alexey Khoroshilov
Quoted 1 line · Greg Kroah-Hartman

This is the start of the stable review cycle for the 5.10.191 release.

Do you mean 5.10.192 release?

Ah crap, this is what happens when I come back from a long trip where I was working on my laptop and I didn't fully sync my desktop.

Yes, you are right, I am behind a release here, let me go update my trees and push out a new -rc for this, thanks for catching it.

greg k-h

#60 lore raw

Re: [PATCH 5.10 059/135] mmc: bcm2835: fix deferred probing

In reply to Greg Kroah-Hartman
Quoted 11 lines · Greg Kroah-Hartman

From: Sergey Shtylyov <[email protected]>

[ Upstream commit 71150ac12558bcd9d75e6e24cf7c872c2efd80f3 ]

The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Since commit ce753ad1549c ("platform: finally disallow IRQ0 in platform_get_irq() and its ilk") IRQ0 is no longer returned by those APIs, so we now can safely ignore it...

Quoted 2 lines
Fixes 660fc733bd74 ("mmc: bcm2835: Add new driver for the sdhost controller.")
Cc [email protected] # v5.19+

After a glance at the driver, the patch seems safe to be applied to 5.10.y,
despite I tried to limit it to 5.19.y and newer...

Quoted 4 lines

[...]

MBR, Sergey

#62 lore raw

Re: [PATCH 5.10 060/135] mmc: sunxi: fix deferred probing

In reply to Greg Kroah-Hartman
Quoted 11 lines · Greg Kroah-Hartman

From: Sergey Shtylyov <[email protected]>

[ Upstream commit c2df53c5806cfd746dae08e07bc8c4ad247c3b70 ]

The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Since commit ce753ad1549c ("platform: finally disallow IRQ0 in platform_get_irq() and its ilk") IRQ0 is no longer returned by those APIs, so we now can safely ignore it...

Quoted 2 lines
Fixes 2408a08583d2 ("mmc: sunxi-mmc: Handle return value of platform_get_irq")
Cc [email protected] # v5.19+

After a glance at the driver, the patch too seems safe to be applied to 5.10.y,
despite I tried to limit it to 5.19.y and newer...

Quoted 5 lines

[...]

MBR, Sergey

#66 lore raw

Re: [PATCH 5.10 063/135] mmc: meson-gx: fix deferred probing

In reply to Greg Kroah-Hartman
Quoted 11 lines · Greg Kroah-Hartman

From: Sergey Shtylyov <[email protected]>

[ Upstream commit b8ada54fa1b83f3b6480d4cced71354301750153 ]

The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Since commit ce753ad1549c ("platform: finally disallow IRQ0 in platform_get_irq() and its ilk") IRQ0 is no longer returned by those APIs, so we now can safely ignore it...

Quoted 2 lines
Fixes cbcaac6d7dd2 ("mmc: meson-gx-mmc: Fix platform_get_irq's error checking")
Cc [email protected] # v5.19+

After a glance at the driver, the patch too seems safe to be applied to 5.10.y,
despite I tried to limit it to 5.19.y and newer...

Quoted 5 lines

[...]

MBR, Sergey