[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180228105105.11487-5-fanc.fnst@cn.fujitsu.com>
Date: Wed, 28 Feb 2018 18:51:04 +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 v9 4/5] x86/KASLR: Skip memory mirror handling if movable_node specified
In kernel code, if 'movable_node' specified, it will skip the mirror
feature. So also skip mirror feature in KASLR.
Signed-off-by: Chao Fan <fanc.fnst@...fujitsu.com>
Acked-by: Baoquan He <bhe@...hat.com>
---
arch/x86/boot/compressed/kaslr.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index 9fb86248d5c5..d19085dbd6f5 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -698,6 +698,7 @@ static bool
process_efi_entries(unsigned long minimum, unsigned long image_size)
{
struct efi_info *e = &boot_params->efi_info;
+ char *args = (char *)get_cmd_line_ptr();
bool efi_mirror_found = false;
struct mem_vector region;
efi_memory_desc_t *md;
@@ -731,6 +732,12 @@ process_efi_entries(unsigned long minimum, unsigned long image_size)
}
}
+#ifdef CONFIG_MEMORY_HOTPLUG
+ /* Skip memory mirror if 'movabale_node' specified */
+ if (strstr(args, "movable_node"))
+ efi_mirror_found = false;
+#endif
+
for (i = 0; i < nr_desc; i++) {
md = efi_early_memdesc_ptr(pmap, e->efi_memdesc_size, i);
--
2.14.3
Powered by blists - more mailing lists