From nobody Fri Oct 20 16:02:27 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 4SBq9J2MCVz4xwqy; Fri, 20 Oct 2023 16:02:28 +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 4SBq9J0VWsz3HcR; Fri, 20 Oct 2023 16:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697817748; 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=Y5vdzpBpoHMSEMW5Jl6fpkc4iSs+SkJDICaRBrvu0wU=; b=u89UQGaj7vpa/AyTNQ4pRs29neR+nC/xSdYX9zcJz1vM39IJNBdv6EpB8J4gOWwa82VSSR s2CGR1PBsbZv5d826ADHLMU4GEAcRn3Y77/jPkxW339C9yKeZrzyVxf7p+sNvi8DAv4/5b vcqxp79xiRItBxpNeCPii+tUyrrC1DcBbSbh1EddXY4lJPSNYhUGDW8pDv7DAxIRU+f4Pz zrmj+4QQCWtCIsipJegU4tPJT3EmQcw2kQd6u39I4XHr3uDOn5Z7e5/PqaBjMaNnJGAgI4 eEollyTWdO3Wrj2iDTwT+JmBzSc1ZwDeOqQxFxntVc1LhNG4nPmo0yiA0wtPSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697817748; a=rsa-sha256; cv=none; b=HCLuQr9aAcoK0p+M3ggNHVAhmD5WHByQ1QsDztoHRyCoGWQ0iPCqI5NvFhOCGSjfhBVIBC rlAfFuCAwyHdHp9HKo2pIRaYdHbIvlls3G5wuymHbEkVkhCOL8oTg2k1H6NcL5TLRKuX7o raTTB/W34njeakTSHMvu220T5qKZvyRsjjEjq4XSz1YWsMIjuV4h19kO9Xl/lVZAKjwr+n VVqMHkNKbJwe+LVVglDtLZQiy1LYlekWF+vGNNkKv0y8INwZTi9opujMhYWLhY2XSKebxn tvchbuBzSivgSFeJ1eatZWVkg7eRTk0F5Kn21AOp5eMDdrCZ3DQpW+5zdLWM2g== 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=1697817748; 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=Y5vdzpBpoHMSEMW5Jl6fpkc4iSs+SkJDICaRBrvu0wU=; b=D4vvsCsQ9fbsLm3NH9Z0+3qNY1dr+b7xu4TXQ5M3QME/NMbmZhSB9pxZlcObgiKGQApo+Y 6GdFlc9DI2aSDFbuuG0+EFIC9QPwC8eMo28mBljRB2aWzv2UoEr35MwBCg9cXoG6FHQE5T fEEAdwx0rA/68wiDYcZmlyh1l5B7JN1/mF/UedzDdI9YAAcQzg2HQDvYPLHZQI2zkFtgt3 31UMjq7fvbX8O7QlaGpKhTvd2tPtM0KAMEj00GqHUt+eSBsiwPLUm/eY1YNja+qJrWFBPK 9c694gCwzGYwgeq4x+A3hxIz2MkRCciEgsMRSM9Ew81adsPsSm++qneXmFNMHA== 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 4SBq9H6j6Zzfl1; Fri, 20 Oct 2023 16:02:27 +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 39KG2R0P038858; Fri, 20 Oct 2023 16:02:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KG2Rk1038855; Fri, 20 Oct 2023 16:02:27 GMT (envelope-from git) Date: Fri, 20 Oct 2023 16:02:27 GMT Message-Id: <202310201602.39KG2Rk1038855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c89523d1c4be - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: c89523d1c4be8f3408fb591261f3093b65dbb675 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c89523d1c4be8f3408fb591261f3093b65dbb675 commit c89523d1c4be8f3408fb591261f3093b65dbb675 Author: Mark Johnston AuthorDate: 2023-10-16 19:45:42 +0000 Commit: Mark Johnston CommitDate: 2023-10-20 16:02:05 +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. (cherry picked from commit b6c653c9746342b373af01979319b3cb123b2872) --- 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 f2a31eb24f25..62eb54a0b765 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