From: Ingo Molnar Date: Wed, 12 Mar 2025 11:48:49 +0000 (+0100) Subject: x86/stackprotector/64: Only export __ref_stack_chk_guard on CONFIG_SMP X-Git-Tag: v6.14.9~654 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6d6b4998df109ea1f47f2d1bcbad860df4067ca;p=thirdparty%2Fkernel%2Fstable.git x86/stackprotector/64: Only export __ref_stack_chk_guard on CONFIG_SMP [ Upstream commit 91d5451d97ce35cbd510277fa3b7abf9caa4e34d ] The __ref_stack_chk_guard symbol doesn't exist on UP: :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 Cc: Brian Gerst Cc: Ard Biesheuvel Cc: Uros Bizjak Link: https://lore.kernel.org/r/20250123190747.745588-8-brgerst@gmail.com Signed-off-by: Sasha Levin --- diff --git a/arch/x86/entry/entry.S b/arch/x86/entry/entry.S index 58e3124ee2b42..5b96249734ada 100644 --- a/arch/x86/entry/entry.S +++ b/arch/x86/entry/entry.S @@ -63,7 +63,7 @@ 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 #endif