diff options
author | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2019-05-03 15:38:58 -0400 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2019-05-07 15:32:36 -0600 |
commit | 2b845d4b4acd9422bbb668989db8dc36dfc8f438 (patch) | |
tree | 6d212abd7af626f2dd99a00b4c9cea73e5d0e6f6 /tools/testing/selftests/firmware | |
parent | 3d4d1f05bc990f240d66b0ffaf7121397e14df19 (diff) | |
download | linux-2b845d4b4acd9422bbb668989db8dc36dfc8f438.tar.gz linux-2b845d4b4acd9422bbb668989db8dc36dfc8f438.tar.bz2 linux-2b845d4b4acd9422bbb668989db8dc36dfc8f438.zip |
rseq/selftests: arm: use udf instruction for RSEQ_SIG
Use udf as the guard instruction for the restartable sequence abort
handler.
Previously, the chosen signature was not a valid instruction, based
on the assumption that it could always sit in a literal pool. However,
there are compilation environments in which literal pools are not
available, for instance execute-only code. Therefore, we need to
choose a signature value that is also a valid instruction.
Handle compiling with -mbig-endian on ARMv6+, which generates binaries
with mixed code vs data endianness (little endian code, big endian
data).
Else mismatch between code endianness for the generated signatures and
data endianness for the RSEQ_SIG parameter passed to the rseq
registration will trigger application segmentation faults when the
kernel try to abort rseq critical sections.
Prior to ARMv6, -mbig-endian generates big-endian code and data, so
endianness should not be reversed in that case.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Peter Zijlstra <peterz@infradead.org>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Joel Fernandes <joelaf@google.com>
CC: Catalin Marinas <catalin.marinas@arm.com>
CC: Dave Watson <davejwatson@fb.com>
CC: Will Deacon <will.deacon@arm.com>
CC: Shuah Khan <shuah@kernel.org>
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: 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>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/firmware')
0 files changed, 0 insertions, 0 deletions