Re: [RFC][PATCH] Randomize kernel base address on boot
From: Ingo Molnar
Date: Tue May 31 2011 - 15:56:15 EST
* Dan Rosenberg <drosenberg@xxxxxxxxxxxxx> wrote:
> Just for the record, I've put this patch on hold until there's some
> more consensus about whether boot-time randomization of the
> physical kernel address is the best approach. [...]
Well, if you use the suggestion i made: to skip the e820 map fiddling
altogether and just allocate half a megabyte of 'hole' at the end of
the kernel image - which would allow the kernel to be randomized
freely upwards by 0-128 pages - then the 'dynamic' versus 'static'
solution could be used at once!
The 'static' method would use the same hole, just at install time,
while the 'dynamic' method would use it during bootup.
Also, if this method is used then most of the controversy about the
dynamic approach goes away (which was the memory maps interpretation
fragility).
Your last patch would need only minor modifications to get the hole
added: you'd need to add the tail-hole in the linker map:
arch/x86/kernel/vmlinux.lds.S
So ... could you *please* not shelf this idea just because people
used lkml for what it was invented: argued with each other rather
forcefully? :-)
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/