All of lore.kernel.org
 help / color / mirror / Atom feed
* librseq: update to support upcoming glibc 2.35
@ 2021-12-13 21:47 Mathieu Desnoyers
  2021-12-14  9:06 ` Florian Weimer
  0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Desnoyers @ 2021-12-13 21:47 UTC (permalink / raw)
  To: Florian Weimer
  Cc: libc-alpha, Peter Zijlstra, paulmck, Boqun Feng, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: librseq: update to support upcoming glibc 2.35
  2021-12-13 21:47 librseq: update to support upcoming glibc 2.35 Mathieu Desnoyers
@ 2021-12-14  9:06 ` Florian Weimer
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2021-12-14  9:06 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: libc-alpha, Peter Zijlstra, paulmck, Boqun Feng, linux-kernel

* Mathieu Desnoyers:

> You can find the development branch implementing this here:
>
> https://github.com/compudj/librseq/tree/prep-glibc-2.35

I had a brief look at it and it seems okay.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-14  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 21:47 librseq: update to support upcoming glibc 2.35 Mathieu Desnoyers
2021-12-14  9:06 ` Florian Weimer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.