diff options
author | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2020-07-06 10:21:16 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2020-07-06 10:21:16 +0200 |
commit | 0c76fc3c2b346dc5401dc055d97d4279632b0fb3 (patch) | |
tree | 67d7a99ad801c38a137fbb9d08ac54137bb901b9 /sysdeps/unix/sysv/linux/Makefile | |
parent | f9cf87353772ca370b7bb901d86365a564fba49f (diff) | |
download | glibc-0c76fc3c2b346dc5401dc055d97d4279632b0fb3.tar.gz glibc-0c76fc3c2b346dc5401dc055d97d4279632b0fb3.tar.xz glibc-0c76fc3c2b346dc5401dc055d97d4279632b0fb3.zip |
Linux: Perform rseq registration at C startup and thread creation
Register rseq TLS for each thread (including main), and unregister for each thread (excluding main). "rseq" stands for Restartable Sequences. See the rseq(2) man page proposed here: https://lkml.org/lkml/2018/9/19/647 Those are based on glibc master branch commit 3ee1e0ec5c. The rseq system call was merged into Linux 4.18. The TLS_STATIC_SURPLUS define is increased to leave additional room for dlopen'd initial-exec TLS, which keeps elf/tst-auditmany working. The increase (76 bytes) is larger than 32 bytes because it has not been increased in quite a while. The cost in terms of additional TLS storage is quite significant, but it will also obscure some initial-exec-related dlopen failures.
Diffstat (limited to 'sysdeps/unix/sysv/linux/Makefile')
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index e02065dc8d..e855db2cb9 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -41,7 +41,7 @@ update-syscall-lists: arch-syscall.h endif ifeq ($(subdir),csu) -sysdep_routines += errno-loc +sysdep_routines += errno-loc rseq-sym endif ifeq ($(subdir),assert) @@ -92,7 +92,8 @@ sysdep_headers += sys/mount.h sys/acct.h \ bits/termios-c_lflag.h bits/termios-tcflow.h \ bits/termios-misc.h \ bits/types/struct_semid_ds.h \ - bits/ipc-perm.h + bits/ipc-perm.h \ + sys/rseq.h bits/rseq.h tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \ tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \ |