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

2017-01-03 Thread Baoquan He
On 01/03/17 at 01:15pm, Dave Jiang wrote: > > > On 01/03/2017 11:24 AM, Dan Williams wrote: > > On Tue, Jan 3, 2017 at 12:31 AM, Baoquan He wrote: > >> Hi Dan, > >> > >> On 11/22/16 at 09:26am, Dan Williams wrote: > >>> [ replying for Dave since he's offline today and tomorrow

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

2017-01-03 Thread Baoquan He
On 01/03/17 at 01:15pm, Dave Jiang wrote: > > > On 01/03/2017 11:24 AM, Dan Williams wrote: > > On Tue, Jan 3, 2017 at 12:31 AM, Baoquan He wrote: > >> Hi Dan, > >> > >> On 11/22/16 at 09:26am, Dan Williams wrote: > >>> [ replying for Dave since he's offline today and tomorrow ] > >>> > >>> On

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

2017-01-03 Thread Dave Jiang
On 01/03/2017 11:24 AM, Dan Williams wrote: > On Tue, Jan 3, 2017 at 12:31 AM, Baoquan He wrote: >> Hi Dan, >> >> On 11/22/16 at 09:26am, Dan Williams wrote: >>> [ replying for Dave since he's offline today and tomorrow ] >>> >>> On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar

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

2017-01-03 Thread Dave Jiang
On 01/03/2017 11:24 AM, Dan Williams wrote: > On Tue, Jan 3, 2017 at 12:31 AM, Baoquan He wrote: >> Hi Dan, >> >> On 11/22/16 at 09:26am, Dan Williams wrote: >>> [ replying for Dave since he's offline today and tomorrow ] >>> >>> On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote: *

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

2017-01-03 Thread Dan Williams
On Tue, Jan 3, 2017 at 12:31 AM, Baoquan He wrote: > Hi Dan, > > On 11/22/16 at 09:26am, Dan Williams wrote: >> [ replying for Dave since he's offline today and tomorrow ] >> >> On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote: >> > >> > * Dave Jiang

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

2017-01-03 Thread Dan Williams
On Tue, Jan 3, 2017 at 12:31 AM, Baoquan He wrote: > Hi Dan, > > On 11/22/16 at 09:26am, Dan Williams wrote: >> [ replying for Dave since he's offline today and tomorrow ] >> >> On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote: >> > >> > * Dave Jiang wrote: >> > >> >> CONFIG_RANDOMIZE_BASE

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

2017-01-03 Thread Ross Zwisler
On Tue, Jan 03, 2017 at 04:31:37PM +0800, Baoquan He wrote: > Hi Dan, > > On 11/22/16 at 09:26am, Dan Williams wrote: > > [ replying for Dave since he's offline today and tomorrow ] > > > > On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote: > > > > > > * Dave Jiang

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

2017-01-03 Thread Ross Zwisler
On Tue, Jan 03, 2017 at 04:31:37PM +0800, Baoquan He wrote: > Hi Dan, > > On 11/22/16 at 09:26am, Dan Williams wrote: > > [ replying for Dave since he's offline today and tomorrow ] > > > > On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote: > > > > > > * Dave Jiang wrote: > > > > > >>

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

2017-01-03 Thread Baoquan He
Hi Dan, On 11/22/16 at 09:26am, Dan Williams wrote: > [ replying for Dave since he's offline today and tomorrow ] > > On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote: > > > > * Dave Jiang wrote: > > > >> CONFIG_RANDOMIZE_BASE relocates the kernel to

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

2017-01-03 Thread Baoquan He
Hi Dan, On 11/22/16 at 09:26am, Dan Williams wrote: > [ replying for Dave since he's offline today and tomorrow ] > > On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote: > > > > * Dave Jiang wrote: > > > >> CONFIG_RANDOMIZE_BASE relocates the kernel to a random base address. > >> However it

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

2016-11-24 Thread Dan Williams
On Wed, Nov 23, 2016 at 4:04 PM, Dave Chinner wrote: > On Tue, Nov 22, 2016 at 11:01:32AM -0800, Dan Williams wrote: >> On Tue, Nov 22, 2016 at 10:54 AM, Kees Cook wrote: >> > On Tue, Nov 22, 2016 at 9:26 AM, Dan Williams >>

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

2016-11-24 Thread Dan Williams
On Wed, Nov 23, 2016 at 4:04 PM, Dave Chinner wrote: > On Tue, Nov 22, 2016 at 11:01:32AM -0800, Dan Williams wrote: >> On Tue, Nov 22, 2016 at 10:54 AM, Kees Cook wrote: >> > On Tue, Nov 22, 2016 at 9:26 AM, Dan Williams >> > wrote: >> >> No, you're right, we need to handle multiple ranges.

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

2016-11-23 Thread Dave Chinner
On Tue, Nov 22, 2016 at 11:01:32AM -0800, Dan Williams wrote: > On Tue, Nov 22, 2016 at 10:54 AM, Kees Cook wrote: > > On Tue, Nov 22, 2016 at 9:26 AM, Dan Williams > > wrote: > >> No, you're right, we need to handle multiple ranges. Since the >

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

2016-11-23 Thread Dave Chinner
On Tue, Nov 22, 2016 at 11:01:32AM -0800, Dan Williams wrote: > On Tue, Nov 22, 2016 at 10:54 AM, Kees Cook wrote: > > On Tue, Nov 22, 2016 at 9:26 AM, Dan Williams > > wrote: > >> No, you're right, we need to handle multiple ranges. Since the > >> mem_avoid array is statically allocated

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

2016-11-22 Thread Kees Cook
On Tue, Nov 22, 2016 at 11:01 AM, Dan Williams wrote: > On Tue, Nov 22, 2016 at 10:54 AM, Kees Cook wrote: >> On Tue, Nov 22, 2016 at 9:26 AM, Dan Williams >> wrote: >>> [ replying for Dave since he's offline today and

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

2016-11-22 Thread Kees Cook
On Tue, Nov 22, 2016 at 11:01 AM, Dan Williams wrote: > On Tue, Nov 22, 2016 at 10:54 AM, Kees Cook wrote: >> On Tue, Nov 22, 2016 at 9:26 AM, Dan Williams >> wrote: >>> [ replying for Dave since he's offline today and tomorrow ] >>> >>> On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote:

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

2016-11-22 Thread Dan Williams
On Tue, Nov 22, 2016 at 10:54 AM, Kees Cook wrote: > On Tue, Nov 22, 2016 at 9:26 AM, Dan Williams > wrote: >> [ replying for Dave since he's offline today and tomorrow ] >> >> On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar

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

2016-11-22 Thread Dan Williams
On Tue, Nov 22, 2016 at 10:54 AM, Kees Cook wrote: > On Tue, Nov 22, 2016 at 9:26 AM, Dan Williams > wrote: >> [ replying for Dave since he's offline today and tomorrow ] >> >> On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote: >>> >>> * Dave Jiang wrote: >>> CONFIG_RANDOMIZE_BASE

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

2016-11-22 Thread Kees Cook
On Tue, Nov 22, 2016 at 9:26 AM, Dan Williams wrote: > [ replying for Dave since he's offline today and tomorrow ] > > On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote: >> >> * Dave Jiang wrote: >> >>> CONFIG_RANDOMIZE_BASE

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

2016-11-22 Thread Kees Cook
On Tue, Nov 22, 2016 at 9:26 AM, Dan Williams wrote: > [ replying for Dave since he's offline today and tomorrow ] > > On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote: >> >> * Dave Jiang wrote: >> >>> CONFIG_RANDOMIZE_BASE relocates the kernel to a random base address. >>> However it does

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

2016-11-22 Thread Dan Williams
[ replying for Dave since he's offline today and tomorrow ] On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote: > > * Dave Jiang wrote: > >> CONFIG_RANDOMIZE_BASE relocates the kernel to a random base address. >> However it does not take into account the

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

2016-11-22 Thread Dan Williams
[ replying for Dave since he's offline today and tomorrow ] On Tue, Nov 22, 2016 at 12:47 AM, Ingo Molnar wrote: > > * 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

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

2016-11-22 Thread Ingo Molnar
* 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 commandline. memmap= parameters are often used as a list. > [...] This results in the

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

2016-11-22 Thread Ingo Molnar
* 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 commandline. memmap= parameters are often used as a list. > [...] This results in the kernel sometimes being put

[PATCH] x86: fix kaslr and memmap collision

2016-11-21 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 commandline. This results in the kernel sometimes being put in the middle of the user memmap. Check has been added in the kaslr in order to

[PATCH] x86: fix kaslr and memmap collision

2016-11-21 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 commandline. This results in the kernel sometimes being put in the middle of the user memmap. Check has been added in the kaslr in order to