mbox series

[0/3] Restartable Sequences enablement

Message ID 20200501021439.2456-1-mathieu.desnoyers@efficios.com
Headers show
Series Restartable Sequences enablement | expand

Message

Mathieu Desnoyers May 1, 2020, 2:14 a.m. UTC
Hi,

Please find the rseq enablement patchset for inclusion into
glibc.

Florian, if you find the patches OK and possibly with a bit of
tweaking of the commit messages, can you please commit them
to glibc ?

Thanks for the feedback!

Mathieu

Mathieu Desnoyers (3):
  glibc: Perform rseq registration at C startup and thread creation
    (v19)
  glibc: sched_getcpu(): use rseq cpu_id TLS on Linux (v7)
  rseq registration tests (v10)

 NEWS                                          |  10 +
 elf/libc_early_init.c                         |   4 +
 manual/threads.texi                           |  66 +++-
 nptl/pthread_create.c                         |  13 +
 sysdeps/generic/rseq-internal.h               |  26 ++
 sysdeps/unix/sysv/linux/Makefile              |  11 +-
 sysdeps/unix/sysv/linux/Versions              |   1 +
 sysdeps/unix/sysv/linux/aarch64/bits/rseq.h   |  43 +++
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |   1 +
 sysdeps/unix/sysv/linux/alpha/libc.abilist    |   1 +
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |   1 +
 sysdeps/unix/sysv/linux/arm/bits/rseq.h       |  83 +++++
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |   1 +
 sysdeps/unix/sysv/linux/bits/rseq.h           |  29 ++
 sysdeps/unix/sysv/linux/csky/libc.abilist     |   1 +
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |   1 +
 sysdeps/unix/sysv/linux/i386/libc.abilist     |   1 +
 sysdeps/unix/sysv/linux/ia64/libc.abilist     |   1 +
 .../sysv/linux/m68k/coldfire/libc.abilist     |   1 +
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |   1 +
 .../sysv/linux/microblaze/be/libc.abilist     |   1 +
 .../sysv/linux/microblaze/le/libc.abilist     |   1 +
 sysdeps/unix/sysv/linux/mips/bits/rseq.h      |  62 ++++
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |   1 +
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |   1 +
 .../sysv/linux/mips/mips64/n32/libc.abilist   |   1 +
 .../sysv/linux/mips/mips64/n64/libc.abilist   |   1 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist    |   1 +
 sysdeps/unix/sysv/linux/powerpc/bits/rseq.h   |  37 ++
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |   1 +
 .../powerpc/powerpc32/nofpu/libc.abilist      |   1 +
 .../linux/powerpc/powerpc64/be/libc.abilist   |   1 +
 .../linux/powerpc/powerpc64/le/libc.abilist   |   1 +
 .../unix/sysv/linux/riscv/rv64/libc.abilist   |   1 +
 sysdeps/unix/sysv/linux/rseq-internal.h       |  73 ++++
 sysdeps/unix/sysv/linux/rseq-sym.c            |  26 ++
 sysdeps/unix/sysv/linux/s390/bits/rseq.h      |  37 ++
 .../unix/sysv/linux/s390/s390-32/libc.abilist |   1 +
 .../unix/sysv/linux/s390/s390-64/libc.abilist |   1 +
 sysdeps/unix/sysv/linux/sched_getcpu.c        |  27 +-
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |   1 +
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |   1 +
 .../sysv/linux/sparc/sparc32/libc.abilist     |   1 +
 .../sysv/linux/sparc/sparc64/libc.abilist     |   1 +
 sysdeps/unix/sysv/linux/sys/rseq.h            | 207 +++++++++++
 sysdeps/unix/sysv/linux/tst-rseq-nptl.c       | 338 ++++++++++++++++++
 sysdeps/unix/sysv/linux/tst-rseq.c            | 108 ++++++
 sysdeps/unix/sysv/linux/x86/bits/rseq.h       |  30 ++
 .../unix/sysv/linux/x86_64/64/libc.abilist    |   1 +
 .../unix/sysv/linux/x86_64/x32/libc.abilist   |   1 +
 50 files changed, 1253 insertions(+), 8 deletions(-)
 create mode 100644 sysdeps/generic/rseq-internal.h
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/bits/rseq.h
 create mode 100644 sysdeps/unix/sysv/linux/arm/bits/rseq.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/rseq.h
 create mode 100644 sysdeps/unix/sysv/linux/mips/bits/rseq.h
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/rseq.h
 create mode 100644 sysdeps/unix/sysv/linux/rseq-internal.h
 create mode 100644 sysdeps/unix/sysv/linux/rseq-sym.c
 create mode 100644 sysdeps/unix/sysv/linux/s390/bits/rseq.h
 create mode 100644 sysdeps/unix/sysv/linux/sys/rseq.h
 create mode 100644 sysdeps/unix/sysv/linux/tst-rseq-nptl.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-rseq.c
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/rseq.h

Comments

Florian Weimer May 20, 2020, 11:44 a.m. UTC | #1
* Mathieu Desnoyers via Libc-alpha:

> Florian, if you find the patches OK and possibly with a bit of
> tweaking of the commit messages, can you please commit them
> to glibc ?

I had some final review comments, and I found a real bug: the uptr
changes in <sys/rseq.h> are problematic.

What do others think about the level of testing and documentation in
these patches?

Thanks,
Florian
Mathieu Desnoyers May 25, 2020, 1:52 p.m. UTC | #2
----- On May 20, 2020, at 7:44 AM, Florian Weimer fweimer@redhat.com wrote:

> * Mathieu Desnoyers via Libc-alpha:
> 
>> Florian, if you find the patches OK and possibly with a bit of
>> tweaking of the commit messages, can you please commit them
>> to glibc ?
> 
> I had some final review comments, and I found a real bug: the uptr
> changes in <sys/rseq.h> are problematic.

Hi Florian,

Can you share what issue you have found with the uptr changes ?

Thanks,

Mathieu

> 
> What do others think about the level of testing and documentation in
> these patches?
> 
> Thanks,
> Florian
Florian Weimer May 25, 2020, 2:28 p.m. UTC | #3
* Mathieu Desnoyers:

> ----- On May 20, 2020, at 7:44 AM, Florian Weimer fweimer@redhat.com wrote:
>
>> * Mathieu Desnoyers via Libc-alpha:
>> 
>>> Florian, if you find the patches OK and possibly with a bit of
>>> tweaking of the commit messages, can you please commit them
>>> to glibc ?
>> 
>> I had some final review comments, and I found a real bug: the uptr
>> changes in <sys/rseq.h> are problematic.
>
> Hi Florian,
>
> Can you share what issue you have found with the uptr changes ?

I thought I had written about something here:

<https://sourceware.org/pipermail/libc-alpha/2020-May/114142.html>

But it's not very explicit.  I must have deleted it before sending it.

The problem is that you made substantial changes to the fallback
definitions compared to the kernel version.  But those will never be
used if the user has the appropriate kernel headers installed.  The
fallback part really has to be an almost-verbatim copy of the kernel
definitions.

Thanks,
Florian