Skip to contentSkip to conversation

Patch "ARM: Spectre-BHB: provide empty stub for non-config" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Mar 12, 2022 Arm (32-bit)

lore
Share & tools
lore

[email protected]

author Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ARM: Spectre-BHB: provide empty stub for non-config

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
arm-spectre-bhb-provide-empty-stub-for-non-config.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From 68453767131a5deec1e8f9ac92a9042f929e585d Mon Sep 17 00:00:00 2001
From: Randy Dunlap <[email protected]>
Date: Fri, 11 Mar 2022 11:49:12 -0800
Subject: ARM: Spectre-BHB: provide empty stub for non-config

From: Randy Dunlap <[email protected]>

commit 68453767131a5deec1e8f9ac92a9042f929e585d upstream.

When CONFIG_GENERIC_CPU_VULNERABILITIES is not set, references to spectre_v2_update_state() cause a build error, so provide an empty stub for that function when the Kconfig option is not set.

Fixes this build error:

arm-linux-gnueabi-ld: arch/arm/mm/proc-v7-bugs.o: in function `cpu_v7_bugs_init':
proc-v7-bugs.c:(.text+0x52): undefined reference to `spectre_v2_update_state'
arm-linux-gnueabi-ld: proc-v7-bugs.c:(.text+0x82): undefined reference to `spectre_v2_update_state'

---
 arch/arm/include/asm/spectre.h |    6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/include/asm/spectre.h +6 -0
@@ -25,7 +25,13 @@ enum {
 	SPECTRE_V2_METHOD_LOOP8 = BIT(__SPECTRE_V2_METHOD_LOOP8),
 };
 
+#ifdef CONFIG_GENERIC_CPU_VULNERABILITIES
 void spectre_v2_update_state(unsigned int state, unsigned int methods);
+#else
+static inline void spectre_v2_update_state(unsigned int state,
+					   unsigned int methods)
+{}
+#endif
 
 int spectre_bhb_update_vectors(unsigned int method);
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/arm-spectre-bhb-provide-empty-stub-for-non-config.patch

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel