about summary refs log tree commit diff
path: root/manual
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-07-16 17:55:35 +0200
committerFlorian Weimer <fweimer@redhat.com>2020-07-16 17:55:35 +0200
commitefedd1ed3d211941fc66d14ba245be3552b2616a (patch)
tree67e2e7d222933fa2f442ff92019d4ba85eee23a2 /manual
parentda7d62b50396c8b6d67c1ba800a196e83e2ec469 (diff)
downloadglibc-efedd1ed3d211941fc66d14ba245be3552b2616a.tar.gz
glibc-efedd1ed3d211941fc66d14ba245be3552b2616a.tar.xz
glibc-efedd1ed3d211941fc66d14ba245be3552b2616a.zip
Linux: Remove rseq support
The kernel ABI is not finalized, and there are now various proposals
to change the size of struct rseq, which would make the glibc ABI
dependent on the version of the kernels used for building glibc.
This is of course not acceptable.

This reverts commit 48699da1c468543ade14777819bd1b4d652709de ("elf:
Support at least 32-byte alignment in static dlopen"), commit
8f4632deb3545b2949cec5454afc3cb21a0024ea ("Linux: rseq registration
tests"), commit 6e29cb3f61ff5432c78a1c84b0d9b123a350ab36 ("Linux: Use
rseq in sched_getcpu if available"), and commit
0c76fc3c2b346dc5401dc055d97d4279632b0fb3 ("Linux: Perform rseq
registration at C startup and thread creation"), resolving the conflicts
introduced by the ARC port and the TLS static surplus changes.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'manual')
-rw-r--r--manual/threads.texi64
1 files changed, 0 insertions, 64 deletions
diff --git a/manual/threads.texi b/manual/threads.texi
index 49f249ec48..4ab0622443 100644
--- a/manual/threads.texi
+++ b/manual/threads.texi
@@ -629,8 +629,6 @@ the standard.
 * Waiting with Explicit Clocks::          Functions for waiting with an
                                           explicit clock specification.
 * Single-Threaded::                       Detecting single-threaded execution.
-* Restartable Sequences::                 Linux-specific Restartable Sequences
-                                          integration.
 @end menu
 
 @node Default Thread Attributes
@@ -958,68 +956,6 @@ application-created thread because future versions of @theglibc{} may
 create background threads after the first thread has been created, and
 the application has no way of knowning that these threads are present.
 
-@node Restartable Sequences
-@subsubsection Restartable Sequences
-
-This section describes Restartable Sequences integration for
-@theglibc{}.  This functionality is only available on Linux.
-
-@deftypevar {struct rseq} __rseq_abi
-@standards{Linux, sys/rseq.h}
-@Theglibc{} implements a @code{__rseq_abi} TLS symbol to interact with
-the Restartable Sequences system call.  The layout of this structure is
-defined by the @file{sys/rseq.h} header.  Registration of each thread's
-@code{__rseq_abi} is performed by @theglibc{} at library initialization
-and thread creation.  The manual for the rseq system call can be found
-at @uref{https://git.kernel.org/pub/scm/libs/librseq/librseq.git/tree/doc/man/rseq.2}.
-
-The main executable and shared libraries may either have an undefined
-@code{__rseq_abi} TLS symbol, or define their own, with the same
-declaration as the one present in @file{sys/rseq.h}.  The dynamic linker
-will ensure that only one of those available symbols will be used at
-runtime across the process.
-
-If the main executable or shared libraries observe an uninitialized
-@code{__rseq_abi.cpu_id} field (value @code{RSEQ_CPU_ID_UNINITIALIZED}),
-they may perform rseq registration to the kernel: this means either
-glibc was prevented from doing the registration, or an older glibc
-version, which does not include rseq support, is in use.  When the main
-executable or a library thus takes ownership of the registration, the
-memory used to hold the @code{__rseq_abi} TLS variable must stay
-allocated, and is not re-used, until the very end of the thread lifetime
-or until an explicit rseq unregistration for that thread is performed.
-It is not recommended to @code{dlclose} libraries owning the
-@code{__rseq_abi} TLS variable.
-
-Users of the @code{__rseq_abi} TLS symbol can store the address of a
-@code{struct rseq_cs} to the @code{__rseq_abi.rseq_cs} TLS variable,
-thus informing the kernel that it enters a Restartable Sequence critical
-section.  This pointer and the code areas it itself points to must not
-be left pointing to memory areas which are freed or re-used.  Several
-approaches can guarantee this.  If the application or library can
-guarantee that the memory used to hold the @code{struct rseq_cs} and the
-code areas it refers to are never freed or re-used, no special action
-must be taken.  Else, before that memory is re-used of freed, the
-application is responsible for setting the @code{__rseq_abi.rseq_cs} TLS
-variable to @code{NULL} in each thread's TLS to guarantee that it does
-not leak dangling references.  Because the application does not
-typically have knowledge of libraries' use of Restartable Sequences, it
-is recommended that libraries using Restartable Sequences which may end
-up freeing or re-using their memory set the @code{__rseq_abi.rseq_cs}
-TLS variable to @code{NULL} before returning from library functions
-which use Restartable Sequences.
-
-@end deftypevar
-
-@deftypevr Macro int RSEQ_SIG
-@standards{Linux, sys/rseq.h}
-Each supported architecture provides a @code{RSEQ_SIG} macro in
-@file{sys/rseq.h} which contains a signature.  That signature is
-expected to be present in the code before each Restartable Sequences
-abort handler.  Failure to provide the expected signature may terminate
-the process with a segmentation fault.
-@end deftypevr
-
 @c FIXME these are undocumented:
 @c pthread_atfork
 @c pthread_attr_destroy