From nobody Mon Feb 19 16:44:59 2024 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 4TdpL41G8rz5C93x; Mon, 19 Feb 2024 16:45:00 +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 4TdpL35WRRz4bKB; Mon, 19 Feb 2024 16:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708361099; 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=Hvm1cX/vqcIpYmPShKQCQ93CwLXVZAkbgfOJ/bsJr7A=; b=fIxk3AkvQVwFBw1yqNqYMMjKsmMrkSVhnWbLK6HXNC1AT5IHZP2Gs8oSAMR9G4iCgQfnxq OIpd7uuenVO36EIU84/xdH2WcyQDd7boL61g+1q9RhqIbkvVpX0utuoDK2FFk3bu2wGHpB 6a3i1wNVveGA6xu/hINy6sYxBWwZU+QbmI2XF+0gTe+MoVef8+vzieyhG41Od/kvawv+e3 0DsaN8sJfrFiHreCgTxwNOyS3RHH/2A3IINhpU6GxGw2LN1btf7RkBC0LRKFyvOrETf8dJ 3MQQgk9uGN0GSQ3hx3Q91r8QH7NQ1qV7Ss8mEc0KcavcBjVXDMbkDVockAHlBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708361099; 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=Hvm1cX/vqcIpYmPShKQCQ93CwLXVZAkbgfOJ/bsJr7A=; b=FNhQRnyVL9Neeq3xS+MndCAfCEYS3EMVJa10WPaDOJ069v6VtiGKSL2mmwTlu1/w6U/SrH pD10obyHjDMus0vcI5OS9rdd+Z1kqcmXRZJXgg9VNVthOT/Xd3TWigiNFO6kd4HAD+yXP7 qNh5YzNLk785yXsCHp+WLx6OsRz5wIDI8qMdVmZicH7UYe47xNTE4lfDqcYCNzU3noEdMJ tXDMQQxRUx4HstpvMGuGF0vwW8Fyh8xBq7dV2gXLo6ZsQsd4wSsoQwSK+MHtfavoykyGaa bSk0RbQYmXpUXrw9eSjfAzry8NMakYK7x3qbBtk9k1E9okp8XC6BE0u9PCl/lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708361099; a=rsa-sha256; cv=none; b=StpKNWZNJe4jftsN63shlU/PH0AFzoMH1bY5C/d+Db9S0oQB99Ew7xxpfYYkCfx2Mkm7ZN EBVVwZR44XGAstnHnOGJBHulhG9IucGH4WhcCZrpXNW5gtLVKZTyqwcvL9VdyeHX3v4ig7 dGdwHMjWAYZUrYtBXZznoEgf8DNfbxJwPWH0Ll89Lb2ivQzf6/tkoUxMfENZR4emBQftoz 2o9iYiFkggJI/S7+kTh629HFMt1MlOfnKJC+jbFru+ugG/kgqVg/nDY6QXvZ6uGuAw7ysr UAXHUdzONBAq4ofV3WDVhxRd8Rarbje3vJqiV0bVj4GC8smOTzZYJ6EfUYHx2Q== 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 4TdpL34bwRzjGq; Mon, 19 Feb 2024 16:44:59 +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 41JGixdo094726; Mon, 19 Feb 2024 16:44:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41JGixSf094723; Mon, 19 Feb 2024 16:44:59 GMT (envelope-from git) Date: Mon, 19 Feb 2024 16:44:59 GMT Message-Id: <202402191644.41JGixSf094723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: adb7f221a25e - stable/13 - arm64: Add a BTI landing pad to .mcount 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: adb7f221a25e466371e6b098dc6dd72b8f28f2c1 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=adb7f221a25e466371e6b098dc6dd72b8f28f2c1 commit adb7f221a25e466371e6b098dc6dd72b8f28f2c1 Author: Andrew Turner AuthorDate: 2023-10-16 14:34:19 +0000 Commit: Andrew Turner CommitDate: 2024-02-19 12:41:50 +0000 arm64: Add a BTI landing pad to .mcount The .mcount function needs a BTI branch target. As we can't rely on asm.h being included use the hint version of a "bti c" instruction. This is a nop when BTI is not supported or not used. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42230 (cherry picked from commit 0590ed0967e025e1d155da9e06509f3fe9686feb) --- sys/arm64/include/profile.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm64/include/profile.h b/sys/arm64/include/profile.h index 972d4ba42607..db119973f820 100644 --- a/sys/arm64/include/profile.h +++ b/sys/arm64/include/profile.h @@ -93,6 +93,8 @@ static void _mcount " .globl .mcount \n" \ " .mcount: \n" \ " .cfi_startproc \n" \ + /* Allow this to work with BTI, see BTI_C in asm.h */ \ +" hint #34 \n" \ /* Load the caller return address as frompc */ \ " ldr x0, [x29, #8] \n" \ /* Use our return address as selfpc */ \