This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [PR libc/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64


On Tue, Aug 11, 2015 at 3:19 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> On Tue, Aug 11, 2015 at 3:01 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, Aug 11, 2015 at 2:39 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
>
>>> It's either
>>> - make TEXTREL binary not run under SELinux, or
>>> - make them run, but crash mysteriously if they have a called IFUNC
>>> resolver in them (or are linked with '-z,now').
>>
>> How about
>>
>> 1. Change ld to disallow TEXTREL with IFUNC and without "-z now'".
>
> That would still fail under SELinux, wouldn't it?
>
> Are you proposing also changing SELinux policy to allow "W+E" if
> DF_BIND_NOW is set?

No.  I am proposing that linker issues an error if there is TEXTREL
with IFUNC unless "-z now'" is used, assuming that this doesn't
require changes to ld.so nor SELinux.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]