Skip to content

[PAC][libunwind] Investigate if compatibility with v8.2-a could be enhanced #160114

@kovdan01

Description

@kovdan01

#143230 introduces libunwind hardening which could be used with pauth-enabled ABIs (such as arm64e for Apple and pauthtest for Linux). Note that these pauth-enabled ABIs imply proper v8.3-a. Apart from these ABIs, we also have pac-ret, which is a non-ABI-breaking option which could be used to sign return addresses and which should be compatible with armv8.2-a.

Probably, some of the changes introduced in #143230 might be changed to a armv8.2-a-compatible form as a part of unifcation task #160110.

See original comment from the PR below.


By the way, if switching to ptrauth_returns here, we most probably want to retain compatibility with Armv8.2-a by replacing

#if __has_feature(ptrauth_calls)
  retab
#else
  ret    x30                    // jump to pc
#endif

with

#if __has_feature(ptrauth_returns)
  autibsp
#endif
  ret    x30                    // jump to pc

That is, simply insert autibsp into the existing code.

Originally posted by @atrosinenko in #143230 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    hardeningIssues related to the hardening effortlibunwind

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions