[tip: x86/core] x86/stackprotector/64: Only export __ref_stack_chk_guard on CONFIG_SMP
From: tip-bot2 for Ingo Molnar
Date: Wed Mar 19 2025 - 07:07:29 EST
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 91d5451d97ce35cbd510277fa3b7abf9caa4e34d
Gitweb: https://git.kernel.org/tip/91d5451d97ce35cbd510277fa3b7abf9caa4e34d
Author: Ingo Molnar <mingo@xxxxxxxxxx>
AuthorDate: Wed, 12 Mar 2025 12:48:49 +01:00
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Wed, 19 Mar 2025 11:26:58 +01:00
x86/stackprotector/64: Only export __ref_stack_chk_guard on CONFIG_SMP
The __ref_stack_chk_guard symbol doesn't exist on UP:
<stdin>:4:15: error: ‘__ref_stack_chk_guard’ undeclared here (not in a function)
Fix the #ifdef around the entry.S export.
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Brian Gerst <brgerst@xxxxxxxxx>
Cc: Ard Biesheuvel <ardb@xxxxxxxxxx>
Cc: Uros Bizjak <ubizjak@xxxxxxxxx>
Link: https://lore.kernel.org/r/20250123190747.745588-8-brgerst@xxxxxxxxx
---
arch/x86/entry/entry.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/entry/entry.S b/arch/x86/entry/entry.S
index 088f91f..d3caa31 100644
--- a/arch/x86/entry/entry.S
+++ b/arch/x86/entry/entry.S
@@ -64,6 +64,6 @@ THUNK warn_thunk_thunk, __warn_thunk
* entirely in the C code, and use an alias emitted by the linker script
* instead.
*/
-#ifdef CONFIG_STACKPROTECTOR
+#if defined(CONFIG_STACKPROTECTOR) && defined(CONFIG_SMP)
EXPORT_SYMBOL(__ref_stack_chk_guard);
#endif