lkml.org 
[lkml]   [2013]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] x86: kernel base offset ASLR
On 04/05/2013 01:01 PM, Yinghai Lu wrote:
> On Thu, Apr 4, 2013 at 1:21 PM, H. Peter Anvin <hpa@zytor.com> wrote:
>> I have to admit to being somewhat skeptical toward KASLR with only 8
>> bits of randomness. There are at least two potential ways of
>> dramatically increasing the available randomness:
>>
>> 1. actually compose the kernel of multiple independently relocatable
>> pieces (maybe chunk it on 2M boundaries or something.)
>>
>> 2. compile the kernel as one of the memory models which can be executed
>> anywhere in the 64-bit address space. The cost of this would have
>> to be quantified, of course.
>
> Why just let bootloader to load kernel on random address instead?
>
> For our 64bit bzImage, boot loader could load kernel to anywhere above 4G.
>

That makes zero difference, since the issue at hand is the *virtual*
addresses the kernel are running at. Currently, the 64-bit kernel
always runs at 0xffffffff81000000 virtual. We can't run out of
arbitrary bits of the 64-bit address space because of the memory model.

Furthermore, dealing with the boot loaders means dealing with the boot
loader maintainers, which can be insanely painful. Consider that Grub2,
10 years after this was implemented, still can't load more than one
initramfs component.

-hpa




\
 
 \ /
  Last update: 2013-04-05 22:41    [W:0.102 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site