[all-commits] [llvm/llvm-project] cca40a: [AArch64][v8.5A] Add BTI to all function starts

Pablo Barrio via All-commits all-commits at lists.llvm.org
Wed Apr 14 07:24:48 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cca40aa8d8aa732a226c8978e53cd47e7b7c76ec
      https://github.com/llvm/llvm-project/commit/cca40aa8d8aa732a226c8978e53cd47e7b7c76ec
  Author: Pablo Barrio <pablo.barrio at arm.com>
  Date:   2021-04-14 (Wed, 14 Apr 2021)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64BranchTargets.cpp
    M llvm/test/CodeGen/AArch64/branch-target-enforcement.mir
    M llvm/test/CodeGen/AArch64/patchable-function-entry-bti.ll

  Log Message:
  -----------
  [AArch64][v8.5A] Add BTI to all function starts

The existing BTI placement pass avoids inserting "BTI c" when the
function has local linkage and is only directly called. However,
even in this case, there is a (small) chance that the linker later
adds a hunk with an indirect call to the function, e.g. if the
function is placed in a separate section and moved far away from
its callers. Make sure to add BTI for these functions too.

Differential Revision: https://reviews.llvm.org/D99417




More information about the All-commits mailing list