diff options
author | Mark Johnston <markj@FreeBSD.org> | 2023-10-16 19:37:19 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2023-10-24 13:17:44 +0000 |
commit | 688c44068ad977e0714ae30e0c52ebe172309d0c (patch) | |
tree | 6ebffad1f31adf6d7b9c93728a6e82dc9b935afd | |
parent | ab6bc4893e4d0d0932b023c48231c7bb63c0baf2 (diff) | |
download | src-688c44068ad977e0714ae30e0c52ebe172309d0c.tar.gz src-688c44068ad977e0714ae30e0c52ebe172309d0c.zip |
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.
(cherry picked from commit e5caed14067b40f1454d74e99789a28508d0eea3)
-rw-r--r-- | sys/kern/subr_msan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_msan.c b/sys/kern/subr_msan.c index 54948370a14a..f8fdcf478b79 100644 --- a/sys/kern/subr_msan.c +++ b/sys/kern/subr_msan.c @@ -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) |