summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/module.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-02-19 12:06:04 +0100
committerIngo Molnar <mingo@kernel.org>2015-02-19 12:31:34 +0100
commita267b0a349bb021c010e36a2a13e1e16657b1b0f (patch)
tree4438a10ecc864f15ce6f37c1764fffa995a9a175 /arch/x86/kernel/module.c
parentee408b4207c8281a91f039e89d06de264d319466 (diff)
parent4e7c22d447bb6d7e37bfe39ff658486ae78e8d77 (diff)
Merge branch 'tip-x86-kaslr' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp into x86/urgent
Pull ASLR and kASLR fixes from Borislav Petkov: - Add a global flag announcing KASLR state so that relevant code can do informed decisions based on its setting. (Jiri Kosina) - Fix a stack randomization entropy decrease bug. (Hector Marco-Gisbert) Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/module.c')
-rw-r--r--arch/x86/kernel/module.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index e69f9882bf9..c3c59a3a14a 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -32,6 +32,7 @@
#include <asm/page.h>
#include <asm/pgtable.h>
+#include <asm/page_types.h>
#if 0
#define DEBUGP(fmt, ...) \
@@ -46,21 +47,13 @@ do { \
#ifdef CONFIG_RANDOMIZE_BASE
static unsigned long module_load_offset;
-static int randomize_modules = 1;
/* Mutex protects the module_load_offset. */
static DEFINE_MUTEX(module_kaslr_mutex);
-static int __init parse_nokaslr(char *p)
-{
- randomize_modules = 0;
- return 0;
-}
-early_param("nokaslr", parse_nokaslr);
-
static unsigned long int get_module_load_offset(void)
{
- if (randomize_modules) {
+ if (kaslr_enabled) {
mutex_lock(&module_kaslr_mutex);
/*
* Calculate the module_load_offset the first time this