Re: [PATCH] riscv: vector: Fix data pointer constraints in context save/restore

From: Andy Chiu

Date: Fri Sep 11 2026 - 15:08:58 EST


Hi Troy,

On Tue, Sep 8, 2026 at 8:03 AM Troy Mitchell <troy.mitchell@xxxxxxxxx> wrote:
>
> The standard vector save/restore asm advances datap but declares it as
> input-only. An inlined caller reusing the original pointer may therefore
> use the advanced address instead.
>
> Declare datap as read-write so the compiler can preserve the original
> pointer when needed.
>
> Fixes: 03c3fcd9941a ("riscv: Introduce struct/helpers to save/restore per-task Vector state")
> Signed-off-by: Troy Mitchell <troy.mitchell@xxxxxxxxx>

Reviewed-by: Andy Chiu <tchiu@xxxxxxxxxxxxxxx>

Thank you,
Andy Chiu