lkml.org 
[lkml]   [2021]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlibrseq: update to support upcoming glibc 2.35
Hi,

I've made a few updates to librseq to support the upcoming glibc 2.35.
My goal is to provide rseq support when linked against older glibc
(without rseq support) and use glibc's rseq registration when it is
available.

In order to achieve this, librseq now exposes 3 symbols:

- rseq_offset,
- rseq_size,
- rseq_flags.

It looks up for glibc's __rseq_offset, __rseq_size, and __rseq_flags
symbols in its library constructor with dlsym(3). If those are found,
then their values are copied into the variables exposed by librseq's
public symbols. Else, if glibc symbols are not found, librseq rely on
an initial-exec model TLS to keep its rseq per-thread ABI. It relies
on the fact that a initial-exec model TLS has a constant offset from the
thread pointer.

librseq's public headers now use librseq's own rseq_offset, rseq_size, and
rseq_flags symbols.

You can find the development branch implementing this here:

https://github.com/compudj/librseq/tree/prep-glibc-2.35

After we agree on the approach, I plan to upstream this code into the
Linux kernel selftests so they become compatible with glibc-2.35.

Comments are welcome.

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

\
 
 \ /
  Last update: 2021-12-13 22:48    [W:0.051 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site