[all-commits] [llvm/llvm-project] 184d17: [AArch64] PAUTH_PROLOGUE should not be duplicated ...
Oliver Stannard via All-commits
all-commits at lists.llvm.org
Fri Jan 31 17:57:04 PST 2025
Branch: refs/heads/release/20.x
Home: https://github.com/llvm/llvm-project
Commit: 184d1783db8d67c3c2c7983e296151a131c6ba4e
https://github.com/llvm/llvm-project/commit/184d1783db8d67c3c2c7983e296151a131c6ba4e
Author: Oliver Stannard <oliver.stannard at arm.com>
Date: 2025-01-31 (Fri, 31 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.
(cherry picked from commit 36b3c43524c8ca86a5050496b8773f07c5ccddff)
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