diff options
author | Brian Gerst <brgerst@gmail.com> | 2025-03-03 19:52:45 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-03-04 22:30:33 +0300 |
commit | f3856cd343b6371530c9af3c97354cdc003f3203 (patch) | |
tree | 45443cacb7584b847d8678fb4bf0c00e685c3ab7 | |
parent | a1e4cc0155ad577adc3a2c563fc5eec625945ce7 (diff) | |
download | linux-f3856cd343b6371530c9af3c97354cdc003f3203.tar.xz |
x86/stackprotector: Move __stack_chk_guard to percpu hot section
No functional change.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250303165246.2175811-11-brgerst@gmail.com
-rw-r--r-- | arch/x86/include/asm/stackprotector.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/stackprotector.h b/arch/x86/include/asm/stackprotector.h index d43fb589fcf6..cd761b14eb02 100644 --- a/arch/x86/include/asm/stackprotector.h +++ b/arch/x86/include/asm/stackprotector.h @@ -20,7 +20,7 @@ #include <linux/sched.h> -DECLARE_PER_CPU(unsigned long, __stack_chk_guard); +DECLARE_PER_CPU_CACHE_HOT(unsigned long, __stack_chk_guard); /* * Initialize the stackprotector canary value. diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 3f45fdd48bdb..5809534ecc98 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -2147,7 +2147,7 @@ void syscall_init(void) #endif /* CONFIG_X86_64 */ #ifdef CONFIG_STACKPROTECTOR -DEFINE_PER_CPU(unsigned long, __stack_chk_guard); +DEFINE_PER_CPU_CACHE_HOT(unsigned long, __stack_chk_guard); #ifndef CONFIG_SMP EXPORT_PER_CPU_SYMBOL(__stack_chk_guard); #endif |