This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH] glibc: Perform rseq(2) registration at nptl init and thread creation
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Mathieu Desnoyers <mathieu dot desnoyers at efficios dot com>
- Cc: carlos <carlos at redhat dot com>, Florian Weimer <fweimer at redhat dot com>, 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>, libc-alpha <libc-alpha at sourceware dot org>, linux-kernel <linux-kernel at vger dot kernel dot org>, linux-api <linux-api at vger dot kernel dot org>
- Date: Thu, 20 Sep 2018 20:20:28 +0000
- Subject: Re: [RFC PATCH] glibc: Perform rseq(2) registration at nptl init and thread creation
- References: <20180919144438.1066-1-mathieu.desnoyers@efficios.com> <alpine.DEB.2.21.1809191630260.26757@digraph.polyomino.org.uk> <67473000.8399.1537375994645.JavaMail.zimbra@efficios.com> <alpine.DEB.2.21.1809191706090.26757@digraph.polyomino.org.uk> <1619649568.9014.1537474457166.JavaMail.zimbra@efficios.com>
On Thu, 20 Sep 2018, Mathieu Desnoyers wrote:
> Are you saying glibc has an explicit check for the kernel version visible
> from /proc before using specific features ? If so, how can this work with
> the variety of feature backports we find in the distribution kernels out
> there ?
See sysdeps/unix/sysv/linux/dl-sysdep.c and
sysdeps/unix/sysv/linux/dl-osinfo.h. As I said, Carlos has proposed
removing that check.
> For too-old headers at compile time, one possibility is that we don't event
> expose the __rseq_abi TLS symbol. OTOH, if we need to keep exposing it anyway
> for ABI consistency purposes, then we'd leave its cpu_id field at the initial
> value (-1). But that would require that we copy linux/rseq.h into the glibc
> source tree.
The ABI needs to be independent of the kernel headers used. I don't think
you need to copy linux/rseq.h; all you should need is to e.g. define an
array of suitable size and alignment with the relevant member initialized
and a suitable explanatory comment.
--
Joseph S. Myers
joseph@codesourcery.com