[Lldb-commits] [PATCH] D98529: [lldb] Strip pointer authentication codes from aarch64 pc.

Peter Collingbourne via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 17 11:42:56 PDT 2021


pcc added a comment.

In D98529#2631946 <https://reviews.llvm.org/D98529#2631946>, @DavidSpickett wrote:

> TCR_ELx begins at 1 (see `D13.2.123 TCR_EL1, Translation Control Register (EL1)` in the armarm) and covers EL0 and 1. Looking at the pseudocode access to this is undefined at EL0.
>
> So the OS would have to provide you some other way to read that, I know this is missing on Linux at the moment. A user setting might be good for us supporting Linux too. (though I realise your immediate concern is MacOS)

On Linux you can query the NT_ARM_PAC_MASK regset and examine the insn_mask field of the result.

Note that this is a mask rather than the number of bits as this also allows reflecting whether TBI{,D}0 was set at execution time. I would suggest using a mask in any persisted storage format.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98529/new/

https://reviews.llvm.org/D98529



More information about the lldb-commits mailing list