Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread H. Peter Anvin
On 02/21/2014 01:27 PM, Andrew Morton wrote: > On Fri, 21 Feb 2014 13:18:26 -0800 "H. Peter Anvin" wrote: > >> On 02/21/2014 01:15 PM, Andrew Morton wrote: I've been slapped down for adding more config options in the past, and I think it's unlikely that people using

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread Andrew Morton
On Fri, 21 Feb 2014 13:18:26 -0800 "H. Peter Anvin" wrote: > On 02/21/2014 01:15 PM, Andrew Morton wrote: > >> > >> I've been slapped down for adding more config options in the past, and > >> I think it's unlikely that people using CONFIG_RANDOMIZE_BASE won't > >> want the modules base

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread Kees Cook
On Fri, Feb 21, 2014 at 1:15 PM, Andrew Morton wrote: > On Fri, 21 Feb 2014 13:05:08 -0800 Kees Cook wrote: > >> >> +#ifdef CONFIG_RANDOMIZE_BASE >> >> +static unsigned long module_load_offset; >> >> +static int randomize_modules = 1; >> > >> > It's pretty common for people to later come back

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread H. Peter Anvin
On 02/21/2014 01:15 PM, Andrew Morton wrote: >> >> I've been slapped down for adding more config options in the past, and >> I think it's unlikely that people using CONFIG_RANDOMIZE_BASE won't >> want the modules base randomized too. I think this is a safe default, >> but if you see it as a

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread H. Peter Anvin
On 02/21/2014 01:05 PM, Kees Cook wrote: > > I've been slapped down for adding more config options in the past, and > I think it's unlikely that people using CONFIG_RANDOMIZE_BASE won't > want the modules base randomized too. I think this is a safe default, > but if you see it as a requirement, I

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread Andrew Morton
On Fri, 21 Feb 2014 13:05:08 -0800 Kees Cook wrote: > >> +#ifdef CONFIG_RANDOMIZE_BASE > >> +static unsigned long module_load_offset; > >> +static int randomize_modules = 1; > > > > It's pretty common for people to later come back and say "hey I want to > > set the default in Kconfig". Perhaps

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread Kees Cook
On Fri, Feb 21, 2014 at 12:36 PM, Andrew Morton wrote: > On Fri, 21 Feb 2014 12:21:10 -0800 Kees Cook wrote: > >> From: Andy Honig >> >> Randomize the load address of modules in the kernel to make kASLR >> effective for modules. Modules can only be loaded within a particular >> range of

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread Andrew Morton
On Fri, 21 Feb 2014 12:21:10 -0800 Kees Cook wrote: > From: Andy Honig > > Randomize the load address of modules in the kernel to make kASLR > effective for modules. Modules can only be loaded within a particular > range of virtual address space. This patch adds 10 bits of entropy to > the

[PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread Kees Cook
From: Andy Honig Randomize the load address of modules in the kernel to make kASLR effective for modules. Modules can only be loaded within a particular range of virtual address space. This patch adds 10 bits of entropy to the load address by adding 1-1024 * PAGE_SIZE to the beginning range

[PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread Kees Cook
From: Andy Honig aho...@google.com Randomize the load address of modules in the kernel to make kASLR effective for modules. Modules can only be loaded within a particular range of virtual address space. This patch adds 10 bits of entropy to the load address by adding 1-1024 * PAGE_SIZE to the

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread Andrew Morton
On Fri, 21 Feb 2014 12:21:10 -0800 Kees Cook keesc...@chromium.org wrote: From: Andy Honig aho...@google.com Randomize the load address of modules in the kernel to make kASLR effective for modules. Modules can only be loaded within a particular range of virtual address space. This patch

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread Kees Cook
On Fri, Feb 21, 2014 at 12:36 PM, Andrew Morton a...@linux-foundation.org wrote: On Fri, 21 Feb 2014 12:21:10 -0800 Kees Cook keesc...@chromium.org wrote: From: Andy Honig aho...@google.com Randomize the load address of modules in the kernel to make kASLR effective for modules. Modules can

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread Andrew Morton
On Fri, 21 Feb 2014 13:05:08 -0800 Kees Cook keesc...@chromium.org wrote: +#ifdef CONFIG_RANDOMIZE_BASE +static unsigned long module_load_offset; +static int randomize_modules = 1; It's pretty common for people to later come back and say hey I want to set the default in Kconfig.

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread H. Peter Anvin
On 02/21/2014 01:05 PM, Kees Cook wrote: I've been slapped down for adding more config options in the past, and I think it's unlikely that people using CONFIG_RANDOMIZE_BASE won't want the modules base randomized too. I think this is a safe default, but if you see it as a requirement, I can

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread H. Peter Anvin
On 02/21/2014 01:15 PM, Andrew Morton wrote: I've been slapped down for adding more config options in the past, and I think it's unlikely that people using CONFIG_RANDOMIZE_BASE won't want the modules base randomized too. I think this is a safe default, but if you see it as a requirement, I

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread Kees Cook
On Fri, Feb 21, 2014 at 1:15 PM, Andrew Morton a...@linux-foundation.org wrote: On Fri, 21 Feb 2014 13:05:08 -0800 Kees Cook keesc...@chromium.org wrote: +#ifdef CONFIG_RANDOMIZE_BASE +static unsigned long module_load_offset; +static int randomize_modules = 1; It's pretty common for

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread Andrew Morton
On Fri, 21 Feb 2014 13:18:26 -0800 H. Peter Anvin h...@zytor.com wrote: On 02/21/2014 01:15 PM, Andrew Morton wrote: I've been slapped down for adding more config options in the past, and I think it's unlikely that people using CONFIG_RANDOMIZE_BASE won't want the modules base randomized

Re: [PATCH] x86, kaslr: randomize module base load address

2014-02-21 Thread H. Peter Anvin
On 02/21/2014 01:27 PM, Andrew Morton wrote: On Fri, 21 Feb 2014 13:18:26 -0800 H. Peter Anvin h...@zytor.com wrote: On 02/21/2014 01:15 PM, Andrew Morton wrote: I've been slapped down for adding more config options in the past, and I think it's unlikely that people using