OSDN Git Service

selftests/powerpc: Add a test of sigreturn vs VDSO
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 4 Mar 2020 11:04:02 +0000 (22:04 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 20 Mar 2020 02:10:21 +0000 (13:10 +1100)
commita0968a025c04702427a4aee2c618f451a5098cd8
treee0163edf3d4957f91db07098b35e18f9e5fbc2da
parent59ed2adf393109c56d383e568f2e57bb5ad6d901
selftests/powerpc: Add a test of sigreturn vs VDSO

There's two different paths through the sigreturn code, depending on
whether the VDSO is mapped or not. We recently discovered a bug in the
unmapped case, because it's not commonly used these days.

So add a test that sends itself a signal, then moves the VDSO, takes
another signal and finally unmaps the VDSO before sending itself
another signal. That tests the standard signal path, the code that
handles the VDSO being moved, and also the signal path in the case
where the VDSO is unmapped.

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