Skip to content

Commit

Permalink
rseq/selftests: powerpc code signature: generate valid instructions
Browse files Browse the repository at this point in the history
Use "twui" as the guard instruction for the restartable sequence abort
handler.

Signed-off-by: Mathieu Desnoyers <[email protected]>
CC: Benjamin Herrenschmidt <[email protected]>
CC: Paul Mackerras <[email protected]>
CC: Michael Ellerman <[email protected]>
CC: Boqun Feng <[email protected]>
CC: Peter Zijlstra <[email protected]>
CC: "Paul E. McKenney" <[email protected]>
CC: Alan Modra <[email protected]>
CC: [email protected]
Signed-off-by: Shuah Khan <[email protected]>
  • Loading branch information
compudj authored and shuahkh committed May 7, 2019
1 parent 7cd4ce2 commit 496fd0f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/testing/selftests/rseq/rseq-ppc.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
* (C) Copyright 2016-2018 - Boqun Feng <[email protected]>
*/

#define RSEQ_SIG 0x53053053
/*
* RSEQ_SIG is used with the following trap instruction:
*
* powerpc-be: 0f e5 00 0b twui r5,11
* powerpc64-le: 0b 00 e5 0f twui r5,11
* powerpc64-be: 0f e5 00 0b twui r5,11
*/

#define RSEQ_SIG 0x0fe5000b

#define rseq_smp_mb() __asm__ __volatile__ ("sync" ::: "memory", "cc")
#define rseq_smp_lwsync() __asm__ __volatile__ ("lwsync" ::: "memory", "cc")
Expand Down

0 comments on commit 496fd0f

Please sign in to comment.