aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/setup.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/setup.h')
-rw-r--r--arch/x86/include/asm/setup.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index ff4e7b236e21..f69e06b283fb 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -66,6 +66,11 @@ static inline void x86_ce4100_early_setup(void) { }
*/
extern struct boot_params boot_params;
+static inline bool kaslr_enabled(void)
+{
+ return !!(boot_params.hdr.loadflags & KASLR_FLAG);
+}
+
/*
* Do NOT EVER look at the BIOS memory size location.
* It does not work on many machines.