]> xenbits.xensource.com Git - ovmf.git/commitdiff
MdePkg/BaseRngLib AARCH64: Make asm files BTI compatible
authorArd Biesheuvel <ardb@kernel.org>
Sat, 25 Mar 2023 17:12:55 +0000 (18:12 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 30 Mar 2023 11:05:22 +0000 (11:05 +0000)
Add the BTI instructions and the associated note to make the AArch64 asm
objects compatible with BTI enforcement.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com>
MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S
MdePkg/Library/BaseRngLib/AArch64/ArmRng.S

index 82a00d36221278e0047c97a2d44ea704a68ebbff..d30b63fe5c68c565a84f135024ac0e6314bb9f9c 100644 (file)
@@ -25,7 +25,6 @@ GCC_ASM_EXPORT(ArmReadIdIsar0)
 #  );\r
 #\r
 ASM_PFX(ArmReadIdIsar0):\r
+  AARCH64_BTI(c)\r
   mrs  x0, id_aa64isar0_el1 // Read ID_AA64ISAR0 Register\r
   ret\r
-\r
-\r
index 5159f467e3a6cd6e357896dbf81a4df3d5a2b839..27a847b996fd1d2a0c82cdca304b09d9c8d08053 100644 (file)
@@ -31,6 +31,7 @@ GCC_ASM_EXPORT(ArmRndr)
 #  );\r
 #\r
 ASM_PFX(ArmRndr):\r
+  AARCH64_BTI(c)\r
   mrs  x1, RNDR\r
   str  x1, [x0]\r
   cset x0, ne    // RNDR sets NZCV to 0b0100 on failure\r