From nobody Mon Nov 21 13:53:27 2022 X-Original-To: dev-commits-src-branches@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 4NG847392Tz4j5vL; Mon, 21 Nov 2022 13:53:27 +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 4NG8471t7xz47Vg; Mon, 21 Nov 2022 13:53:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669038807; 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=312sVPQob/OFOP6myCzUI4t/btdPREi0eA9BzTeyuUM=; b=IffeGBt0emNrj8G/YvdokEYTgyLzMlyL8WXRYK2zN+jbxTL1wczcVlgEbndAluMZGABmtD DegF+oEhpFP12X8zYBMMLUHGOnDgRroQfzVu0hUKFwA25Bzcsq9FcDjfRcTy4a3NbjMt43 TT9jD3abCdSfzrA8hXeP8yREKrF+TEDEkNLUnAGWQgzi62MEElU6Oz5C21YfNuhpFtPalC yBiQq/E/tBDvGDOUCJTu5TGRWSw8RX0cWu+M6BrnXzlnmdHjqjSJTbXMBLRIyn/iJcnVlj W2L0sCgRX4KR7G1er549vOEucl4A1RSBfuhrEpOUifR55RsEyda1W7zn1CEeXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669038807; 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=312sVPQob/OFOP6myCzUI4t/btdPREi0eA9BzTeyuUM=; b=pUH4Bo7LpP2C+pC1Of48zrBSbE67LgNZ7ezTY2Us0CJIQkNsjTzAKlPfMkFr/c4eWPajbw 2mjRuwztoC/eR5Vm69M5auSnBzDJ1UjD+Y0zP8q3ksBePfdw0z4WJ2QUhf1HWRz4Q9AY55 oZ8g/XemCX5sc5CpoijkLr8U14rjKIzU9A3QdElVVN05rihZXCVGe/TAtxtnJ3fEQVoJPp KhtlQf6R3BnksNWl4Z3WJg3uii/g28OAfkgQpoZmm4TNPfWfkQYGjI7VRPPohNYArKfY84 KfPPq1mJAlWCIzRhgydbh+1uhFLaAss9KtfPUIbIb0jwxH4o6MCLROGlfqmzLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669038807; a=rsa-sha256; cv=none; b=A6/p4a1cBl8ERDlyHKmasceqw5eQ9wkR/bLKOzLeSDSW94gddYxIyc2Ke+VfZ6HVq+W3uT VL3SfxB/Jtni8ZKb+rf12OcgwxmPNDvuOBQjbmSguUG/2DvZEELsZoj63Tno82By1XkmjS Z9+R1WyvcSFEr0tNPOhD0V3hfkM5sUk37DkChoWTko7ssMbepAIW8HfGgXS3RD+frWcU/+ reyBOHHw/Eg2Tb8W52CLkhxTca0kVDUpXtHiq90xEjtI5WmIhy9/TEJ60Iwh1cJ54qDxbw 0sVP14o0uXmCXW4WWaQVDWVN0ySuZml1X1QFOr337oIinzyOHW3hxnTblwcfAg== 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 4NG8470zDMz15gM; Mon, 21 Nov 2022 13:53:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2ALDrRYm083468; Mon, 21 Nov 2022 13:53:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ALDrRU8083467; Mon, 21 Nov 2022 13:53:27 GMT (envelope-from git) Date: Mon, 21 Nov 2022 13:53:27 GMT Message-Id: <202211211353.2ALDrRU8083467@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: 79e5fc020e0c - stable/13 - ksan: Build sanitizer runtimes without stack-smashing protection List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 79e5fc020e0cd02d81f7d3ec9ff974ddff8e4ca0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=79e5fc020e0cd02d81f7d3ec9ff974ddff8e4ca0 commit 79e5fc020e0cd02d81f7d3ec9ff974ddff8e4ca0 Author: Mark Johnston AuthorDate: 2022-11-07 21:07:26 +0000 Commit: Mark Johnston CommitDate: 2022-11-21 13:48:39 +0000 ksan: Build sanitizer runtimes without stack-smashing protection On arm64 with per-thread stack canaries enabled (the PERTHREAD_SSP option), the compiler may load curthread->td_md.md_canary in function prologues. This is not safe in data_abort(); see commit 2c10be9e06d4. Thus, sanitizer runtimes must also avoid accessing the current thread's canary. Since SSP has limited utility in sanitizer runtimes, simply disable it unconditionally to avoid unpleasant surprises in the future. MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. (cherry picked from commit 3c0e9169a357f6d99b80c02dd27210d742797cf2) --- sys/conf/files | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 5a02fe8f9f36..8d8b27940948 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3916,7 +3916,7 @@ kern/stack_protector.c standard \ kern/subr_acl_nfs4.c optional ufs_acl | zfs kern/subr_acl_posix1e.c optional ufs_acl kern/subr_asan.c optional kasan \ - compile-with "${NORMAL_C:N-fsanitize*}" + compile-with "${NORMAL_C:N-fsanitize*:N-fstack-protector*}" kern/subr_autoconf.c standard kern/subr_blist.c standard kern/subr_boot.c standard @@ -3931,7 +3931,7 @@ kern/subr_coverage.c optional coverage \ compile-with "${NORMAL_C:N-fsanitize*}" kern/subr_counter.c standard kern/subr_csan.c optional kcsan \ - compile-with "${NORMAL_C:N-fsanitize*}" + compile-with "${NORMAL_C:N-fsanitize*:N-fstack-protector*}" kern/subr_devstat.c standard kern/subr_disk.c standard kern/subr_early.c standard