[all-commits] [llvm/llvm-project] 36b3c4: [AArch64] PAUTH_PROLOGUE should not be duplicated ...

Oliver Stannard via All-commits all-commits at lists.llvm.org
Wed Jan 29 02:43:11 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 36b3c43524c8ca86a5050496b8773f07c5ccddff
      https://github.com/llvm/llvm-project/commit/36b3c43524c8ca86a5050496b8773f07c5ccddff
  Author: Oliver Stannard <oliver.stannard at arm.com>
  Date:   2025-01-29 (Wed, 29 Jan 2025)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    A llvm/test/CodeGen/AArch64/pauthlr-prologue-duplication.mir

  Log Message:
  -----------
  [AArch64] PAUTH_PROLOGUE should not be duplicated with PAuthLR (#124775)

When using PAuthLR, the PAUTH_PROLOGUE expands into a sequence of
instructions which takes the address of one of those instructions, and
uses that address to compute the return address signature. If this is
duplicated, there will be two different addresses used in calculating
the signature, so the epilogue will only be correct for (at most) one of
them.

This change also restricts code generation when using v8.3-A return
address signing, without PAuthLR. This isn't strictly needed, as
duplicating the prologue there would be valid. We could fix this by
having two copies of PAUTH_PROLOGUE, with and without isNotDuplicable,
but I don't think it's worth adding the extra complexity to a security
feature for that.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list