]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 10:02:59 +0000 (11:02 +0100)
commit2f90f2ebad41dd96329884e2972c5caf505ea32b
tree38fb1c162810ef6aef97da1e590c4875b379ade2
parentdb6b0d71797fea7cbda02f0597a1663243f4b00b
selftests/powerpc: Add a test of sigreturning to the kernel

BugLink: https://bugs.launchpad.net/bugs/1959376
[ 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>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
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]