[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 2 Feb 2022 06:36:44 -0500 (EST)
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Florian Weimer <fweimer@...hat.com>
Cc: Chris Kennelly <ckennelly@...gle.com>,
Paul Turner <pjt@...gle.com>, Peter Oskolkov <posk@...k.io>,
libc-alpha <libc-alpha@...rceware.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: Aligning tcmalloc with glibc 2.35 rseq ABI
----- On Feb 2, 2022, at 3:41 AM, Florian Weimer fweimer@...hat.com wrote:
> * Florian Weimer:
>
>> * Chris Kennelly:
>>
>>> Thanks for the heads up.
>>>
>>> I did have a question about whether the new protocol would introduce
>>> an extra memory reference while initializing a critical section.
>>>
>>> * With initial-exec TLS, I can directly reference __rseq_abi.
>>> * With the new ABI, I might need to ask glibc for the address of the
>>> registered rseq structure in its thread data.
>>
>> You can write __rseq_offset to a static/hidden variable in an ELF
>> constructor, and then use pretty much the same assembler sequences as
>> for initial-exec TLS on most architectures.
>
> And now I'm kind of worried that we should be using ptrdiff_t for
> __rseq_offset because that's what the initial-exec relocations use. 8-/
I suspect the underlying question here is: how likely is it that a libc
requires an offset of more than 2GB either way from the thread pointer
to allocate its rseq thread area on a 64-bit architecture ?
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Powered by blists - more mailing lists