[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)
John Brawn via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 29 06:17:38 PDT 2024
================
@@ -1823,9 +1823,48 @@ extern "C" void *__libunwind_cet_get_jump_target() {
#endif
class _LIBUNWIND_HIDDEN Registers_arm64 {
+protected:
+ /// The program counter is used effectively as a return address
+ /// when the context is restored therefore protect it with PAC.
+ /// The base address of the context is used with the A key for
+ /// authentication and signing. Return address authentication is
+ /// still managed according to the unwind info.
+ inline uint64_t getAuthSalt() const {
+ return reinterpret_cast<uint64_t>(this);
+ }
+#if defined(_LIBUNWIND_IS_NATIVE_ONLY)
+ // Authenticate the given pointer and return with the raw value
+ // if the authentication is succeeded.
----------------
john-brawn-arm wrote:
"authentication is succeeded" should be either "authentication succeeded" or "authentication is successful".
https://github.com/llvm/llvm-project/pull/113368
More information about the cfe-commits
mailing list