Re: [PATCH v1] riscv: signal: mark the FP state clean before restoring it from the frame
From: Nickolai Zeldovich
Date: Sat Oct 31 2026 - 12:20:20 EST
On Fri, Oct 30, 2026 at 5:45 PM Andy Chiu <tchiu@xxxxxxxxxxxxxxx> wrote:
> I would prefer adding this into riscv selftest just to keep future
> developments intact.
> [...]
> With the v2 patch from Guobin [1], consider something like:
>
> if ((regs->status & SR_FS) != SR_FS_OFF) {
> preempt_disable();
> __fstate_clean(regs);
> preempt_enable();
Thanks -- I just sent a v2 with both changes: preempt_disable() around
__fstate_clean() and a selftest in
tools/testing/selftests/riscv/sigreturn/.
https://lore.kernel.org/lkml/20261031161826.858908-1-nickolai@xxxxxxxxxxxxx/
Nickolai.