Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 2023 13:38:19 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 688c44068ad9 - stable/14 - kmsan: Use __builtin_memset to initialize per-thread state
Message-ID:  <202310241338.39ODcJZo089120@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=688c44068ad977e0714ae30e0c52ebe172309d0c

commit 688c44068ad977e0714ae30e0c52ebe172309d0c
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-10-16 19:37:19 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-10-24 13:17:44 +0000

    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)
---
 sys/kern/subr_msan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310241338.39ODcJZo089120>