lkml.org 
[lkml]   [2013]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86, relocs: move ELF relocation handling to C
From
On Tue, Jun 11, 2013 at 11:27 PM, Pekka Enberg <penberg@kernel.org> wrote:
> Hello Kees,
>
> On Tue, Jun 11, 2013 at 9:58 PM, Kees Cook <keescook@chromium.org> wrote:
>> Moves the relocation handling into C, after decompression. This requires
>> that the decompressed size is passed to the decompression routine as
>> well so that relocations can be found. Only kernels that need relocation
>> support will use the code.
>>
>> Based on work by Neill Clift and Michael Davidson.
>>
>> Signed-off-by: Kees Cook <keescook@chromium.org>
>
> How does the kernel benefit from this? Are there problems with the current
> assembly code? Are you planning to improve the relocation code?

Yes, this is continuing the work needed for 64-bit relocations,
ultimately needed by KASLR. As part of the work, I was asked to move
the relocation logic from assembly into C. Doing this means that there
isn't any need for duplicating the logic in the 64-bit path (e.g.
head_64.S).

Since the other relocation work is already in the tree, I wanted to
get these last two pieces in (one was a fix for the __vvar_page --
separate patch, the other is this one, allowing 64-bit relocations to
operate while also moving the logic into C).

-Kees

--
Kees Cook
Chrome OS Security


\
 
 \ /
  Last update: 2013-06-12 19:01    [W:0.077 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site