lkml.org 
[lkml]   [2018]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] glibc: Perform rseq(2) registration at nptl init and thread creation
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

\
 
 \ /
  Last update: 2018-09-20 22:20    [W:0.052 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site