0
0
mirror of https://mirrors.bfsu.edu.cn/git/linux.git synced 2025-01-14 01:34:43 +08:00
linux/tools/testing/selftests/powerpc/signal
Nicholas Piggin 4e0e45b07d powerpc: Use trap metadata to prevent double restart rather than zeroing trap
It's not very nice to zero trap for this, because then system calls no
longer have trap_is_syscall(regs) invariant, and we can't distinguish
between sc and scv system calls (in a later patch).

Take one last unused bit from the low bits of the pt_regs.trap word
for this instead. There is not a really good reason why it should be
in trap as opposed to another field, but trap has some concept of
flags and it exists. Ideally I think we would move trap to 2-byte
field and have 2 more bytes available independently.

Add a selftests case for this, which can be seen to fail if
trap_norestart() is changed to return false.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Make them static inlines]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200507121332.2233629-4-mpe@ellerman.id.au
2020-05-15 11:58:54 +10:00
..
.gitignore powerpc updates for 5.7 2020-04-05 11:12:59 -07:00
Makefile powerpc: Use trap metadata to prevent double restart rather than zeroing trap 2020-05-15 11:58:54 +10:00
settings selftests/powerpc: Turn off timeout setting for benchmarks, dscr, signal, tm 2020-03-25 12:09:30 +11:00
sig_sc_double_restart.c powerpc: Use trap metadata to prevent double restart rather than zeroing trap 2020-05-15 11:58:54 +10:00
sigfuz.c selftests/powerpc: Reduce sigfuz runtime to ~60s 2019-10-24 16:57:37 +11:00
signal_tm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
signal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
signal.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sigreturn_vdso.c selftests/powerpc: Add a test of sigreturn vs VDSO 2020-03-20 13:10:21 +11:00