[PATCH v6 6/8] riscv: vector: adjust ptrace and signal behavior for INITIAL state

Paul Walmsley pjw at kernel.org
Tue Nov 3 19:46:49 PST 2026


Hi Andy,

On Fri, 18 Sep 2026, Andy Chiu wrote:

> The last patch introduced the INITIAL vector state to avoid saving and
> restoring vector registers across syscall boundaries. However, this
> optimization did not fully account for the ptrace and signal handling
> interfaces.
> 
> As a result, two issues emerged:
> 1. Ptrace reads at syscall stop could observe stale, non-nulled
>    registers.
> 2. Modifications to the ucontext through signal interface during a
>    syscall stop would be overwritten by the vector discaring macro.

If patch 5 introduces bugs that then need to be fixed by this patch 6, 
then either the two patches should be combined, or patch 5 needs to be 
rewritten so that it doesn't introduce bugs.  That way, bisectability is 
preserved without introducing unexpected regressions.  Care to take a look 
and figure out what the best approach is in this case?


thanks,

- Paul



More information about the linux-riscv mailing list