aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/rseq
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2019-04-10 12:28:41 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2019-04-10 17:48:34 +0200
commite24e4712efad737ca09ff299276737331cd021d9 (patch)
tree5255c7d5c603c151f69af3b7051388ea80e9016b /tools/testing/selftests/rseq
parents390: cio: fix cio_irb declaration (diff)
downloadwireguard-linux-e24e4712efad737ca09ff299276737331cd021d9.tar.xz
wireguard-linux-e24e4712efad737ca09ff299276737331cd021d9.zip
s390/rseq: use trap4 for RSEQ_SIG
Use trap4 as the guard instruction for the restartable sequence abort handler. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'tools/testing/selftests/rseq')
-rw-r--r--tools/testing/selftests/rseq/rseq-s390.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/testing/selftests/rseq/rseq-s390.h b/tools/testing/selftests/rseq/rseq-s390.h
index 1069e85258ce..0afdf7957974 100644
--- a/tools/testing/selftests/rseq/rseq-s390.h
+++ b/tools/testing/selftests/rseq/rseq-s390.h
@@ -1,6 +1,13 @@
/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
-#define RSEQ_SIG 0x53053053
+/*
+ * RSEQ_SIG uses the trap4 instruction. As Linux does not make use of the
+ * access-register mode nor the linkage stack this instruction will always
+ * cause a special-operation exception (the trap-enabled bit in the DUCT
+ * is and will stay 0). The instruction pattern is
+ * b2 ff 0f ff trap4 4095(%r0)
+ */
+#define RSEQ_SIG 0xB2FF0FFF
#define rseq_smp_mb() __asm__ __volatile__ ("bcr 15,0" ::: "memory")
#define rseq_smp_rmb() rseq_smp_mb()