]> git.baikalelectronics.ru Git - kernel.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:53:31 +0000 (17:53 +0200)
commit3220d1c98e8e1d57f125220d6a6dd0405bc0695d
treea18a9cfc32300c6ab36642c7de1d75d304dcb3ec
parent96579952b8c74747d67f00a960c6c3f9c2c1dfe3
selftests/rseq: x86-32: use %gs segment selector for accessing rseq thread area

commit e6c170217dedd3b716c36cc057da0d81bf5b52e4 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