lkml.org 
[lkml]   [2013]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] binfmt_elf: fix PIE load with randomization disabled
From
On Wed, Dec 11, 2013 at 5:36 AM, Jiri Kosina <jkosina@suse.cz> wrote:
> On Mon, 9 Dec 2013, H.J. Lu wrote:
>
>> >> so that he could load his program compiled as PIE above 4GB.
>> >> If kernel is changed not to honor it, his program won't work any more.
>> >> In normal case, PIE has zero vaddr and this doesn't apply.
>> >>
>> >
>> > That doesn't seem to be PIE at all, and if it is PIE, then it should be
>> > relocatable (I agree btw with randomizing upward from the selected address.)
>>
>> Kernel can consider PIE with non-zero vaddr isn't real PIE.
>
> Why?
>
> I still think PIE with non-zero vaddr should be randomized by putting
> random offset to the vaddr. Don't you think so? Why?
>

When -Ttext-segment=XXX is used, the program is expected to
load at XXX, regardless -pie is used or not. I will change the
linker to set type to ET_EXEC in this case so that it will be
independent of kernel.


--
H.J.


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