Re: [RFC][PATCH] Randomize kernel base address on boot

Ingo Molnar
2011-05-29T12:47:29Z

* H. Peter Anvin <hpa@zytor.com> wrote:

> On 05/28/2011 05:18 AM, Ingo Molnar wrote:
> >
> > Having half a megabyte of '__init buffer' at the beginning or end
> > of the kernel image is no big deal, it's more than enough for
> > good randomization and makes the whole thing image-loader
> > invariant: we can freely shift the 'real' kernel image within
> > this larger boundary without consulting RAM maps.
>
> Sure, but you're also blowing any attempt at PMD alignment to
> kingdom come.

Do you mean we'd not start at a 2MB boundary and thus would waste on
average an about 0.125 worth of huge-TLB cache entry?

That does not look like a very big issue to me - but maybe i'm
missing something and you mean something else.

Thanks,

Ingo