summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/resctrl
diff options
context:
space:
mode:
authorJordan Niethe <jniethe5@gmail.com>2021-07-29 14:13:16 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2021-08-26 21:21:06 +1000
commitc95278a0534449efc64ac8169382bce217963be2 (patch)
treebff62b7ef52024b86aeb8f6956cad24ca217cf2e /tools/testing/selftests/resctrl
parent3c69a5f22223fa3e312689ec218b5059784d49d7 (diff)
downloadlinux-c95278a0534449efc64ac8169382bce217963be2.tar.bz2
selftests/powerpc: Add missing clobbered register to to ptrace TM tests
ISA v3.1 removes TM but includes a synthetic implementation for backwards compatibility. With this implementation, the tests ptrace-tm-spd-gpr and ptrace-tm-gpr should never be able to make any forward progress and eventually should be killed by the timeout. Instead on a P10 running in P9 mode, ptrace_tm_gpr fails like so: test: ptrace_tm_gpr tags: git_version:unknown Starting the child ... ... GPR[27]: 1 Expected: 2 GPR[28]: 1 Expected: 2 GPR[29]: 1 Expected: 2 GPR[30]: 1 Expected: 2 GPR[31]: 1 Expected: 2 [FAIL] Test FAILED on line 98 failure: ptrace_tm_gpr selftests: ptrace-tm-gpr [FAIL] The problem is in the inline assembly of the child. r0 is loaded with a value in the child's transaction abort handler but this register is not included in the clobbers list. This means it is possible that this statement: cptr[1] = 0; which is meant to signal the parent to wait may actually use the value placed into r0 by the inline assembly incorrectly signal the parent to continue. By inspection the same problem is present in ptrace-tm-spd-gpr. Adding r0 to the clobbbers list makes the test fail correctly via a timeout on a P10 running in P8/P9 compatibility mode. Suggested-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210729041317.366612-1-jniethe5@gmail.com
Diffstat (limited to 'tools/testing/selftests/resctrl')
0 files changed, 0 insertions, 0 deletions