]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/stackprotector/64: Only export __ref_stack_chk_guard on CONFIG_SMP
authorIngo Molnar <mingo@kernel.org>
Wed, 12 Mar 2025 11:48:49 +0000 (12:48 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 19 Mar 2025 10:26:58 +0000 (11:26 +0100)
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@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Uros Bizjak <ubizjak@gmail.com>
Link: https://lore.kernel.org/r/20250123190747.745588-8-brgerst@gmail.com
arch/x86/entry/entry.S

index 088f91f76edb3c27ad2d1b31084c543ae675a747..d3caa31240ede57d8f9da85e74fcd25b66882c7e 100644 (file)
@@ -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