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][v2] Add dynamic linker support for $EXEC_ORIGIN.


On 25/10/17 16:13, Paul Pluzhnikov wrote:
> On Wed, Oct 25, 2017 at 12:41 AM, Brooks Moses <bmoses@google.com> wrote:
>>
>> On Wed, Oct 25, 2017 at 12:39 AM, Andreas Schwab <schwab@suse.de> wrote:
>>> On Okt 24 2017, Benjamin Peterson <bp@benjamin.pe> wrote:
>>>> Would $SYMBOLIC_ORIGIN be bettter?
>>>
>>> Yes, that looks better.
>>
>> Works for me; I'll include that change in my updated patch.
> 
> <bikeshed>
> 
> As far as I can tell, there is nothing "symbolic" about this token, so
> I don't think "SYMBOLIC" is any better than "EXEC". Maybe call it
> "EXECFN_ORIGIN", "AT_EXECFN_ORIGIN", or "UNRESOLVED_PATH_ORIGIN" ?
> 
> </bikeshed>
> 

AT_EXECFN_ORIGIN only makes sense if you really want
to tie this elf extension to linux AT_EXECFN behaviour
(e.g. in case of fexecve it's nonsense)

UNRESOLVED_PATH_ORIGIN makes more sense to me.
(it may be possible to propose as a sys v abi update)

but i think the semantics is a bit clunky, e.g. it breaks
the symbolic link to executable use case which otherwise
works on posix.

and Rich Felker notes that it can be hacked around
without elf changes using wrapper scripts like

exec /lib/ld-linux.so.2 --library-path /path/with/dso/symlinks /path/to/exe "$@"


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