mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] make relocation time symbol lookup and dlsym consistent
Date: Mon, 12 Aug 2019 18:26:38 -0400	[thread overview]
Message-ID: <20190812222638.GZ9017@brightrain.aerifal.cx> (raw)
In-Reply-To: <20190810231811.GK22009@port70.net>

On Sun, Aug 11, 2019 at 01:18:11AM +0200, Szabolcs Nagy wrote:
> rebased the old patch.
> 
> changed a bit to avoid performance concerns.

> >From a57cd35acf26ba6202ed6534a57f496464f431a1 Mon Sep 17 00:00:00 2001
> From: Szabolcs Nagy <nsz@port70.net>
> Date: Sat, 10 Aug 2019 23:14:40 +0000
> Subject: [PATCH] make relocation time symbol lookup and dlsym consistent
> 
> Using common code path for all symbol lookups fixes three dlsym issues:
> 
> - st_shndx of STT_TLS symbols were not checked and thus an undefined
>   tls symbol reference could be incorrectly treated as a definition
>   (the sysv hash lookup returns undefined symbols, gnu does not, so should
>   be rare in practice).
> 
> - symbol binding was not checked so a hidden symbol may be returned
>   (in principle STB_LOCAL symbols may appear in the dynamic symbol table
>   for hidden symbols, but linkers most likely don't produce it).
> 
> - mips specific behaviour was not applied (ARCH_SYM_REJECT_UND) so
>   undefined symbols may be returned on mips.
> 
> always_inline is used to avoid relocation performance regression, the
> code generation for find_sym should not be affected.
> ---
>  ldso/dynlink.c | 84 +++++++++++++++++++-------------------------------
>  1 file changed, 31 insertions(+), 53 deletions(-)

Thanks for rebasing this! Applying.

Rich


  reply	other threads:[~2019-08-12 22:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-10 23:18 Szabolcs Nagy
2019-08-12 22:26 ` Rich Felker [this message]
2019-08-13  8:38 ` Szabolcs Nagy
2019-08-13 14:24   ` Rich Felker
2019-08-13 15:01     ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190812222638.GZ9017@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).