From: Will Newton <will.newton@linaro.org>
To: "Carlos O'Donell" <carlos@redhat.com>
Cc: Roland McGrath <roland@hack.frob.com>,
GNU C Library <libc-alpha@sourceware.org>
Subject: Re: Should glibc be fully reentrant? What do we allow interposed symbols to do?
Date: Thu, 23 Oct 2014 08:23:00 -0000 [thread overview]
Message-ID: <CANu=Dmj-iO6uS8_PKgb=+TiyGau9_ijbJQjPYNFQqP-CKk+PqQ@mail.gmail.com> (raw)
In-Reply-To: <54486800.4040806@redhat.com>
On 23 October 2014 03:29, Carlos O'Donell <carlos@redhat.com> wrote:
> On 10/21/2014 06:47 PM, Roland McGrath wrote:
>> But the slippery slope concerns me most of all.
>
> Any function the user interposes acts as a synchronous interrupt on the
> runtime.
>
> It is my opinion that users expect to be able to call any routine in the
> runtime without caution unless we tell them otherwise.
>
> Given that dlopen locks are recursive, as are stdio locks, I propose we
> fully support this notion that users already believe exists.
>
> The alternative is that we don't support it and treat interposed functions
> as if they were in a signal handler context, only being allowed to call
> async-signal-safe functions, and we might as well remove the recursive
> support from the locks such that users get useful backtraces from deadlocks.
> It is my opinion that such a direction would not help our users and would
> not help the project.
>
> The similar situations we need to clarify are LD_AUDIT modules, and
> IFUNC resolvers, but let us proceed orderly one topic at a time.
>
> In summary
> ==========
>
> Allow interposed functions to call back into the runtime, and fix any
> places where this breaks.
Do you have a plan to fix dlsym similarly? ISTR that pretty reliably
trips on the same issue when used in a malloc hook.
--
Will Newton
Toolchain Working Group, Linaro
next prev parent reply other threads:[~2014-10-23 8:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 20:25 Why does elf/dl-load.c have local_strdup? Carlos O'Donell
2014-10-20 20:41 ` Roland McGrath
2014-10-20 21:19 ` Carlos O'Donell
2014-10-21 22:47 ` Roland McGrath
2014-10-23 2:29 ` Should glibc be fully reentrant? What do we allow interposed symbols to do? Carlos O'Donell
2014-10-23 8:23 ` Will Newton [this message]
2014-10-23 14:40 ` Carlos O'Donell
2014-10-23 16:40 ` Will Newton
2014-10-23 17:10 ` Carlos O'Donell
2014-10-28 12:24 ` Will Newton
2014-10-28 13:32 ` Carlos O'Donell
2014-10-24 9:31 ` Torvald Riegel
2014-10-24 15:25 ` Carlos O'Donell
2014-10-28 17:07 ` Torvald Riegel
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='CANu=Dmj-iO6uS8_PKgb=+TiyGau9_ijbJQjPYNFQqP-CKk+PqQ@mail.gmail.com' \
--to=will.newton@linaro.org \
--cc=carlos@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=roland@hack.frob.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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).