From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QbGor4vV; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) 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) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2105BC433A1; Mon, 27 Mar 2023 11:01:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679914915; bh=e1ZcZBuYV6TvZ5CL4bE/kTfM067iMrVq2WRDDBb24Ls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QbGor4vV5aznGC9tU6SphOKhdvrpBVqDHFJqgVkHh8mni7zYul6bN3Upr1SK4iJxR +OX/HpFSf0nRb1f9qEjnr6Zia309Zx4N4b09W86dNShjbhDxhH4XLqdoVy8YqrXbpF OZTFwLel5wnOqGKtqINof4LVhlxot4A6AVaTqT0eaiVRcF9dvafzkCTcSyfHj5WJlc pFBHoATV3Q8YCruANhggtfcnLHAqXiQ8BVdHBYJcT27XdqU4gGhZMONJslxNvqoPQn vYAIkyL3JfVNjcjHG+AI6CkZMhFpOCRfrfP8ot83o41mm/3gRUULoBlGg6ynG6xg3U IMuM4BwAjR4Pw== 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: [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> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230327110112.262503-1-ardb@kernel.org> References: <20230327110112.262503-1-ardb@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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) # );=0D #=0D ASM_PFX(ArmReadIdIsar0):=0D + AARCH64_BTI(c)=0D mrs x0, id_aa64isar0_el1 // Read ID_AA64ISAR0 Register=0D ret=0D -=0D -=0D 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) # );=0D #=0D ASM_PFX(ArmRndr):=0D + AARCH64_BTI(c)=0D mrs x1, RNDR=0D str x1, [x0]=0D cset x0, ne // RNDR sets NZCV to 0b0100 on failure=0D --=20 2.39.2