public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Siddhesh Poyarekar <siddhesh@gotplt.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v4 3/3] elf: Rework exception handling in the dynamic loader [BZ #25486]
Date: Thu, 27 Oct 2022 11:46:48 +0200	[thread overview]
Message-ID: <87r0ytr43b.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <8d6eae6a-0729-6cd5-961e-b9a43297f51c@gotplt.org> (Siddhesh Poyarekar's message of "Wed, 26 Oct 2022 16:34:30 -0400")

* Siddhesh Poyarekar:

>> +/* Multiple threads at once can use the `_dl_catch_error' function.
>> +   The calls can come from `_dl_map_object_deps', `_dlerror_run', or
>> +   from any of the libc functionality which loads dynamic objects
>> +   (NSS, iconv).  Therefore we have to be prepared to save the state
>> +   in thread-local memory.  We use THREAD_GETMEM and THREAD_SETMEM
>> +   instead of ELF TLS because it exception handling must work before
>
> s/ it//

There are other issues with the comment, I changed it to:

/* Multiple threads at once can use the `_dl_catch_error' function.
   The calls can come from `_dl_map_object_deps', `_dlerror_run', or
   from any of the libc functionality which loads dynamic objects
   (NSS, iconv).  Therefore we have to be prepared to save the state
   in thread-local memory.  We use THREAD_GETMEM and THREAD_SETMEM
   instead of ELF TLS because ELF TLS is not available in the dynamic
   loader.  Additionally, the exception handling mechanism must be
   usable before the TCB has been set up, which is why
   rtld_catch_notls is used if !__rtld_tls_init_tp_called.  This is
   not needed for static builds, where initialization completes before
   static dlopen etc. can be called.  */

>> -libc_hidden_def (_dl_signal_error)
>> +rtld_hidden_def (_dl_signal_error)
>>   +#if IS_IN (rtld)
>> +/* This points to a function which is called when an continuable error is
>
> s/an/a/

Fixed.

I'll repost after re-testing.

Thanks,
Florian


      reply	other threads:[~2022-10-27  9:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 12:26 [PATCH v4 0/3] " Florian Weimer
2022-08-29 12:26 ` [PATCH v4 1/3] ld.so: Export tls_init_tp_called as __rtld_tls_init_tp_called Florian Weimer
2022-10-26 20:34   ` Siddhesh Poyarekar
2022-08-29 12:26 ` [PATCH v4 2/3] scripts/localplt.awk: Handle DT_JMPREL with empty PLT (for C-SKY) Florian Weimer
2022-10-26 20:34   ` Siddhesh Poyarekar
2022-08-29 12:27 ` [PATCH v4 3/3] elf: Rework exception handling in the dynamic loader [BZ #25486] Florian Weimer
2022-10-26 20:34   ` Siddhesh Poyarekar
2022-10-27  9:46     ` Florian Weimer [this message]

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=87r0ytr43b.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=siddhesh@gotplt.org \
    /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).