[Lldb-commits] [PATCH] D148603: Remove hardcoding of addressing bits in ABIMacOSX_arm64

Jason Molenda via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 17 21:32:56 PDT 2023


jasonmolenda created this revision.
jasonmolenda added a reviewer: JDevlieghere.
jasonmolenda added a project: LLDB.
Herald added subscribers: kristof.beyls, arichardson.
Herald added a project: All.
jasonmolenda requested review of this revision.
Herald added a subscriber: lldb-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148603

Files:
  lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
  lldb/test/API/macosx/corefile-default-ptrauth/Makefile
  lldb/test/API/macosx/corefile-default-ptrauth/TestCorefileDefaultPtrauth.py
  lldb/test/API/macosx/corefile-default-ptrauth/create-corefile.c
  lldb/test/API/macosx/corefile-default-ptrauth/main.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148603.514519.patch
Type: text/x-patch
Size: 10553 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230418/dc61ee09/attachment.bin>


More information about the lldb-commits mailing list