This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH glibc 1/4] glibc: Perform rseq(2) registration at nptl init and thread creation (v4)
- From: Mathieu Desnoyers <mathieu dot desnoyers at efficios dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: carlos <carlos at redhat dot com>, Joseph Myers <joseph at codesourcery dot com>, Szabolcs Nagy <szabolcs dot nagy at arm dot com>, libc-alpha <libc-alpha at sourceware dot org>, Thomas Gleixner <tglx at linutronix dot de>, Ben Maurer <bmaurer at fb dot com>, Peter Zijlstra <peterz at infradead dot org>, "Paul E. McKenney" <paulmck at linux dot vnet dot ibm dot com>, Boqun Feng <boqun dot feng at gmail dot com>, Will Deacon <will dot deacon at arm dot com>, Dave Watson <davejwatson at fb dot com>, Paul Turner <pjt at google dot com>, Rich Felker <dalias at libc dot org>, linux-kernel <linux-kernel at vger dot kernel dot org>, linux-api <linux-api at vger dot kernel dot org>
- Date: Mon, 14 Jan 2019 14:22:37 -0500 (EST)
- Subject: Re: [RFC PATCH glibc 1/4] glibc: Perform rseq(2) registration at nptl init and thread creation (v4)
- Dkim-filter: OpenDKIM Filter v2.10.3 mail.efficios.com 005BCA3FDD
- References: <20181204192141.4684-1-mathieu.desnoyers@efficios.com> <87h8fkz6qx.fsf@oldenburg2.str.redhat.com> <1681283664.1380.1547152315426.JavaMail.zimbra@efficios.com> <87fttv9iic.fsf@oldenburg2.str.redhat.com>
----- On Jan 14, 2019, at 10:55 AM, Florian Weimer fweimer@redhat.com wrote:
> * Mathieu Desnoyers:
>
>> Therefore, both symbols will end up in
>> sysdeps/unix/sysv/linux/Versions.
>
> I'm not sure what you mean by that. The physical location in the
> directory tree has little effect on which shared object the symbol is
> placed in; that will need other changes.
I'm currently moving the symbol definitions to csu/rseq-sym.c. On Linux,
its content is overridden by a new sysdeps/unix/sysv/linux/rseq-sym.c
which contains both __rseq_abi and __rseq_refcount symbols. On other
platforms, it is a stub file.
>>> By the way, you could avoid the need for unregistration if you allocated
>>> the rseq areas persistently, index by TID. They are quite small, so
>>> with the typical PID range, maybe the wasted memory due to changing TIDs
>>> would be acceptable?
>>
>> Would we be able to access those __rseq_abi as normal TLS IE model
>> variables ? The overhead of indexing an array matters for a
>> fast-path.
>
> No, that wouldn't be possible in this case. You would need another
> indirection.
Thanks for the clarification!
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com