This is the program that found and reproduces the races fixed in
1f1043d550ea: the checker loads f14-f31 with a pattern, sends itself a
signal and stores the registers again, so the store takes the lazy
reload trap, while helper threads pinned to its CPU keep other patterns
in the hardware registers and are woken from another CPU to preempt the
checker at random points. Any mismatch means the kernel handed the
thread another thread's registers.
The register loads, the thr_kill(2) and the pipe round trip with the
helper are in assembly so that nothing touches the FP registers between
the sigreturn and the stores. It runs for ten seconds and is skipped
with fewer than two CPUs.
On a POWER9 pseries guest without 1f1043d550ea it fails with 128 of
204000 round trips corrupted; with it, it passes.