Re: [PATCH 2/4] kaslr: check if the random addr is available

2014-09-10 Thread Baoquan He
On 09/09/14 at 03:41pm, Vivek Goyal wrote: > On Sat, Sep 06, 2014 at 06:16:57AM +0800, Baoquan He wrote: > > [CC hpa ] > > > Hi Kees, > > > > Yes, process_e820_entry() can make sure the choice+output_len < > > CONFIG_RANDOMIZE_BASE_MAX_OFFSET, but that can't stop other bootloaders > > to put

Re: [PATCH 2/4] kaslr: check if the random addr is available

2014-09-10 Thread Baoquan He
On 09/09/14 at 03:41pm, Vivek Goyal wrote: On Sat, Sep 06, 2014 at 06:16:57AM +0800, Baoquan He wrote: [CC hpa ] Hi Kees, Yes, process_e820_entry() can make sure the choice+output_len CONFIG_RANDOMIZE_BASE_MAX_OFFSET, but that can't stop other bootloaders to put kernel in region

Re: [PATCH 2/4] kaslr: check if the random addr is available

2014-09-09 Thread Vivek Goyal
On Sat, Sep 06, 2014 at 06:16:57AM +0800, Baoquan He wrote: > On 09/05/14 at 10:16am, Kees Cook wrote: > > On Fri, Sep 5, 2014 at 7:08 AM, Baoquan He wrote: > > > diff --git a/arch/x86/boot/compressed/misc.c > > > b/arch/x86/boot/compressed/misc.c > > > index 7780a5b..d2a0eaa 100644 > > > ---

Re: [PATCH 2/4] kaslr: check if the random addr is available

2014-09-09 Thread Vivek Goyal
On Sat, Sep 06, 2014 at 06:16:57AM +0800, Baoquan He wrote: On 09/05/14 at 10:16am, Kees Cook wrote: On Fri, Sep 5, 2014 at 7:08 AM, Baoquan He b...@redhat.com wrote: diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index 7780a5b..d2a0eaa 100644 ---

Re: [PATCH 2/4] kaslr: check if the random addr is available

2014-09-05 Thread Baoquan He
On 09/05/14 at 10:16am, Kees Cook wrote: > On Fri, Sep 5, 2014 at 7:08 AM, Baoquan He wrote: > > diff --git a/arch/x86/boot/compressed/misc.c > > b/arch/x86/boot/compressed/misc.c > > index 7780a5b..d2a0eaa 100644 > > --- a/arch/x86/boot/compressed/misc.c > > +++

Re: [PATCH 2/4] kaslr: check if the random addr is available

2014-09-05 Thread Kees Cook
On Fri, Sep 5, 2014 at 7:08 AM, Baoquan He wrote: > Currently kaslr enabling can extend the kernel virtual address space > to 1G, next is for modules. So if kernel is loaded to above 1G, system > running will be exceptional, This happened when kexec/kdump load kernel. > > So add a check to see if

[PATCH 2/4] kaslr: check if the random addr is available

2014-09-05 Thread Baoquan He
Currently kaslr enabling can extend the kernel virtual address space to 1G, next is for modules. So if kernel is loaded to above 1G, system running will be exceptional, This happened when kexec/kdump load kernel. So add a check to see if the decompression output region is contained in 1G.

[PATCH 2/4] kaslr: check if the random addr is available

2014-09-05 Thread Baoquan He
Currently kaslr enabling can extend the kernel virtual address space to 1G, next is for modules. So if kernel is loaded to above 1G, system running will be exceptional, This happened when kexec/kdump load kernel. So add a check to see if the decompression output region is contained in 1G.

Re: [PATCH 2/4] kaslr: check if the random addr is available

2014-09-05 Thread Kees Cook
On Fri, Sep 5, 2014 at 7:08 AM, Baoquan He b...@redhat.com wrote: Currently kaslr enabling can extend the kernel virtual address space to 1G, next is for modules. So if kernel is loaded to above 1G, system running will be exceptional, This happened when kexec/kdump load kernel. So add a check

Re: [PATCH 2/4] kaslr: check if the random addr is available

2014-09-05 Thread Baoquan He
On 09/05/14 at 10:16am, Kees Cook wrote: On Fri, Sep 5, 2014 at 7:08 AM, Baoquan He b...@redhat.com wrote: diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index 7780a5b..d2a0eaa 100644 --- a/arch/x86/boot/compressed/misc.c +++