Re: [PATCH v9 5/5] x86/KASLR: Allow randomization below load address

From: Yinghai Lu
Date: Fri Jun 17 2016 - 14:45:04 EST


On Fri, Jun 17, 2016 at 8:44 AM, Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>>
>> There's no explanation in the code or in the changelog of why 512M was picked as
>> the lower limit.
>
> Yinghai, do you have a rationale for this selection? I understood it
> to just be a very conservative target to avoid anything in low
> physical memory, but perhaps there is a better reason?

when kernel is not loaded high at first, then *output should be 16M or so,
so no change.

when kernel is loaded high to save the low address space, don't want to
KASL to pull back to low address again.
If choose 4G, on 4G+512M config, when kernel is loaded high, kasl may
not work to chose range from 4G.
so I choose 512M, just stay away range for KERNEL_IMAGE_SIZE.

Thanks

Yinghai