]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/rseq: x86-32: use %gs segment selector for accessing rseq thread area
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 24 Jan 2022 17:12:53 +0000 (12:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jul 2022 15:52:22 +0000 (17:52 +0200)
commit7e617278bf3afd4ed81c04a75e4a32ce8fb5bf44
treec27edc99b9c2039c58917a4e2537d8c25162e5bf
parent27f6361cb4151de69f756480bd9264893bbc1ad1
selftests/rseq: x86-32: use %gs segment selector for accessing rseq thread area

commit 127b6429d235ab7c358223bbfd8a8b8d8cc799b6 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 %gs 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-16-mathieu.desnoyers@efficios.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/rseq/rseq-x86.h