[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4277708f-4c49-1141-e30a-190b3291f375@cn.fujitsu.com>
Date: Thu, 2 Aug 2018 14:05:41 +0800
From: Dou Liyang <douly.fnst@...fujitsu.com>
To: Chao Fan <fanc.fnst@...fujitsu.com>
CC: <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>,
<indou.takao@...fujitsu.com>, <caoj.fnst@...fujitsu.com>
Subject: Re: [PATCH v4 4/4] x86/boot/KASLR: Limit kaslr to choosing the
immovable memory
At 08/02/2018 02:00 PM, Chao Fan wrote:
> On Thu, Aug 02, 2018 at 01:46:29PM +0800, Dou Liyang wrote:
>> Hi Fan,
>>
>> At 07/23/2018 05:29 PM, Chao Fan wrote:
>>> If 'CONFIG_MEMORY_HOTREMOVE' specified and the account of immovable
>>> memory regions is not zero. Calculate the intersection between memory
>>> regions from e820/efi memory table and immovable memory regions.
>>> Or go on the old code.
>>>
>>> Rename process_mem_region to slots_count to match slots_fetch_random,
>>> and name new function as process_mem_region.
>>>
>>> Signed-off-by: Chao Fan <fanc.fnst@...fujitsu.com>
>>> ---
>>> arch/x86/boot/compressed/kaslr.c | 66 ++++++++++++++++++++++++++------
>>> 1 file changed, 55 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
>>> index 4705682caf1f..10bda3a1fcaa 100644
>>> --- a/arch/x86/boot/compressed/kaslr.c
>>> +++ b/arch/x86/boot/compressed/kaslr.c
>>> @@ -631,9 +631,9 @@ static unsigned long slots_fetch_random(void)
>>> return 0;
>>> }
>>> -static void process_mem_region(struct mem_vector *entry,
>>> - unsigned long minimum,
>>> - unsigned long image_size)
>>> +static void slots_count(struct mem_vector *entry,
>> ^^^^^^^^^^^
>> is not suitable.
>> IMO, how about process_mem_slots() or you may have a better name, it's
>> up to you.
>
> It's from Kees Cook's advise, he wants to ues slots_count() to match
> slots_fetch_random() in my old PATCH long long ago.
> Since the method of handling this part is not changed a lot, so I keep
> this name.
>
Okay! ;-)
dou
Powered by blists - more mailing lists