selftests/powerpc: Add a test of sigreturning to the kernel
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 9 Dec 2021 11:59:44 +0000 (22:59 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 21 Dec 2021 09:17:59 +0000 (20:17 +1100)
commita8968521cfdc3e339fe69473d6632e0aa8d7202a
treeb10268d15783dd29506430b430ba794a4cae0045
parent9cbbe6bae938dd335a5092b0ce41f88cb39ba40c
selftests/powerpc: Add a test of sigreturning to the kernel

We have a general signal fuzzer, sigfuz, which can modify the MSR & NIP
before sigreturn. But the chance of it hitting a kernel address and also
clearing MSR_PR is fairly slim.

So add a specific test of sigreturn to a kernel address, both with and
without attempting to clear MSR_PR (which the kernel must block).

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211209115944.4062384-1-mpe@ellerman.id.au
tools/testing/selftests/powerpc/signal/.gitignore
tools/testing/selftests/powerpc/signal/Makefile
tools/testing/selftests/powerpc/signal/sigreturn_kernel.c [new file with mode: 0644]