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 C startup and thread creation (v6)
- 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>, 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: Tue, 29 Jan 2019 21:56:18 +0000
- Subject: Re: [RFC PATCH glibc 1/4] glibc: Perform rseq(2) registration at C startup and thread creation (v6)
- References: <20190121213530.23803-1-mathieu.desnoyers@efficios.com> <632671842.3079.1548781059601.JavaMail.zimbra@efficios.com>
On Tue, 29 Jan 2019, Mathieu Desnoyers wrote:
> I recalled that aarch64 defines RSEQ_SIG to a different value which maps to
> a valid trap instruction. So I plan to move the RSEQ_SIG define to per-arch
> headers like this:
>
> sysdeps/unix/sysv/linux/aarch64/bits/rseq.h | 24 ++
> sysdeps/unix/sysv/linux/arm/bits/rseq.h | 24 ++
> sysdeps/unix/sysv/linux/bits/rseq.h | 23 ++
> sysdeps/unix/sysv/linux/mips/bits/rseq.h | 24 ++
> sysdeps/unix/sysv/linux/powerpc/bits/rseq.h | 24 ++
> sysdeps/unix/sysv/linux/s390/bits/rseq.h | 24 ++
> sysdeps/unix/sysv/linux/x86/bits/rseq.h | 24 ++
>
> where "bits/rseq.h" contains a #error:
>
> # error "Architecture does not define RSEQ_SIG.
>
> sys/rseq.h will now include <bits/rseq.h>.
We're trying to reduce the number of cases where most or all new glibc
architecture ports need to provide a bits/ header, by making the generic
headers handle the common case. So a generic header with a #error, and
lots of architecture-specific headers mostly with the same value for
RSEQ_SIG, seems unfortunate. I'd hope the generic header could use a
generic value, with architecture-specific variants only for architectures
with some reason for a different value.
--
Joseph S. Myers
joseph@codesourcery.com