Re: [PATCH v6 7/8] ARM: mm: allow non-text sections to be non-executable

2014-09-26 Thread Kees Cook
On Fri, Sep 26, 2014 at 9:59 AM, Russell King - ARM Linux wrote: > On Fri, Sep 26, 2014 at 09:43:12AM -0700, Kees Cook wrote: >> On Fri, Sep 26, 2014 at 4:42 AM, Russell King - ARM Linux >> wrote: >> > On Thu, Sep 18, 2014 at 12:19:08PM -0700, Kees Cook wrote: >> >> @@ -1373,13 +1373,24 @@ static

Re: [PATCH v6 7/8] ARM: mm: allow non-text sections to be non-executable

2014-09-26 Thread Russell King - ARM Linux
On Fri, Sep 26, 2014 at 09:43:12AM -0700, Kees Cook wrote: > On Fri, Sep 26, 2014 at 4:42 AM, Russell King - ARM Linux > wrote: > > On Thu, Sep 18, 2014 at 12:19:08PM -0700, Kees Cook wrote: > >> @@ -1373,13 +1373,24 @@ static void __init map_lowmem(void) > >> if (start >= end) > >>

Re: [PATCH v6 7/8] ARM: mm: allow non-text sections to be non-executable

2014-09-26 Thread Kees Cook
On Fri, Sep 26, 2014 at 4:42 AM, Russell King - ARM Linux wrote: > On Thu, Sep 18, 2014 at 12:19:08PM -0700, Kees Cook wrote: >> @@ -1373,13 +1373,24 @@ static void __init map_lowmem(void) >> if (start >= end) >> break; >> >> - if (end < kernel_x_sta

Re: [PATCH v6 7/8] ARM: mm: allow non-text sections to be non-executable

2014-09-26 Thread Russell King - ARM Linux
On Thu, Sep 18, 2014 at 12:19:08PM -0700, Kees Cook wrote: > @@ -1373,13 +1373,24 @@ static void __init map_lowmem(void) > if (start >= end) > break; > > - if (end < kernel_x_start || start >= kernel_x_end) { > + if (end < kernel_x_start

[PATCH v6 7/8] ARM: mm: allow non-text sections to be non-executable

2014-09-18 Thread Kees Cook
Adds CONFIG_ARM_KERNMEM_PERMS to separate the kernel memory regions into section-sized areas that can have different permisions. Performs the NX permission changes during free_initmem, so that init memory can be reclaimed. This uses section size instead of PMD size to reduce memory lost to padding