Re: [PATCH v5 4/4] x86/boot/KASLR: Limit kaslr to choosing the immovable memory

2018-08-27 Thread Baoquan He
On 08/27/18 at 01:56pm, Baoquan He wrote: > On 08/07/18 at 02:50pm, Chao Fan wrote: > > If 'CONFIG_MEMORY_HOTREMOVE' specified and the account of immovable > If CONFIG_MEMORY_HOTREMOVE is enabled, > > memory regions is not zero. Calculate the intersection between memory > > regions from e820/efi m

Re: [PATCH v5 4/4] x86/boot/KASLR: Limit kaslr to choosing the immovable memory

2018-08-27 Thread Baoquan He
On 08/27/18 at 02:28pm, Chao Fan wrote: > >Is it possible to take num_immovable_mem definition out from #ifdef > >CONFIG_MEMORY_HOTREMOVE block and check it here like below? This way, > >one level of indentation can be reduced in the for loop, and code is > >more readable. > > > > I think there is

Re: [PATCH v5 4/4] x86/boot/KASLR: Limit kaslr to choosing the immovable memory

2018-08-26 Thread Chao Fan
On Mon, Aug 27, 2018 at 02:28:54PM +0800, Chao Fan wrote: >On Mon, Aug 27, 2018 at 01:56:07PM +0800, Baoquan He wrote: >>On 08/07/18 at 02:50pm, Chao Fan wrote: [...] >> >>Is it possible to take num_immovable_mem definition out from #ifdef >>CONFIG_MEMORY_HOTREMOVE block and check it here like belo

Re: [PATCH v5 4/4] x86/boot/KASLR: Limit kaslr to choosing the immovable memory

2018-08-26 Thread Chao Fan
On Mon, Aug 27, 2018 at 01:56:07PM +0800, Baoquan He wrote: >On 08/07/18 at 02:50pm, Chao Fan wrote: >> If 'CONFIG_MEMORY_HOTREMOVE' specified and the account of immovable >If CONFIG_MEMORY_HOTREMOVE is enabled, >> memory regions is not zero. Calculate the intersection between memory >> regions fr

Re: [PATCH v5 4/4] x86/boot/KASLR: Limit kaslr to choosing the immovable memory

2018-08-26 Thread Baoquan He
On 08/27/18 at 01:35pm, Baoquan He wrote: > Is it possible to take num_immovable_mem out from the #ifdef > CONFIG_MEMORY_HOTREMOVE region so that you can check it earlier to see > if the old way need be taken? This way, we can reduce one level of > indentation in the for loop. Just personal thoug

Re: [PATCH v5 4/4] x86/boot/KASLR: Limit kaslr to choosing the immovable memory

2018-08-26 Thread Baoquan He
On 08/07/18 at 02:50pm, Chao Fan wrote: > If 'CONFIG_MEMORY_HOTREMOVE' specified and the account of immovable If CONFIG_MEMORY_HOTREMOVE is enabled, > memory regions is not zero. Calculate the intersection between memory > regions from e820/efi memory table and immovable memory regions. > Or go on

Re: [PATCH v5 4/4] x86/boot/KASLR: Limit kaslr to choosing the immovable memory

2018-08-26 Thread Baoquan He
On 08/07/18 at 02:50pm, 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_r

[PATCH v5 4/4] x86/boot/KASLR: Limit kaslr to choosing the immovable memory

2018-08-06 Thread Chao Fan
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, an