* Kees Cook <keesc...@chromium.org> wrote:

> +config RANDOMIZE_BASE_MAX_OFFSET
> +     hex "Maximum ASLR offset allowed"
> +     depends on RANDOMIZE_BASE
> +     default "0x10000000"
> +     range 0x0 0x10000000
> +     ---help---
> +      Determines the maximal offset in bytes that will be applied to the
> +      kernel when Address Space Layout Randomization (ASLR) is active.
> +      Physical memory layout and kernel size may limit this further.
> +      This must be a power of two.

I'm not sure this configuration option should be exposed. Is there any 
reason that if the feature is enabled, to not set this to the highest 
possible value?

Furthermore, when randomization is enabled, I'd suggest to default 
kptr_restrict to 1 [if the user does not override it] - currently the 
bootup default is 0.

I.e. make it easy to enable effective KASLR with a single configuration 
step, without "forgot about kptr_restrict" gotchas.

I'd also suggest to rename RANDOMIZE_BASE to something like 
RANDOMIZE_KBASE. The 'kbase' makes it really clear that this is about some 
kernel base address randomization.

'Randomize base' sounds too generic, and could be misunderstood to mean 
something about our random pool for example.

Thanks,

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to