From nobody Tue Oct 17 13:37:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8w4x24yQz4xWfh; Tue, 17 Oct 2023 13:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S8w4x0gCtz3Ff6; Tue, 17 Oct 2023 13:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697549825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IxgVXk982FwBRgHrOzWxTzjmqjMi7m06+Wt48lgLPS8=; b=mEKLZvib/3S2ewTzV0FxLPgvRYHi3ZbdDzbdqGr7Z3eBytCpTQOBN3QZ1aFyBvITidzvkP 4/xWUV8i7na60fwFCNkPixMnWHyanIr9u37/qKC8Taak7vCORaRYXvldPqAMmHKSXFxW3C sBWhfdx8Fo6URZq43+OipcgPNiwJ6D6bdL8vbPN3RHx6TAp+yHq1C/8LVz89hQHIEcYNlB /FI7422RjyLUw8nJc+Zb+Syh6tj7a204d7LRvNKcd/G76CjV6HleLdRHfspDEy5FabBkTd E9c/3IkkEcHoDt8F9hGs1GKzcvnqYf3fugzgE/j1fqbfeb1VnzqWwt6FXx/uIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697549825; a=rsa-sha256; cv=none; b=K7XHLeyEAdUB9HDqHnBSDCF3Z+ey1T5Ds9kmtnj6or/bwueNZ5LcKv3E+VJFgZlAuITTJ4 7GeKxN+ePrhd0/4rm8WPhz5bSiql+RstgnXWi2fYy6BSHk/s8eVMfXZ6W9AihT7bzeTser A+78pEPigag0ZyaOYjwU2xa2UaCfFhPEpm7ERafbLNMsgK1ZUwHAJl1gfJz5wGZ+w0sbOz lEtEiWWNaYz2nP/lzbQqWmVNzgwYWQiR4OcMcouX6/G4ZRm1M0UEQw3TlO7x6KW2Z2bMQB 15inSeDwbnaT9XyEH4EsbnuPefTV5Tr2968q+hO/vq3lk4Ov+LGLJJmbrnc6sQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697549825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IxgVXk982FwBRgHrOzWxTzjmqjMi7m06+Wt48lgLPS8=; b=mFQFpvixKKM3J5hovPuLnNeHnsL+SUcxVrQw9O561RjonBjnG72BXj3O3MIz9YHpqXsMur KnbgHW7RUCe2BjR6JncPF8lb399IuOxApxOk0HqzOKu2NUclw/3hhZybf1ROFetgW3A0J8 wpVFLetb407oAagpQgKHyJdV5XDOJ/zYrrq/y0SH47H+7BN3pj80Hwe201MNcv/wyjVEDw CAhYsqiUh9eXoiI6VAsWQc0Ys64uiVqWW4ZuNfYxH0ccfT4dAEPqm+nC+lSwNbJjpRCAmP Hj8B6zVhzXpomfRmB5jIFKoXDaa5JO+8sMJ//ZsQxtnWBtW64kijg8FWZ2eEKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8w4w6sBkz9hp; Tue, 17 Oct 2023 13:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39HDb4Nd095689; Tue, 17 Oct 2023 13:37:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HDb4Xp095686; Tue, 17 Oct 2023 13:37:04 GMT (envelope-from git) Date: Tue, 17 Oct 2023 13:37:04 GMT Message-Id: <202310171337.39HDb4Xp095686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b6c653c97463 - main - kmsan: Set -fno-sanitize-memory-param-retval for now List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b6c653c9746342b373af01979319b3cb123b2872 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b6c653c9746342b373af01979319b3cb123b2872 commit b6c653c9746342b373af01979319b3cb123b2872 Author: Mark Johnston AuthorDate: 2023-10-16 19:45:42 +0000 Commit: Mark Johnston CommitDate: 2023-10-17 13:05:45 +0000 kmsan: Set -fno-sanitize-memory-param-retval for now As of LLVM 16, -fsanitize-memory-param-retval is the default. It yields significantly smaller code, but the KMSAN runtime interceptors need to be updated to stop checking shadow state of parameters. Apply a minimal workaround for now. MFC after: 3 days Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. --- sys/conf/files | 2 +- sys/conf/kern.pre.mk | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index dc837eb02c06..8c3bdca61905 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3872,7 +3872,7 @@ kern/subr_mchain.c optional libmchain kern/subr_memdesc.c standard kern/subr_module.c standard kern/subr_msan.c optional kmsan \ - compile-with "${NORMAL_C:N-fsanitize*:N-fstack-protector*}" + compile-with "${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fstack-protector*}" kern/subr_msgbuf.c standard kern/subr_param.c standard kern/subr_pcpu.c standard diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 4d37cd4156f0..158175eb6899 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -122,8 +122,11 @@ SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kcsan \ KMSAN_ENABLED!= grep KMSAN opt_global.h || true ; echo .if !empty(KMSAN_ENABLED) +# Disable -fno-sanitize-memory-param-retval until interceptors have been +# updated to work properly with it. SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kmsan \ - -fsanitize=kernel-memory + -fsanitize=kernel-memory \ + -fno-sanitize-memory-param-retval .endif KUBSAN_ENABLED!= grep KUBSAN opt_global.h || true ; echo