mbox series

[0/9] Restartable Sequences enablement

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

Message

Mathieu Desnoyers March 26, 2020, 3:56 p.m. UTC
Hi,

Please find the rseq-enablement patchset for comments in this series.

This patch series is based on glibc master branch at commit
1fabdb9908 x86: Remove ARCH_CET_LEGACY_BITMAP [BZ #25397]

Since the last post:

- Move elf/elf_machine_sym_no_match.h to sysdeps/generic (additional
  patch).
- Move NEWS entry under 2.32.
- Move new __rseq_abi symbol to GLIBC_2.32.

Please consider for merging into glibc.

Mathieu


Florian Weimer (3):
  Introduce <elf_machine_sym_no_match.h>
  Implement __libc_early_init
  nptl: Start new threads with all signals blocked [BZ #25098]

Mathieu Desnoyers (6):
  Move elf/elf_machine_sym_no_match.h to sysdeps/generic
  glibc: Perform rseq(2) registration at C startup and thread creation
    (v17)
  glibc: sched_getcpu(): use rseq cpu_id TLS on Linux (v7)
  support record failure: allow use from constructor
  support: implement xpthread key create/delete (v4)
  rseq registration tests (v9)

 NEWS                                          |  12 +-
 csu/init-first.c                              |   4 -
 csu/libc-start.c                              |   5 +
 elf/Makefile                                  |   5 +-
 elf/Versions                                  |   1 +
 elf/dl-call-libc-early-init.c                 |  41 +++
 elf/dl-load.c                                 |   9 +
 elf/dl-lookup-direct.c                        | 116 ++++++
 elf/dl-lookup.c                               |  10 +-
 elf/dl-open.c                                 |  24 ++
 elf/libc-early-init.h                         |  35 ++
 elf/libc_early_init.c                         |  30 ++
 elf/rtld.c                                    |   4 +
 manual/threads.texi                           |  30 +-
 misc/rseq-internal.h                          |  33 ++
 nptl/descr.h                                  |  10 +-
 nptl/pthread_create.c                         |  56 ++-
 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/generic/elf_machine_sym_no_match.h    |  34 ++
 sysdeps/generic/ldsodefs.h                    |  17 +
 sysdeps/mach/hurd/i386/init-first.c           |   4 -
 sysdeps/mips/dl-machine.h                     |  15 -
 sysdeps/mips/elf_machine_sym_no_match.h       |  43 +++
 sysdeps/unix/sysv/linux/Makefile              |  11 +-
 sysdeps/unix/sysv/linux/Versions              |   3 +
 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            |  25 ++
 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            | 186 ++++++++++
 sysdeps/unix/sysv/linux/tst-rseq-nptl.c       | 347 ++++++++++++++++++
 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 +
 73 files changed, 1674 insertions(+), 70 deletions(-)
 create mode 100644 elf/dl-call-libc-early-init.c
 create mode 100644 elf/dl-lookup-direct.c
 create mode 100644 elf/libc-early-init.h
 create mode 100644 elf/libc_early_init.c
 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/generic/elf_machine_sym_no_match.h
 create mode 100644 sysdeps/mips/elf_machine_sym_no_match.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

Mathieu Desnoyers April 15, 2020, 8:45 p.m. UTC | #1
----- On Mar 26, 2020, at 11:56 AM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote:

> Hi,
> 
> Please find the rseq-enablement patchset for comments in this series.
> 
> This patch series is based on glibc master branch at commit
> 1fabdb9908 x86: Remove ARCH_CET_LEGACY_BITMAP [BZ #25397]
> 
> Since the last post:
> 
> - Move elf/elf_machine_sym_no_match.h to sysdeps/generic (additional
>  patch).
> - Move NEWS entry under 2.32.
> - Move new __rseq_abi symbol to GLIBC_2.32.
> 
> Please consider for merging into glibc.

Hi,

Is there any feedback on the proposed patches ?

Thanks,

Mathieu

> 
> Mathieu
> 
> 
> Florian Weimer (3):
>  Introduce <elf_machine_sym_no_match.h>
>  Implement __libc_early_init
>  nptl: Start new threads with all signals blocked [BZ #25098]
> 
> Mathieu Desnoyers (6):
>  Move elf/elf_machine_sym_no_match.h to sysdeps/generic
>  glibc: Perform rseq(2) registration at C startup and thread creation
>    (v17)
>  glibc: sched_getcpu(): use rseq cpu_id TLS on Linux (v7)
>  support record failure: allow use from constructor
>  support: implement xpthread key create/delete (v4)
>  rseq registration tests (v9)
> 
> NEWS                                          |  12 +-
> csu/init-first.c                              |   4 -
> csu/libc-start.c                              |   5 +
> elf/Makefile                                  |   5 +-
> elf/Versions                                  |   1 +
> elf/dl-call-libc-early-init.c                 |  41 +++
> elf/dl-load.c                                 |   9 +
> elf/dl-lookup-direct.c                        | 116 ++++++
> elf/dl-lookup.c                               |  10 +-
> elf/dl-open.c                                 |  24 ++
> elf/libc-early-init.h                         |  35 ++
> elf/libc_early_init.c                         |  30 ++
> elf/rtld.c                                    |   4 +
> manual/threads.texi                           |  30 +-
> misc/rseq-internal.h                          |  33 ++
> nptl/descr.h                                  |  10 +-
> nptl/pthread_create.c                         |  56 ++-
> 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/generic/elf_machine_sym_no_match.h    |  34 ++
> sysdeps/generic/ldsodefs.h                    |  17 +
> sysdeps/mach/hurd/i386/init-first.c           |   4 -
> sysdeps/mips/dl-machine.h                     |  15 -
> sysdeps/mips/elf_machine_sym_no_match.h       |  43 +++
> sysdeps/unix/sysv/linux/Makefile              |  11 +-
> sysdeps/unix/sysv/linux/Versions              |   3 +
> 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            |  25 ++
> 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            | 186 ++++++++++
> sysdeps/unix/sysv/linux/tst-rseq-nptl.c       | 347 ++++++++++++++++++
> 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 +
> 73 files changed, 1674 insertions(+), 70 deletions(-)
> create mode 100644 elf/dl-call-libc-early-init.c
> create mode 100644 elf/dl-lookup-direct.c
> create mode 100644 elf/libc-early-init.h
> create mode 100644 elf/libc_early_init.c
> 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/generic/elf_machine_sym_no_match.h
> create mode 100644 sysdeps/mips/elf_machine_sym_no_match.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
> 
> --
> 2.17.1
Carlos O'Donell April 22, 2020, 4:27 p.m. UTC | #2
On 3/26/20 11:56 AM, Mathieu Desnoyers wrote:
> Hi,
> 
> Please find the rseq-enablement patchset for comments in this series.
> 
> This patch series is based on glibc master branch at commit
> 1fabdb9908 x86: Remove ARCH_CET_LEGACY_BITMAP [BZ #25397]
> 
> Since the last post:
> 
> - Move elf/elf_machine_sym_no_match.h to sysdeps/generic (additional
>   patch).
> - Move NEWS entry under 2.32.
> - Move new __rseq_abi symbol to GLIBC_2.32.
> 
> Please consider for merging into glibc.
> 
> Mathieu
> 
> 
> Florian Weimer (3):
>   Introduce <elf_machine_sym_no_match.h>
>   Implement __libc_early_init
>   nptl: Start new threads with all signals blocked [BZ #25098]

I'm going to focus on these patches and review them first.

I would like to see these pushed first, since they are overall
good refactoring for the dynamic loader.