Re: [PATCH v4] x86: fix kaslr and memmap collision

2017-01-04 Thread Baoquan He
On 01/04/17 at 10:06am, Dave Jiang wrote: > On 01/03/2017 07:37 PM, Baoquan He wrote: > >> #include > >> #include > >> @@ -61,9 +62,16 @@ enum mem_avoid_index { > >>MEM_AVOID_INITRD, > >>MEM_AVOID_CMDLINE, > >>MEM_AVOID_BOOTPARAMS, > >> + MEM_AVOID_MEMMAP1, > >> +

Re: [PATCH v4] x86: fix kaslr and memmap collision

2017-01-04 Thread Baoquan He
On 01/04/17 at 10:06am, Dave Jiang wrote: > On 01/03/2017 07:37 PM, Baoquan He wrote: > >> #include > >> #include > >> @@ -61,9 +62,16 @@ enum mem_avoid_index { > >>MEM_AVOID_INITRD, > >>MEM_AVOID_CMDLINE, > >>MEM_AVOID_BOOTPARAMS, > >> + MEM_AVOID_MEMMAP1, > >> +

Re: [PATCH v4] x86: fix kaslr and memmap collision

2017-01-04 Thread Dave Jiang
On 01/03/2017 07:37 PM, Baoquan He wrote: > Hi Dave, > > I have several concerns, please see the inline comments. > > On 01/03/17 at 01:48pm, Dave Jiang wrote: >> CONFIG_RANDOMIZE_BASE relocates the kernel to a random base address. >> However it does not take into account the memmap= parameter

Re: [PATCH v4] x86: fix kaslr and memmap collision

2017-01-04 Thread Dave Jiang
On 01/03/2017 07:37 PM, Baoquan He wrote: > Hi Dave, > > I have several concerns, please see the inline comments. > > On 01/03/17 at 01:48pm, Dave Jiang wrote: >> CONFIG_RANDOMIZE_BASE relocates the kernel to a random base address. >> However it does not take into account the memmap= parameter

Re: [PATCH v4] x86: fix kaslr and memmap collision

2017-01-03 Thread Baoquan He
Hi Dave, I have several concerns, please see the inline comments. On 01/03/17 at 01:48pm, Dave Jiang wrote: > CONFIG_RANDOMIZE_BASE relocates the kernel to a random base address. > However it does not take into account the memmap= parameter passed in from > the kernel cmdline. This results in

Re: [PATCH v4] x86: fix kaslr and memmap collision

2017-01-03 Thread Baoquan He
Hi Dave, I have several concerns, please see the inline comments. On 01/03/17 at 01:48pm, Dave Jiang wrote: > CONFIG_RANDOMIZE_BASE relocates the kernel to a random base address. > However it does not take into account the memmap= parameter passed in from > the kernel cmdline. This results in

[PATCH v4] x86: fix kaslr and memmap collision

2017-01-03 Thread Dave Jiang
CONFIG_RANDOMIZE_BASE relocates the kernel to a random base address. However it does not take into account the memmap= parameter passed in from the kernel cmdline. This results in the kernel sometimes being put in the middle of the user memmap. Teaching kaslr to not insert the kernel in memmap

[PATCH v4] x86: fix kaslr and memmap collision

2017-01-03 Thread Dave Jiang
CONFIG_RANDOMIZE_BASE relocates the kernel to a random base address. However it does not take into account the memmap= parameter passed in from the kernel cmdline. This results in the kernel sometimes being put in the middle of the user memmap. Teaching kaslr to not insert the kernel in memmap