[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180115124016.17683-3-fanc.fnst@cn.fujitsu.com>
Date: Mon, 15 Jan 2018 20:40:13 +0800
From: Chao Fan <fanc.fnst@...fujitsu.com>
To: <linux-kernel@...r.kernel.org>, <x86@...nel.org>, <hpa@...or.com>,
<tglx@...utronix.de>, <mingo@...hat.com>, <bhe@...hat.com>,
<keescook@...omium.org>, <yasu.isimatu@...il.com>
CC: <indou.takao@...fujitsu.com>, <lcapitulino@...hat.com>,
Chao Fan <fanc.fnst@...fujitsu.com>
Subject: [PATCH v6 2/5] kaslr: give a warning if movable_node specified without kaslr_mem=
Signed-off-by: Chao Fan <fanc.fnst@...fujitsu.com>
---
arch/x86/boot/compressed/kaslr.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index b071f6edd7b2..38816d3f8865 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -282,6 +282,16 @@ static int handle_mem_filter(void)
!strstr(args, "kaslr_mem="))
return 0;
+#ifdef CONFIG_MEMORY_HOTPLUG
+ /*
+ * Check if "kaslr_mem=" specified when "movable_node" found. If not,
+ * just give warrning. Otherwise memory hotplug could be
+ * affected if kernel put on movable memory regions.
+ */
+ if (strstr(args, "movable_node") && !strstr(args, "kaslr_mem="))
+ warn("kaslr_mem= should specified when using movable_node.\n");
+#endif
+
tmp_cmdline = malloc(len + 1);
if (!tmp_cmdline)
error("Failed to allocate space for tmp_cmdline");
--
2.14.3
Powered by blists - more mailing lists