Skip to content

Commit 496fd0f

Browse files
compudjshuahkh
authored andcommitted
rseq/selftests: powerpc code signature: generate valid instructions
Use "twui" as the guard instruction for the restartable sequence abort handler. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Paul Mackerras <paulus@samba.org> CC: Michael Ellerman <mpe@ellerman.id.au> CC: Boqun Feng <boqun.feng@gmail.com> CC: Peter Zijlstra <peterz@infradead.org> CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> CC: Alan Modra <amodra@gmail.com> CC: linuxppc-dev@lists.ozlabs.org Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent 7cd4ce2 commit 496fd0f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎tools/testing/selftests/rseq/rseq-ppc.h‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@
66
* (C) Copyright 2016-2018 - Boqun Feng <boqun.feng@gmail.com>
77
*/
88

9-
#define RSEQ_SIG 0x53053053
9+
/*
10+
* RSEQ_SIG is used with the following trap instruction:
11+
*
12+
* powerpc-be: 0f e5 00 0b twui r5,11
13+
* powerpc64-le: 0b 00 e5 0f twui r5,11
14+
* powerpc64-be: 0f e5 00 0b twui r5,11
15+
*/
16+
17+
#define RSEQ_SIG 0x0fe5000b
1018

1119
#define rseq_smp_mb() __asm__ __volatile__ ("sync" ::: "memory", "cc")
1220
#define rseq_smp_lwsync() __asm__ __volatile__ ("lwsync" ::: "memory", "cc")

0 commit comments

Comments
 (0)