Re: [PATCH v2 18/33] lib/string: Add KMSAN support to strlcpy() and strlcat()

2023-12-12 Thread Ilya Leoshkevich
On Fri, 2023-12-08 at 17:50 +0100, Alexander Potapenko wrote: > On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich > wrote: > > > > Currently KMSAN does not fully propagate metadata in strlcpy() and > > strlcat(), because they are built with -ffreestanding and call > > memcpy(). In this combinatio

Re: [PATCH v2 18/33] lib/string: Add KMSAN support to strlcpy() and strlcat()

2023-12-08 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich wrote: > > Currently KMSAN does not fully propagate metadata in strlcpy() and > strlcat(), because they are built with -ffreestanding and call > memcpy(). In this combination memcpy() calls are not instrumented. Is this something specific to s390?

[PATCH v2 18/33] lib/string: Add KMSAN support to strlcpy() and strlcat()

2023-11-21 Thread Ilya Leoshkevich
Currently KMSAN does not fully propagate metadata in strlcpy() and strlcat(), because they are built with -ffreestanding and call memcpy(). In this combination memcpy() calls are not instrumented. Fix by copying the metadata manually. Add the __STDC_HOSTED__ #ifdef in case the code is compiled wit