[PATCH v1] riscv: signal: mark the FP state clean before restoring it from the frame

Nickolai Zeldovich nickolai at csail.mit.edu
Sat Oct 31 09:20:01 PDT 2026


On Fri, Oct 30, 2026 at 5:45 PM Andy Chiu <tchiu at tenstorrent.com> 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@csail.mit.edu/

Nickolai.



More information about the linux-riscv mailing list