From: Iain Sandoe via lttng-dev <lttng-dev@lists.lttng.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>,
Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
Szabolcs Nagy <szabolcs.nagy@arm.com>,
GCC Development <gcc@gcc.gnu.org>,
libc-alpha@sourceware.org, aburgess@redhat.com,
lttng-dev@lists.lttng.org
Subject: Re: [lttng-dev] New TLS usage in libgcc_s.so.1, compatibility impact
Date: Mon, 15 Jan 2024 15:38:06 +0000 [thread overview]
Message-ID: <4F19001F-1F46-49EC-8A69-11F7CF5017B2@sandoe.co.uk> (raw)
In-Reply-To: <87jzoa6249.fsf@oldenburg.str.redhat.com>
> On 15 Jan 2024, at 15:35, Florian Weimer <fweimer@redhat.com> wrote:
>
> * Carlos O'Donell:
>
>> I agree. TLS should be seen more like .bss/.data rather than something
>> that is allocated with malloc().
>
> There wasn't consensus regarding this in 2014. See below.
>
>> If we leak memory via TLS that is a glibc bug that we can deal with,
>
> This is something that libgcc_s.so.1 does in GCC 14 if the heap
> trampolines are used.
Is there a GCC BZ for this?
(if there is something we should address in GCC, it would be better sooner)
Iain
>> but making it easier to find glibc bugs is also a benefit to the
>> community, but not as valuable a benefit as making TLS correctly
>> async-signal safe.
>>
>> Likewise we need to discuss when the memory is allocated, regardless
>> of which allocator is used, including allocation up-front at dlopen()
>> time.
>>> [1] https://sourceware.org/pipermail/libc-alpha/2014-January/047931.html
>
> The change conflated multiple issues: sanitizer support,
> async-signal-safe TLS access, and eager allocation of all TLS-related
> memory, so that subsequent accesses cannot fail. My impression was the
> main point of contention was eager allocation because it was perceived
> as a breaking semantic change. Nowadays, as long as we are willing to
> maintain both allocator variants, we could offer a choice between them
> controlled by a tunable. For sanitizer compatibility, we could perform
> eager allocation using malloc. It's probably a good idea to do it this
> way anyway because a separate mmap-based allocator would increase TLB
> pressure.
>
> Thanks,
> Florian
>
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
next prev parent reply other threads:[~2024-01-15 15:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-13 12:49 Florian Weimer via lttng-dev
2024-01-15 12:46 ` Szabolcs Nagy via lttng-dev
2024-01-15 13:55 ` Adhemerval Zanella Netto via lttng-dev
2024-01-15 14:47 ` Carlos O'Donell via lttng-dev
2024-01-15 15:35 ` Florian Weimer via lttng-dev
2024-01-15 15:38 ` Iain Sandoe via lttng-dev [this message]
2024-01-15 16:44 ` Florian Weimer via lttng-dev
2024-01-15 16:29 ` Joseph Myers via lttng-dev
2024-01-15 19:05 ` Mathieu Desnoyers via lttng-dev
2024-01-15 19:42 ` Florian Weimer via lttng-dev
2024-01-15 20:08 ` Mathieu Desnoyers via lttng-dev
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=4F19001F-1F46-49EC-8A69-11F7CF5017B2@sandoe.co.uk \
--to=lttng-dev@lists.lttng.org \
--cc=aburgess@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--cc=fweimer@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=iain@sandoe.co.uk \
--cc=libc-alpha@sourceware.org \
--cc=szabolcs.nagy@arm.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