selftests/rseq: x86-64: use %fs segment selector for accessing rseq thread area
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 24 Jan 2022 17:12:52 +0000 (12:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jul 2022 15:53:31 +0000 (17:53 +0200)
commitf5a656b4ab48bb3b4d17dc603d4f3d80dbb61fd5
treec85042b5e79d5b4bcc06bb86200f6ec8fa9f6b7a
parent4633aa6fadc68396637b464f01e9ab98249ca2ba
selftests/rseq: x86-64: use %fs segment selector for accessing rseq thread area

commit 4e15bb766b6c6e963a4d33629034d0ec3b7637df upstream.

Rather than use rseq_get_abi() and pass its result through a register to
the inline assembler, directly access the per-thread rseq area through a
memory reference combining the %fs segment selector, the constant offset
of the field in struct rseq, and the rseq_offset value (in a register).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220124171253.22072-15-mathieu.desnoyers@efficios.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/rseq/rseq-x86.h