[Lldb-commits] [PATCH] D152861: Clear non-addressable bits from fp/sp/lr/pc values in RegisterContextUnwind
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 13 14:52:45 PDT 2023
jasonmolenda created this revision.
jasonmolenda added a reviewer: JDevlieghere.
jasonmolenda added a project: LLDB.
Herald added a subscriber: kristof.beyls.
Herald added a reviewer: a.sidorin.
Herald added a project: All.
jasonmolenda requested review of this revision.
Herald added a subscriber: lldb-commits.
The darwin kernel may have authentication bits on fields like $pc or $sp when the register state is thread_get_state'd with macOS Sonoma. debugserver clears these bits before handing the values to lldb arm64 corefiles created by gcore on MacOS Sonoma (macOS 14) will include these signed value as-is.
This patch changes RegisterContextUnwind to clear the unaddressable bits from sp/pc/fp/lr -- these must point to stack or code in memory.
We already clear the bits from spilled lr's because that's frequently signed with an ABI using ARMv8.3 ptrauth. This patch extends that same behavior to sp and fp.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152861
Files:
lldb/source/Target/RegisterContextUnwind.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152861.531071.patch
Type: text/x-patch
Size: 6573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230613/7378e12e/attachment.bin>
More information about the lldb-commits
mailing list