From nobody Mon Sep 16 19:43:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+101932+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101932+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1679914919; cv=none; d=zohomail.com; s=zohoarc; b=lbe5COEaUiHn90oDQFiIxEnVYb2MVdo6kSSwv9+W04tHDwJm4vsXmS8AZ8PYKzSJ8UO/Ugki76vNngKCMFvOpNi5pruUmr9CiVWBHd5LheQKqPUuGBJ3RGbeBZowLpY6MP/wLFzVhd4NcxhrxmBeuGeJJIB1mdopgw5+oE1n1oA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679914919; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=VOnhgCaB9bnE7LDNuTKzArH9ERFtQHToEjiO28isMIY=; b=X6RbMWSo0exEOhkXZEDfd6TMP1X5isR6R16OWR94azrDVF8icSD0QhcXIhLXSdF3HcTtq0rUdQCZIJX/ZYQdgoeUd9g0g9PfPo2qzNfYXppRGL0JDubfOEcuJYDb3Abph2zstJxACLLrXrOrIdvCpi17VeOvluKTqpy6jh3BfLg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101932+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1679914919804500.1238048270535; Mon, 27 Mar 2023 04:01:59 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id xqAwYY1788612x0YXIqzArXm; Mon, 27 Mar 2023 04:01:59 -0700 X-Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web10.31895.1679914918389507896 for ; Mon, 27 Mar 2023 04:01:58 -0700 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DC311B80D5F; Mon, 27 Mar 2023 11:01:56 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2105BC433A1; Mon, 27 Mar 2023 11:01:52 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Michael Kinney , Liming Gao , Jiewen Yao , Michael Kubacki , Sean Brogan , Rebecca Cran , Leif Lindholm , Sami Mujawar , Taylor Beebe , =?UTF-8?q?Marvin=20H=C3=A4user?= , Bob Feng Subject: [edk2-devel] [PATCH v2 08/17] MdePkg/BaseRngLib AARCH64: Make asm files BTI compatible Date: Mon, 27 Mar 2023 13:01:03 +0200 Message-Id: <20230327110112.262503-9-ardb@kernel.org> In-Reply-To: <20230327110112.262503-1-ardb@kernel.org> References: <20230327110112.262503-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ardb@kernel.org X-Gm-Message-State: JWs78jbdcFDGK7zxZSLBCtL4x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1679914919; bh=1N75jUpk26nokFKPapUMyQjbF4oh+D7Axle85daP43I=; h=Cc:Date:From:Reply-To:Subject:To; b=bHn3riCrWCKLHdOAOy+D4cXWRG6wmLx5ZRekQcS4kBMQAUIGOXfvjrqE2+Whj1xD+8Z qjOb2YA4wtIUzW2ew6Jb3FNoTqp8BIR1gGhtDkn7WaALtnxV2mR5K5EF86KL35HYEwyaq sTjEwyLCZGHIyflHKrXoasOms6Xj/or6WBc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1679914921218100001 Content-Type: text/plain; charset="utf-8" Add the BTI instructions and the associated note to make the AArch64 asm objects compatible with BTI enforcement. Signed-off-by: Ard Biesheuvel --- MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S | 3 +-- MdePkg/Library/BaseRngLib/AArch64/ArmRng.S | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S b/MdePkg/Li= brary/BaseRngLib/AArch64/ArmReadIdIsar0.S index 82a00d36221278e0..d30b63fe5c68c565 100644 --- a/MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S +++ b/MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S @@ -25,7 +25,6 @@ GCC_ASM_EXPORT(ArmReadIdIsar0) # ); # ASM_PFX(ArmReadIdIsar0): + AARCH64_BTI(c) mrs x0, id_aa64isar0_el1 // Read ID_AA64ISAR0 Register ret - - diff --git a/MdePkg/Library/BaseRngLib/AArch64/ArmRng.S b/MdePkg/Library/Ba= seRngLib/AArch64/ArmRng.S index 5159f467e3a6cd6e..27a847b996fd1d2a 100644 --- a/MdePkg/Library/BaseRngLib/AArch64/ArmRng.S +++ b/MdePkg/Library/BaseRngLib/AArch64/ArmRng.S @@ -31,6 +31,7 @@ GCC_ASM_EXPORT(ArmRndr) # ); # ASM_PFX(ArmRndr): + AARCH64_BTI(c) mrs x1, RNDR str x1, [x0] cset x0, ne // RNDR sets NZCV to 0b0100 on failure --=20 2.39.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101932): https://edk2.groups.io/g/devel/message/101932 Mute This Topic: https://groups.io/mt/97879289/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-