Re: [PATCH 3/4] KASLR: Handle memory limit specified by memmap and mem option

2017-04-18 Thread Baoquan He
On 04/19/17 at 08:50am, Baoquan He wrote: > On 04/18/17 at 01:36pm, Kees Cook wrote: > > On Mon, Apr 17, 2017 at 6:34 AM, Baoquan He wrote: > > > @@ -432,7 +455,8 @@ static void process_e820_entry(struct e820entry > > > *entry, > > > { > > > struct mem_vector region,

Re: [PATCH 3/4] KASLR: Handle memory limit specified by memmap and mem option

2017-04-18 Thread Baoquan He
On 04/19/17 at 08:50am, Baoquan He wrote: > On 04/18/17 at 01:36pm, Kees Cook wrote: > > On Mon, Apr 17, 2017 at 6:34 AM, Baoquan He wrote: > > > @@ -432,7 +455,8 @@ static void process_e820_entry(struct e820entry > > > *entry, > > > { > > > struct mem_vector region, overlap; > > >

Re: [PATCH 3/4] KASLR: Handle memory limit specified by memmap and mem option

2017-04-18 Thread Baoquan He
On 04/18/17 at 01:36pm, Kees Cook wrote: > On Mon, Apr 17, 2017 at 6:34 AM, Baoquan He wrote: > > @@ -432,7 +455,8 @@ static void process_e820_entry(struct e820entry *entry, > > { > > struct mem_vector region, overlap; > > struct slot_area slot_area; > > -

Re: [PATCH 3/4] KASLR: Handle memory limit specified by memmap and mem option

2017-04-18 Thread Baoquan He
On 04/18/17 at 01:36pm, Kees Cook wrote: > On Mon, Apr 17, 2017 at 6:34 AM, Baoquan He wrote: > > @@ -432,7 +455,8 @@ static void process_e820_entry(struct e820entry *entry, > > { > > struct mem_vector region, overlap; > > struct slot_area slot_area; > > - unsigned long

Re: [PATCH 3/4] KASLR: Handle memory limit specified by memmap and mem option

2017-04-18 Thread Baoquan He
On 04/18/17 at 01:36pm, Kees Cook wrote: > On Mon, Apr 17, 2017 at 6:34 AM, Baoquan He wrote: > > Option mem= will limit the max address system can use. Any memory > > region above the limit will be removed. And memmap=nn[KMG] which > > has no offset specified has the same

Re: [PATCH 3/4] KASLR: Handle memory limit specified by memmap and mem option

2017-04-18 Thread Baoquan He
On 04/18/17 at 01:36pm, Kees Cook wrote: > On Mon, Apr 17, 2017 at 6:34 AM, Baoquan He wrote: > > Option mem= will limit the max address system can use. Any memory > > region above the limit will be removed. And memmap=nn[KMG] which > > has no offset specified has the same behaviour as mem=.

Re: [PATCH 3/4] KASLR: Handle memory limit specified by memmap and mem option

2017-04-18 Thread Kees Cook
On Mon, Apr 17, 2017 at 6:34 AM, Baoquan He wrote: > Option mem= will limit the max address system can use. Any memory > region above the limit will be removed. And memmap=nn[KMG] which > has no offset specified has the same behaviour as mem=. KASLR need > consider this when

Re: [PATCH 3/4] KASLR: Handle memory limit specified by memmap and mem option

2017-04-18 Thread Kees Cook
On Mon, Apr 17, 2017 at 6:34 AM, Baoquan He wrote: > Option mem= will limit the max address system can use. Any memory > region above the limit will be removed. And memmap=nn[KMG] which > has no offset specified has the same behaviour as mem=. KASLR need > consider this when choose the random

[PATCH 3/4] KASLR: Handle memory limit specified by memmap and mem option

2017-04-17 Thread Baoquan He
Option mem= will limit the max address system can use. Any memory region above the limit will be removed. And memmap=nn[KMG] which has no offset specified has the same behaviour as mem=. KASLR need consider this when choose the random position for decompressing kernel. Do it in this patch.

[PATCH 3/4] KASLR: Handle memory limit specified by memmap and mem option

2017-04-17 Thread Baoquan He
Option mem= will limit the max address system can use. Any memory region above the limit will be removed. And memmap=nn[KMG] which has no offset specified has the same behaviour as mem=. KASLR need consider this when choose the random position for decompressing kernel. Do it in this patch.