[PATCH] D90868: [IR] Define @llvm.ptrauth intrinsics.

Ahmed Bougacha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 1 10:26:38 PDT 2021


ab added a comment.

In D90868#3097845 <https://reviews.llvm.org/D90868#3097845>, @apazos wrote:

> Shouldn't we add a reference for the AArch64 PAuth ELF ABI document: https://github.com/ARM-software/abi-aa/tree/main/pauthabielf64
> I only see reference to Darwin arm64e ABI documentation.

I was thinking documentation about ELF support would be added at the same time as ELF support itself, the same way the paragraph about arm64e asm/mach-o extensions is added in later patches.  But arm64e does have a mention here, so this does deserve a mention and a link as well.  I'll let you folks add more detailed docs later, if needed.

In D90868#3097884 <https://reviews.llvm.org/D90868#3097884>, @apazos wrote:

> Can you highlight clearer what might be specific to Apple in these intrinsics declarations?
> I mean, if we want to support the intrinsics for aarch64, now that we have the AArch64 Pointer Authentication ABI extension to ELF document, we should be able to reuse the intrinsics as they are defined now.

I think the main bit that doesn't follow from the ISA is the implementation of `@llvm.ptrauth.blend`.  I believe the ELF ABI does the same as arm64e, but there's always the possibility some other platform ends up with a different implementation.  Either way, the intrinsic doesn't specify its implementation, so all the intrinsics defined here shouldn't be specific to the Darwin or ELF ABIs.
The concepts of "address"/"integer" "discriminators" (and thus "blend" itself) are also higher-level concepts that don't directly map to the ISA, but seem widely applicable to most usage of pointer authentication.

In D90868#3097864 <https://reviews.llvm.org/D90868#3097864>, @apazos wrote:

> Also, did we agree on a common prefix for pointer authentication? 
> I see 'ptrauth' in this patch, and in Apple's arm64e ABI for pointer authentication. 
> But AArch64 Pointer Authentication ABI extension to ELF refers to 'pauth'.
> It will be less confusing to use the same acronym.

Good point, I changed various references to Armv8.3-a/PAC to focus on "PAuth", since that's the current name of the ISA feature.  Like John described, I don't think it's realistic to change "ptrauth" for our usage, and I would add that overall it seems okay that we'd have different nomenclature for different things, at the source level and in compilers, vs at lower levels (Darwin's "arm64e" is already quite different; not to mention all of our "System V" or "Itanium")


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90868/new/

https://reviews.llvm.org/D90868



More information about the llvm-commits mailing list