[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181022102455.GN1885@192.168.1.4>
Date: Mon, 22 Oct 2018 18:24:55 +0800
From: Baoquan He <bhe@...hat.com>
To: Chao Fan <fanc.fnst@...fujitsu.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org,
linux-efi@...r.kernel.org, linux-acpi@...r.kernel.org,
bp@...en8.de, tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
keescook@...omium.org, msys.mizuma@...il.com,
indou.takao@...fujitsu.com, caoj.fnst@...fujitsu.com
Subject: Re: [PATCH v9 8/8] x86/boot/KASLR: Limit kaslr to choosing the
immovable memory
On 10/22/18 at 06:13pm, Chao Fan wrote:
> >> +static bool process_mem_region(struct mem_vector *region,
> >> + unsigned long long minimum,
> >> + unsigned long long image_size)
> >> +{
> >> + int i;
> >> + /*
> >> + * If no immovable memory found, or MEMORY_HOTREMOVE disabled,
> >> + * walk all the regions, so use region directely.
> >> + */
> >> + if (num_immovable_mem == 0) {
> >> + slots_count(region, minimum, image_size);
> >> +
> >> + if (slot_area_index == MAX_SLOT_AREA) {
> >> + debug_putstr("Aborted e820/efi memmap scan (slot_areas full)!\n");
> >> + return 1;
> >> + }
> >> + return 0;
> >> + }
> >> +
> >> +#ifdef CONFIG_MEMORY_HOTREMOVE
> >> + /*
> >> + * If immovable memory found, filter the intersection between
> >> + * immovable memory and region to slots_count.
> >> + * Otherwise, go on old code.
> >
> >Could you explain more about what is the old code in otherwise case you
> >want to go on?
>
> Sure,
> 1. 'movable_node' not specified in cmdline.
> 2. CONFIG_HOT_REMOVE not difned.
> 3. Just one node in this machine.
So these cases are not covered by 'if (num_immovable_mem == 0)' code?
In thise ifdef code block, where do you handle above three cases?
Thanks
Baoquan
Powered by blists - more mailing lists