Re: [PATCH v2 2/2] selftests: riscv: test FP state restore when rt_sigreturn() faults
From: Nickolai Zeldovich
Date: Sun Nov 15 2026 - 21:32:01 EST
On Thu, Nov 5, 2026 at 12:59 PM Andy Chiu <tchiu@xxxxxxxxxxxxxxx> wrote:
>
> Hi Nickolai,
>
> On Sat, Oct 31, 2026 at 12:18:26PM -0400, Nickolai Zeldovich wrote:
> > Add a test for the previous patch: the signal frame sits on a
> > userfaultfd page that the handler drops after dirtying the FP
> > registers, so rt_sigreturn() sleeps in the middle of copying the FP
> > registers from the frame. The interrupted code must get its own
> > registers back.
> >
> > The test is skipped without the D extension or when userfaultfd is not
> > available to the caller.
> >
>
> The test is failing on qemu, with or without the patch applied.
Oops, thanks for catching that, it was a bug in the test (clang
preserved the local register variables until the inline asm ecall, but
gcc didn't). Sending a v3 with a fixed test that doesn't needlessly
rely on local register variables.
Nickolai.