-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Add support for AArch64 Pointer Authentication ABI in Rust #148640
Copy link
Copy link
Open
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.O-AArch64Armv8-A or later processors in AArch64 modeArmv8-A or later processors in AArch64 modeT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.O-AArch64Armv8-A or later processors in AArch64 modeArmv8-A or later processors in AArch64 modeT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Recently there were efforts in LLVM mainline intended for:
pauthestABI and LLVM backend).As a result, LLVM 21 has more or less complete support for pointer authentication features for ELF targets (MachoO bits are still not there, so there is no full arm64e ABI support).
This is a tracking issue to add support for pointer authentication to Rust basing on the existing LLVM support.
Overall, everything could be split into 3 subtasks:
extern "C"function pointers. This invokes both calling them via signed function pointers from Rust case as well as providing properly authenticatedextern "C"Rust functions to be called from pauth-enabled C code. We'd need to support type-discriminated function pointers here as well, so few bits of signing scheme should be either reimplemented inrustcor imported from elsewhere (e.g.clang). The support should be based on LinuxpauthtestABI and could be further adopted by interested platforms. Overall the pauth itself support seems to be simple, it is just some boilerplate glue code that requires to be written.I want to explicitly mention that the primary target would be ELF-based platforms. There is no intention to support
arm64e(so this issue is a bit orthogonal to #73628) simply because there is no full LLVM mainline support for this ABI at the time of writing. Still, I'd anticipate that implementing the pauth for ELF platforms would allow straightforward implementation ofarm64eABI if / when LLVM mainline would support it – likely some lightweight plumbing of settings and options.References: