rseq/selftests: Provide rseq library
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 2 Jun 2018 12:44:04 +0000 (08:44 -0400)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 6 Jun 2018 09:58:34 +0000 (11:58 +0200)
commit2e155fb7d605d37c423ad0076f82feca572efdce
treeb12f4dbd2bb1aae258b865008f150e24102ff282
parent4e49ed2f9ac32b0ba22c113dc405a49d3133eb57
rseq/selftests: Provide rseq library

This rseq helper library provides a user-space API to the rseq()
system call.

The rseq fast-path exposes the instruction pointer addresses where the
rseq assembly blocks begin and end, as well as the associated abort
instruction pointer, in the __rseq_table section. This section allows
debuggers may know where to place breakpoints when single-stepping
through assembly blocks which may be aborted at any point by the kernel.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Joel Fernandes <joelaf@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Watson <davejwatson@fb.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: linux-kselftest@vger.kernel.org
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Chris Lameter <cl@linux.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Andrew Hunter <ahh@google.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Paul Turner <pjt@google.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ben Maurer <bmaurer@fb.com>
Cc: linux-api@vger.kernel.org
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lkml.kernel.org/r/20180602124408.8430-13-mathieu.desnoyers@efficios.com
tools/testing/selftests/rseq/rseq-arm.h [new file with mode: 0644]
tools/testing/selftests/rseq/rseq-ppc.h [new file with mode: 0644]
tools/testing/selftests/rseq/rseq-skip.h [new file with mode: 0644]
tools/testing/selftests/rseq/rseq-x86.h [new file with mode: 0644]
tools/testing/selftests/rseq/rseq.c [new file with mode: 0644]
tools/testing/selftests/rseq/rseq.h [new file with mode: 0644]