This is an archive of the discontinued LLVM Phabricator instance.

Remove hardcoding of addressing bits in ABIMacOSX_arm64
ClosedPublic

Authored by jasonmolenda on Apr 17 2023, 9:32 PM.

Details

Summary

Early in the adoption of pointer authentication on Darwin systems, we had most environments running with the same number of addressing bits in use on AArch64 systems, and didn't prioritize fetching that value dynamically. Our environments have grown so there is no correct fixed value, and the correct value is determined dynamically in most scenarios; the hardcoding of one value can cause problems when running on a larger address space environment that may set its value later.

Change ABIMacOSX_arm64 to mask off the top byte unconditionally when we have no dynamic information about the number of addressing bits, instead of hardcoding the old addressable bits value.

I had a test which created a corefile with no LC_NOTE markup for the number of addressable bits, and tested against that to confirm the hardcoded default value was in effect. Remove that test.

Diff Detail

Event Timeline

jasonmolenda created this revision.Apr 17 2023, 9:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2023, 9:32 PM
jasonmolenda requested review of this revision.Apr 17 2023, 9:32 PM
This revision is now accepted and ready to land.Apr 18 2023, 12:56 PM
This revision was automatically updated to reflect the committed changes.
lldb/test/API/macosx/corefile-default-ptrauth/create-corefile.c