aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/setup_percpu.c
diff options
context:
space:
mode:
authorGravatar Jason A. Donenfeld <Jason@zx2c4.com> 2022-10-23 22:06:00 +0200
committerGravatar Jason A. Donenfeld <Jason@zx2c4.com> 2022-11-18 02:18:10 +0100
commitb3883a9a1f09e7b41f4dcb1bbd7262216a62d253 (patch)
treea3fc9ed3fee27e63a7b93252484e87e7de7cc1bc /arch/x86/kernel/setup_percpu.c
parenttreewide: use get_random_u32_inclusive() when possible (diff)
downloadlinux-b3883a9a1f09e7b41f4dcb1bbd7262216a62d253.tar.gz
linux-b3883a9a1f09e7b41f4dcb1bbd7262216a62d253.tar.bz2
linux-b3883a9a1f09e7b41f4dcb1bbd7262216a62d253.zip
stackprotector: move get_random_canary() into stackprotector.h
This has nothing to do with random.c and everything to do with stack protectors. Yes, it uses randomness. But many things use randomness. random.h and random.c are concerned with the generation of randomness, not with each and every use. So move this function into the more specific stackprotector.h file where it belongs. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'arch/x86/kernel/setup_percpu.c')
-rw-r--r--arch/x86/kernel/setup_percpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index 49325caa7307..b26123c90b4f 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -11,6 +11,7 @@
#include <linux/smp.h>
#include <linux/topology.h>
#include <linux/pfn.h>
+#include <linux/stackprotector.h>
#include <asm/sections.h>
#include <asm/processor.h>
#include <asm/desc.h>
@@ -21,7 +22,6 @@
#include <asm/proto.h>
#include <asm/cpumask.h>
#include <asm/cpu.h>
-#include <asm/stackprotector.h>
DEFINE_PER_CPU_READ_MOSTLY(int, cpu_number);
EXPORT_PER_CPU_SYMBOL(cpu_number);