Messages in this thread | | | Date | Thu, 18 Jan 2018 09:13:57 +0800 | From | Chao Fan <> | Subject | Re: [PATCH v7 4/5] x86/KASLR: Skip memory mirror handling if movable_node specified |
| |
On Wed, Jan 17, 2018 at 10:03:54PM +0800, Baoquan He wrote: >On 01/17/18 at 06:53pm, Chao Fan wrote: >> In kernel code, if movable_node specified, it will skip the mirror >> feature. So we should also skip mirror feature in KASLR. >> >> Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.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 dca846b522fc..84b9db26d026 100644 >> --- a/arch/x86/boot/compressed/kaslr.c >> +++ b/arch/x86/boot/compressed/kaslr.c >> @@ -692,6 +692,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; >> @@ -725,6 +726,12 @@ process_efi_entries(unsigned long minimum, unsigned long image_size) >> } >> } >> >> +#ifdef CONFIG_MEMORY_HOTPLUG >> + /* Skip memory mirror if movabale_node or immovable_mem specified */ > ~~~~~~~~~~~~~ > ^^ need be removed?
Yes, sorry for the mistake, I change the old versions and miss some points. Will change that.
Thanks, Chao Fan
>> + 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 >> >> >> > >
| |