Re: [PATCH 2/2] s390/fpu: Fix kmsan in fpu_vstl function

From: Heiko Carstens

Date: Fri Nov 07 2025 - 05:49:42 EST


On Fri, Nov 07, 2025 at 11:26:50AM +0100, Alexander Potapenko wrote:
> On Thu, Nov 6, 2025 at 5:09 PM Aleksei Nikiforov
> <aleksei.nikiforov@xxxxxxxxxxxxx> wrote:
> > @@ -409,6 +410,7 @@ static __always_inline void fpu_vstl(u8 v1, u32 index, const void *vxr)
> > : [vxr] "=R" (*(u8 *)vxr)
> > : [index] "d" (index), [v1] "I" (v1)
> > : "memory", "1");
> > + instrument_write_after(vxr, size);
> > }
>
> Wouldn't it be easier to just call kmsan_unpoison_memory() here directly?

I guess that's your call. Looks like we have already a couple of
kmsan_unpoison_memory() behind inline assemblies.

So I guess we should either continue using kmsan_unpoison_memory()
directly, or convert all of them to such a new helper. Both works of
course. What do you prefer?