[Lldb-commits] [PATCH] D117672: [lldb] Remove non-address bits from addresses given to memory tag commands

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 19 06:14:00 PST 2022


DavidSpickett created this revision.
DavidSpickett requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Although the memory tag commands use a memory tag manager to handle
addresses, that only removes the top byte.

That top byte is 4 bits of memory tag and 4 free bits, which is more
than it should strictly remove but that's how it is for now.

There are other non-address bit uses like pointer authentication.
To ensure the memory tag manager only has to deal with memory tags,
use the ABI plugin to remove the rest.

The tag access test has been updated to sign all the relevant pointers
and require that we're running on a system with pointer authentication
in addition to memory tagging.

The pointers will look like:
<4 bit user tag><4 bit memory tag><signature><bit virtual address>

Note that there is currently no API for reading memory tags. It will
also have to consider this when it arrives.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117672

Files:
  lldb/source/Commands/CommandObjectMemoryTag.cpp
  lldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py
  lldb/test/API/linux/aarch64/mte_tag_access/main.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117672.401206.patch
Type: text/x-patch
Size: 4524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220119/5a6ef803/attachment.bin>


More information about the lldb-commits mailing list