summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/ptrace/Makefile
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2022-06-28 00:02:36 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2022-07-25 12:05:16 +1000
commit611e385087efc2cc3a7033aedd3f84ad0cf2a703 (patch)
tree6a5546d4bfc523e329e31526573d599c030e76c7 /tools/testing/selftests/powerpc/ptrace/Makefile
parent149a497d5fda3e996a00437260a4c170e43909c8 (diff)
downloadlinux-stable-611e385087efc2cc3a7033aedd3f84ad0cf2a703.tar.gz
linux-stable-611e385087efc2cc3a7033aedd3f84ad0cf2a703.tar.bz2
linux-stable-611e385087efc2cc3a7033aedd3f84ad0cf2a703.zip
selftests/powerpc/ptrace: Do more of ptrace-gpr in asm
The ptrace-gpr test includes some inline asm to load GPR and FPR registers. It then goes back to C to wait for the parent to trace it and then checks register contents. The split between inline asm and C is fragile, it relies on the compiler not using any non-volatile GPRs after the inline asm block. It also requires a very large and unwieldy inline asm block. So convert the logic to set registers, wait, and store registers to a single asm function, meaning there's no window for the compiler to intervene. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220627140239.2464900-10-mpe@ellerman.id.au
Diffstat (limited to 'tools/testing/selftests/powerpc/ptrace/Makefile')
-rw-r--r--tools/testing/selftests/powerpc/ptrace/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index 3434a624ed77..2f02cb54224d 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -35,6 +35,7 @@ $(TM_TESTS): CFLAGS += -I../tm -mhtm
CFLAGS += -I../../../../../usr/include -fno-pie
+$(OUTPUT)/ptrace-gpr: ptrace-gpr.S
$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread
$(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S