diff options
author | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2019-04-29 11:27:55 -0400 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2019-05-07 15:31:46 -0600 |
commit | 5b0c308a0565a94d2e1070cbf287197b676faaaf (patch) | |
tree | ea40e240db1dd0b3f0d3761ceffbe9a47dd76769 /tools/testing/selftests/rseq/rseq.h | |
parent | a3e3131f94aa1daeb978ed66d0b4e61156ef2c2a (diff) | |
download | linux-5b0c308a0565a94d2e1070cbf287197b676faaaf.tar.gz linux-5b0c308a0565a94d2e1070cbf287197b676faaaf.tar.bz2 linux-5b0c308a0565a94d2e1070cbf287197b676faaaf.zip |
rseq/selftests: Use __rseq_handled symbol to coexist with glibc
In order to integrate rseq into user-space applications, expose a
__rseq_handled symbol so many rseq users can be linked into the same
application (e.g. librseq and glibc).
The __rseq_refcount TLS variable is static to the librseq library. It
ensures that rseq syscall registration/unregistration happens only for
the most early/late caller to rseq_{,un}register_current_thread for each
thread, thus ensuring that rseq is registered across the lifetime of all
rseq users for a given thread.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Shuah Khan <shuah@kernel.org>
CC: Carlos O'Donell <carlos@redhat.com>
CC: Florian Weimer <fweimer@redhat.com>
CC: Joseph Myers <joseph@codesourcery.com>
CC: Szabolcs Nagy <szabolcs.nagy@arm.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ben Maurer <bmaurer@fb.com>
CC: Peter Zijlstra <peterz@infradead.org>
CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
CC: Boqun Feng <boqun.feng@gmail.com>
CC: Will Deacon <will.deacon@arm.com>
CC: Dave Watson <davejwatson@fb.com>
CC: Paul Turner <pjt@google.com>
CC: linux-api@vger.kernel.org
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/rseq/rseq.h')
-rw-r--r-- | tools/testing/selftests/rseq/rseq.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/rseq/rseq.h b/tools/testing/selftests/rseq/rseq.h index 6c1126e7f685..d40d60e7499e 100644 --- a/tools/testing/selftests/rseq/rseq.h +++ b/tools/testing/selftests/rseq/rseq.h @@ -44,6 +44,7 @@ #endif extern __thread volatile struct rseq __rseq_abi; +extern int __rseq_handled; #define rseq_likely(x) __builtin_expect(!!(x), 1) #define rseq_unlikely(x) __builtin_expect(!!(x), 0) |