mbox series

[0/5] Restartable Sequences support for glibc 2.30

Message ID 20190503184219.19266-1-mathieu.desnoyers@efficios.com
Headers show
Series Restartable Sequences support for glibc 2.30 | expand

Message

Mathieu Desnoyers May 3, 2019, 6:42 p.m. UTC
Hi,

This patchset implements basic support for the "rseq" Linux system call
in glibc by registering the rseq TLS abi.

One patch in this series modifies sched_getcpu() to speed up reading the
current CPU number by reading __rseq_abi.cpu_id when rseq is available.

This round takes care of the few comments received in the previous one.

Please consider for inclusion into glibc,

Thanks,

Mathieu

Mathieu Desnoyers (5):
  glibc: Perform rseq(2) registration at C startup and thread creation
    (v10)
  glibc: sched_getcpu(): use rseq cpu_id TLS on Linux (v4)
  support record failure: allow use from constructor
  support: implement xpthread key create/delete (v2)
  rseq registration tests (v4)

 ChangeLog                                     |  66 ++++
 NEWS                                          |  15 +
 csu/libc-start.c                              |  14 +-
 misc/rseq-internal.h                          |  38 ++
 nptl/pthread_create.c                         |   9 +
 support/Makefile                              |   2 +
 support/check.h                               |   4 +
 support/support_record_failure.c              |  18 +-
 support/xpthread_key_create.c                 |  25 ++
 support/xpthread_key_delete.c                 |  24 ++
 support/xthread.h                             |   2 +
 sysdeps/unix/sysv/linux/Makefile              |   8 +-
 sysdeps/unix/sysv/linux/Versions              |   4 +
 sysdeps/unix/sysv/linux/aarch64/bits/rseq.h   |  43 ++
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |   2 +
 sysdeps/unix/sysv/linux/alpha/libc.abilist    |   2 +
 sysdeps/unix/sysv/linux/arm/libc.abilist      |   2 +
 sysdeps/unix/sysv/linux/bits/rseq.h           |  29 ++
 sysdeps/unix/sysv/linux/csky/libc.abilist     |   2 +
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |   2 +
 sysdeps/unix/sysv/linux/i386/libc.abilist     |   2 +
 sysdeps/unix/sysv/linux/ia64/libc.abilist     |   2 +
 .../sysv/linux/m68k/coldfire/libc.abilist     |   2 +
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |   2 +
 .../unix/sysv/linux/microblaze/libc.abilist   |   2 +
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |   2 +
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |   2 +
 .../sysv/linux/mips/mips64/n32/libc.abilist   |   2 +
 .../sysv/linux/mips/mips64/n64/libc.abilist   |   2 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist    |   2 +
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |   2 +
 .../powerpc/powerpc32/nofpu/libc.abilist      |   2 +
 .../linux/powerpc/powerpc64/be/libc.abilist   |   2 +
 .../linux/powerpc/powerpc64/le/libc.abilist   |   2 +
 .../unix/sysv/linux/riscv/rv64/libc.abilist   |   2 +
 sysdeps/unix/sysv/linux/rseq-internal.h       |  88 +++++
 sysdeps/unix/sysv/linux/rseq-sym.c            |  63 +++
 sysdeps/unix/sysv/linux/s390/bits/rseq.h      |  30 ++
 .../unix/sysv/linux/s390/s390-32/libc.abilist |   2 +
 .../unix/sysv/linux/s390/s390-64/libc.abilist |   2 +
 sysdeps/unix/sysv/linux/sched_getcpu.c        |  24 +-
 sysdeps/unix/sysv/linux/sh/libc.abilist       |   2 +
 .../sysv/linux/sparc/sparc32/libc.abilist     |   2 +
 .../sysv/linux/sparc/sparc64/libc.abilist     |   2 +
 sysdeps/unix/sysv/linux/sys/rseq.h            |  50 +++
 sysdeps/unix/sysv/linux/tst-rseq-nptl.c       | 367 ++++++++++++++++++
 sysdeps/unix/sysv/linux/tst-rseq.c            | 114 ++++++
 sysdeps/unix/sysv/linux/x86/bits/rseq.h       |  30 ++
 .../unix/sysv/linux/x86_64/64/libc.abilist    |   2 +
 .../unix/sysv/linux/x86_64/x32/libc.abilist   |   2 +
 50 files changed, 1107 insertions(+), 14 deletions(-)
 create mode 100644 misc/rseq-internal.h
 create mode 100644 support/xpthread_key_create.c
 create mode 100644 support/xpthread_key_delete.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/bits/rseq.h
 create mode 100644 sysdeps/unix/sysv/linux/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

Mathieu Desnoyers May 20, 2019, 3:24 p.m. UTC | #1
----- On May 3, 2019, at 2:42 PM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote:

> Hi,
> 
> This patchset implements basic support for the "rseq" Linux system call
> in glibc by registering the rseq TLS abi.
> 
> One patch in this series modifies sched_getcpu() to speed up reading the
> current CPU number by reading __rseq_abi.cpu_id when rseq is available.
> 
> This round takes care of the few comments received in the previous one.
> 
> Please consider for inclusion into glibc,

Hi Carlos,

Is there anything else missing on your end with respect to this patchset ?

The associated Linux selftests updates were merged in Linux 5.2-rc1.

Thanks,

Mathieu

> 
> Thanks,
> 
> Mathieu
> 
> Mathieu Desnoyers (5):
>  glibc: Perform rseq(2) registration at C startup and thread creation
>    (v10)
>  glibc: sched_getcpu(): use rseq cpu_id TLS on Linux (v4)
>  support record failure: allow use from constructor
>  support: implement xpthread key create/delete (v2)
>  rseq registration tests (v4)
> 
> ChangeLog                                     |  66 ++++
> NEWS                                          |  15 +
> csu/libc-start.c                              |  14 +-
> misc/rseq-internal.h                          |  38 ++
> nptl/pthread_create.c                         |   9 +
> support/Makefile                              |   2 +
> support/check.h                               |   4 +
> support/support_record_failure.c              |  18 +-
> support/xpthread_key_create.c                 |  25 ++
> support/xpthread_key_delete.c                 |  24 ++
> support/xthread.h                             |   2 +
> sysdeps/unix/sysv/linux/Makefile              |   8 +-
> sysdeps/unix/sysv/linux/Versions              |   4 +
> sysdeps/unix/sysv/linux/aarch64/bits/rseq.h   |  43 ++
> sysdeps/unix/sysv/linux/aarch64/libc.abilist  |   2 +
> sysdeps/unix/sysv/linux/alpha/libc.abilist    |   2 +
> sysdeps/unix/sysv/linux/arm/libc.abilist      |   2 +
> sysdeps/unix/sysv/linux/bits/rseq.h           |  29 ++
> sysdeps/unix/sysv/linux/csky/libc.abilist     |   2 +
> sysdeps/unix/sysv/linux/hppa/libc.abilist     |   2 +
> sysdeps/unix/sysv/linux/i386/libc.abilist     |   2 +
> sysdeps/unix/sysv/linux/ia64/libc.abilist     |   2 +
> .../sysv/linux/m68k/coldfire/libc.abilist     |   2 +
> .../unix/sysv/linux/m68k/m680x0/libc.abilist  |   2 +
> .../unix/sysv/linux/microblaze/libc.abilist   |   2 +
> .../sysv/linux/mips/mips32/fpu/libc.abilist   |   2 +
> .../sysv/linux/mips/mips32/nofpu/libc.abilist |   2 +
> .../sysv/linux/mips/mips64/n32/libc.abilist   |   2 +
> .../sysv/linux/mips/mips64/n64/libc.abilist   |   2 +
> sysdeps/unix/sysv/linux/nios2/libc.abilist    |   2 +
> .../linux/powerpc/powerpc32/fpu/libc.abilist  |   2 +
> .../powerpc/powerpc32/nofpu/libc.abilist      |   2 +
> .../linux/powerpc/powerpc64/be/libc.abilist   |   2 +
> .../linux/powerpc/powerpc64/le/libc.abilist   |   2 +
> .../unix/sysv/linux/riscv/rv64/libc.abilist   |   2 +
> sysdeps/unix/sysv/linux/rseq-internal.h       |  88 +++++
> sysdeps/unix/sysv/linux/rseq-sym.c            |  63 +++
> sysdeps/unix/sysv/linux/s390/bits/rseq.h      |  30 ++
> .../unix/sysv/linux/s390/s390-32/libc.abilist |   2 +
> .../unix/sysv/linux/s390/s390-64/libc.abilist |   2 +
> sysdeps/unix/sysv/linux/sched_getcpu.c        |  24 +-
> sysdeps/unix/sysv/linux/sh/libc.abilist       |   2 +
> .../sysv/linux/sparc/sparc32/libc.abilist     |   2 +
> .../sysv/linux/sparc/sparc64/libc.abilist     |   2 +
> sysdeps/unix/sysv/linux/sys/rseq.h            |  50 +++
> sysdeps/unix/sysv/linux/tst-rseq-nptl.c       | 367 ++++++++++++++++++
> sysdeps/unix/sysv/linux/tst-rseq.c            | 114 ++++++
> sysdeps/unix/sysv/linux/x86/bits/rseq.h       |  30 ++
> .../unix/sysv/linux/x86_64/64/libc.abilist    |   2 +
> .../unix/sysv/linux/x86_64/x32/libc.abilist   |   2 +
> 50 files changed, 1107 insertions(+), 14 deletions(-)
> create mode 100644 misc/rseq-internal.h
> create mode 100644 support/xpthread_key_create.c
> create mode 100644 support/xpthread_key_delete.c
> create mode 100644 sysdeps/unix/sysv/linux/aarch64/bits/rseq.h
> create mode 100644 sysdeps/unix/sysv/linux/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
> 
> --
> 2.17.1