From nobody Mon Nov 07 21:11:52 2022 X-Original-To: dev-commits-src-main@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 4N5kST1Pq4z4gP25; Mon, 7 Nov 2022 21:11:53 +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 4N5kST08qJz5Xf3; Mon, 7 Nov 2022 21:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667855513; 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=R/2UblMGgpEsHB/9dt+JCgsu5qx6N/JsG7ZVCFlmCNA=; b=vGtlIZRMUGMJoou9NejTtrPCOAtbPpJN5aZ4NpO4eG93dhggTnmJ5dEjncCb40JvUVz5qv xWI1h9bNj45x2/YtzCZwQEX60RfBKPtlrAjaJv/G80W7OlJRl8Em9vOvebLmqKz69dDJqM mya41N11Rell3mz1xm9dnCuND691hHOaTUP9Be40VVZTrekPxBPcI7Y43PDjcV/w3MEqO3 +u+WQu5Nxu64d3Cagef0zAKIB5NMlGleXfniafeYdjSeL269A5fzh3Bj45E1kwdPvDqw2X uofi9uvyXqLgDI21SROPRCcs3P0z9gI8r8tViW2j9L4VOfzEGrcIQfAdS9qR9w== 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 4N5kSS6MX4zG0n; Mon, 7 Nov 2022 21:11:52 +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 2A7LBq4I037394; Mon, 7 Nov 2022 21:11:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A7LBqSP037393; Mon, 7 Nov 2022 21:11:52 GMT (envelope-from git) Date: Mon, 7 Nov 2022 21:11:52 GMT Message-Id: <202211072111.2A7LBqSP037393@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: 3c0e9169a357 - main - ksan: Build sanitizer runtimes without stack-smashing protection List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 3c0e9169a357f6d99b80c02dd27210d742797cf2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667855513; 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=R/2UblMGgpEsHB/9dt+JCgsu5qx6N/JsG7ZVCFlmCNA=; b=Hispnk8rR6VPVdIs4IH443KdRO20yLyElaUGj53/PwUSNyX9qGh9GgfdGcS4TywQD70Yxv LaaobFnWUHxxU6433RbUaTkvS2AhNtUtEYwqElp2BbvjQpd6e7k2ZXYMRtE7kgL6dS0o0m tzRWpn+6dR8xVoebyvg6PPSC2gfx/RM3jl/8y5fMWezkvyU4ez9gSxImf8ayU+SDDz6BYk D4qOMAu/FpKuhD4XHxsQv52AjAIUakVPUrpog6TI/aotUtLm/xWUCjdDsIT0EkIg/frT0z PeXAja77V2JNAOI2hz4218LXnC+XwI5xwozqBudsb6oRwetTIDLOrzicIWY5nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667855513; a=rsa-sha256; cv=none; b=vJxASql8k69lh/p9AD5pHerDE6sJm7CWFXhI4/grCwr80iGHQqrnevi5C07MUwaGZdW6z+ Zyl7N1iRJQPKNlpWuMYHMWNWFfdW4Bb5CJpmdd15Om9GAWiCv0bBHgbjRy85G2uFcv7u1/ tnb9U6Sp6lys2g04EYLvAPAr8k8tTX11o5FYyjxoEGQqWu7VMcFNwHyfO1Z+5SO0XHO1Ec XjDDTZPY7w5tt/CBqQ9X9cbOwRtEHlM4Y2KPCQ+jnqEJjuGFyRa/KSC154CeJT5/1XaVCz gGVt2YOojuG7tvme8T2qRNgb2F5ZOPrlhvY21pt9F7SGFoj9xms4toRwt84Dxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3c0e9169a357f6d99b80c02dd27210d742797cf2 commit 3c0e9169a357f6d99b80c02dd27210d742797cf2 Author: Mark Johnston AuthorDate: 2022-11-07 21:07:26 +0000 Commit: Mark Johnston CommitDate: 2022-11-07 21:10:48 +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. --- sys/conf/files | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index e8b2e02e79d9..30ed2416987e 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3874,7 +3874,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 @@ -3889,7 +3889,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 @@ -3908,7 +3908,7 @@ kern/subr_log.c standard kern/subr_mchain.c optional libmchain kern/subr_module.c standard kern/subr_msan.c optional kmsan \ - compile-with "${NORMAL_C:N-fsanitize*}" + compile-with "${NORMAL_C:N-fsanitize*:N-fstack-protector*}" kern/subr_msgbuf.c standard kern/subr_param.c standard kern/subr_pcpu.c standard