[all-commits] [llvm/llvm-project] 571c8c: [AArch64][v8.3A] Avoid inserting implicit landing ...

Pablo Barrio via All-commits all-commits at lists.llvm.org
Thu Jun 24 10:25:08 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 571c8c5263a79293aaadae07b11feb36726eaf53
      https://github.com/llvm/llvm-project/commit/571c8c5263a79293aaadae07b11feb36726eaf53
  Author: Pablo Barrio <pablo.barrio at arm.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    M llvm/test/CodeGen/AArch64/aarch64-signedreturnaddress.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-sp-mod.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-subtarget.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-v8-3.ll
    M llvm/test/CodeGen/AArch64/pacbti-llvm-generated-funcs-2.ll
    M llvm/test/CodeGen/AArch64/pacbti-module-attrs.ll
    M llvm/test/CodeGen/AArch64/sign-return-address-cfi-negate-ra-state.ll
    M llvm/test/CodeGen/AArch64/sign-return-address.ll

  Log Message:
  -----------
  [AArch64][v8.3A] Avoid inserting implicit landing pads (PACI*SP)

PACI*SP have the advantage that they are in HINT space, meaning
they can be run successfully in hardware without PAuth support -
they will just behave as a NOP. However, PACI*SP are also implicit
landing pads (think of an extra BTI jc). Therefore, they allow
indirect jumps of all kinds into them, potentially inserting new
gadgets. This patch replaces PACI*SP by PACI* LR, SP when
compiling explicitly for hardware with full PAuth support. PACI*
is not in the HINT space, therefore it will fault when run in
hardware without PAuth support, but it is also not a landing pad,
making programs safer in newer HW.

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




More information about the All-commits mailing list