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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:05:03 +0000 (11:05 +0100)
commit843fff4287a56b3a20c834bd817f7c9eeaeba605
treef4440eeb8f7ed3777974d2886d6e7be32917ff3c
parent845a5a4a8fd9805827e045089f5dca01a573f36c
selftests/powerpc: Add a test of sigreturning to the kernel

[ Upstream commit a8968521cfdc3e339fe69473d6632e0aa8d7202a ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
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]