mbox series

[0/4] Extend rseq support

Message ID 20240227155533.298617-1-mjeanson@efficios.com
Headers show
Series Extend rseq support | expand

Message

Michael Jeanson Feb. 27, 2024, 3:55 p.m. UTC
This series rebases the standalone "Add rseq extensible ABI" patch on
current master and addresses many review comments documented in each
patch commit message.

The accelerated getcpu() implementation using the rseq extensible ABI
was split in a different patch series while we figure out the best way
to interface with the librseq project as an upstream.

Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: DJ Delorie <dj@redhat.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
Changes since v7:
- Fix sorting of symbols in abilist files
Changes since v9:
- Address review comments
- Split the accelerated getcpu() implementation in a separate patch set

Michael Jeanson (4):
  nptl: fix potential merge of __rseq_* relro symbols
  Add rseq extensible ABI support
  nptl: Add public __rseq_feature_size symbol
  nptl: Add features to internal 'struct rseq_area'

 csu/Makefile                                  |  2 +-
 csu/libc-tls.c                                | 84 +++++++++++++++++--
 csu/rseq-sizes.sym                            | 11 +++
 elf/Makefile                                  |  1 +
 elf/dl-rseq-symbols.S                         | 72 ++++++++++++++++
 elf/dl-tls.c                                  | 78 +++++++++++++++++
 elf/rtld_static_init.c                        | 12 +++
 manual/threads.texi                           |  9 ++
 nptl/descr.h                                  | 20 +----
 nptl/pthread_create.c                         |  2 +-
 sysdeps/generic/dl-rseq.h                     | 26 ++++++
 sysdeps/generic/ldsodefs.h                    | 12 +++
 sysdeps/i386/nptl/tcb-access.h                | 56 +++++++++++++
 sysdeps/nptl/dl-tls_init_tp.c                 | 22 +++--
 sysdeps/nptl/tcb-access.h                     |  5 ++
 sysdeps/unix/sysv/linux/Makefile              | 10 +++
 sysdeps/unix/sysv/linux/Versions              |  3 +
 sysdeps/unix/sysv/linux/aarch64/ld.abilist    |  1 +
 sysdeps/unix/sysv/linux/alpha/ld.abilist      |  1 +
 sysdeps/unix/sysv/linux/arc/ld.abilist        |  1 +
 sysdeps/unix/sysv/linux/arm/be/ld.abilist     |  1 +
 sysdeps/unix/sysv/linux/arm/le/ld.abilist     |  1 +
 sysdeps/unix/sysv/linux/csky/ld.abilist       |  1 +
 sysdeps/unix/sysv/linux/dl-parse_auxv.h       |  6 ++
 sysdeps/unix/sysv/linux/hppa/ld.abilist       |  1 +
 sysdeps/unix/sysv/linux/i386/ld.abilist       |  1 +
 .../unix/sysv/linux/loongarch/lp64/ld.abilist |  1 +
 .../unix/sysv/linux/m68k/coldfire/ld.abilist  |  1 +
 .../unix/sysv/linux/m68k/m680x0/ld.abilist    |  1 +
 sysdeps/unix/sysv/linux/microblaze/ld.abilist |  1 +
 .../unix/sysv/linux/mips/mips32/ld.abilist    |  1 +
 .../sysv/linux/mips/mips64/n32/ld.abilist     |  1 +
 .../sysv/linux/mips/mips64/n64/ld.abilist     |  1 +
 sysdeps/unix/sysv/linux/nios2/ld.abilist      |  1 +
 sysdeps/unix/sysv/linux/or1k/ld.abilist       |  1 +
 .../sysv/linux/powerpc/powerpc32/ld.abilist   |  1 +
 .../linux/powerpc/powerpc64/be/ld.abilist     |  1 +
 .../linux/powerpc/powerpc64/le/ld.abilist     |  1 +
 sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist |  1 +
 sysdeps/unix/sysv/linux/riscv/rv64/ld.abilist |  1 +
 sysdeps/unix/sysv/linux/rseq-internal.h       | 33 +++++++-
 .../unix/sysv/linux/s390/s390-32/ld.abilist   |  1 +
 .../unix/sysv/linux/s390/s390-64/ld.abilist   |  1 +
 sysdeps/unix/sysv/linux/sched_getcpu.c        |  3 +-
 sysdeps/unix/sysv/linux/sh/be/ld.abilist      |  1 +
 sysdeps/unix/sysv/linux/sh/le/ld.abilist      |  1 +
 .../unix/sysv/linux/sparc/sparc32/ld.abilist  |  1 +
 .../unix/sysv/linux/sparc/sparc64/ld.abilist  |  1 +
 sysdeps/unix/sysv/linux/sys/rseq.h            |  4 +
 .../unix/sysv/linux/tst-rseq-disable-static.c |  1 +
 sysdeps/unix/sysv/linux/tst-rseq-disable.c    | 18 ++--
 .../unix/sysv/linux/tst-rseq-nptl-static.c    |  1 +
 sysdeps/unix/sysv/linux/tst-rseq-static.c     |  1 +
 sysdeps/unix/sysv/linux/tst-rseq.c            | 24 +++++-
 sysdeps/unix/sysv/linux/tst-rseq.h            |  9 +-
 sysdeps/unix/sysv/linux/x86_64/64/ld.abilist  |  1 +
 sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist |  1 +
 sysdeps/x86_64/nptl/tcb-access.h              | 56 +++++++++++++
 58 files changed, 557 insertions(+), 54 deletions(-)
 create mode 100644 csu/rseq-sizes.sym
 create mode 100644 elf/dl-rseq-symbols.S
 create mode 100644 sysdeps/generic/dl-rseq.h
 create mode 100644 sysdeps/unix/sysv/linux/tst-rseq-disable-static.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-rseq-nptl-static.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-rseq-static.c

Comments

Michael Jeanson Feb. 27, 2024, 3:57 p.m. UTC | #1
On 2024-02-27 10:55, Michael Jeanson wrote:
> This series rebases the standalone "Add rseq extensible ABI" patch on
> current master and addresses many review comments documented in each
> patch commit message.
> 
> The accelerated getcpu() implementation using the rseq extensible ABI
> was split in a different patch series while we figure out the best way
> to interface with the librseq project as an upstream.

This should be v9, sorry about the noise.

Michael
Carlos O'Donell March 25, 2024, 2:01 p.m. UTC | #2
On 2/27/24 10:55, Michael Jeanson wrote:
> This series rebases the standalone "Add rseq extensible ABI" patch on
> current master and addresses many review comments documented in each
> patch commit message.

Michael,

Just a quick update here since we discussed this series in the weekly
patch queue review.

I'm looking to find a second reviewer for this series since it touches
ABI artifacts that we want to get right.

$ git-pw series apply 31373
Applying: nptl: fix potential merge of __rseq_* relro symbols
Applying: Add rseq extensible ABI support
Using index info to reconstruct a base tree...
M	sysdeps/generic/ldsodefs.h
M	sysdeps/unix/sysv/linux/dl-parse_auxv.h
M	sysdeps/unix/sysv/linux/sched_getcpu.c
Falling back to patching base and 3-way merge...
Auto-merging sysdeps/unix/sysv/linux/sched_getcpu.c
Auto-merging sysdeps/unix/sysv/linux/dl-parse_auxv.h
Auto-merging sysdeps/generic/ldsodefs.h
Applying: nptl: Add public __rseq_feature_size symbol
Applying: nptl: Add features to internal 'struct rseq_area'

The series still applies, but there have been some changes here,
would you mind posting a rebase to support the review?
Michael Jeanson March 25, 2024, 6:31 p.m. UTC | #3
On 2024-03-25 10:01, Carlos O'Donell wrote:
> On 2/27/24 10:55, Michael Jeanson wrote:
>> This series rebases the standalone "Add rseq extensible ABI" patch on
>> current master and addresses many review comments documented in each
>> patch commit message.
> 
> Michael,
> 
> Just a quick update here since we discussed this series in the weekly
> patch queue review.
> 
> I'm looking to find a second reviewer for this series since it touches
> ABI artifacts that we want to get right.
> 
> $ git-pw series apply 31373
> Applying: nptl: fix potential merge of __rseq_* relro symbols
> Applying: Add rseq extensible ABI support
> Using index info to reconstruct a base tree...
> M	sysdeps/generic/ldsodefs.h
> M	sysdeps/unix/sysv/linux/dl-parse_auxv.h
> M	sysdeps/unix/sysv/linux/sched_getcpu.c
> Falling back to patching base and 3-way merge...
> Auto-merging sysdeps/unix/sysv/linux/sched_getcpu.c
> Auto-merging sysdeps/unix/sysv/linux/dl-parse_auxv.h
> Auto-merging sysdeps/generic/ldsodefs.h
> Applying: nptl: Add public __rseq_feature_size symbol
> Applying: nptl: Add features to internal 'struct rseq_area'
> 
> The series still applies, but there have been some changes here,
> would you mind posting a rebase to support the review?
> 

Hi Carlos,

I've just sent v10 rebased on current master.

Cheers,

Michael