kmsan: Use __builtin_memset to initialize per-thread state

Accesses to KMSAN's TLS block are not instrumented, so there's no need
to use kmsan_memset().  No functional change intended.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	Juniper Networks, Inc.
This commit is contained in:
Mark Johnston 2023-10-16 15:37:19 -04:00
parent 7123222220
commit e5caed1406

View file

@ -452,7 +452,7 @@ kmsan_thread_alloc(struct thread *td)
sizeof(int));
mtd = malloc(sizeof(*mtd), M_KMSAN, M_WAITOK);
}
kmsan_memset(mtd, 0, sizeof(*mtd));
__builtin_memset(mtd, 0, sizeof(*mtd));
mtd->ctx = 0;
if (td->td_kstack != 0)