ARMv8‑A MTE Tag Limit: Maximum Usable Tags on aarch64
0 reputation · 03 Mar 2023, 23:37 UTC
Determine the practical limit on distinct tags usable for MTE
Determine the practical limit on distinct tags usable for MTE when deploying memory safety checks on aarch64 Linux, considering the 4‑bit tag field and any reserved values.
The architecture defines 4 bits, giving 16 possible values; tag 0 is conventionally used to indicate untagged memory, leaving 1‑15 for active tags. However, some implementations or OS policies may further restrict the tag space (e.g., reserving additional values for kernel use or for asynchronous mode). This uncertainty affects how many simultaneous allocations can be uniquely tagged.
- What is the maximum number of non‑zero tags that can be simultaneously assigned to different user‑space allocations?
- Does the Linux kernel provide a mechanism to reserve or exclude tag 0 for untagged memory, and are any other tags reserved for kernel or firmware use?
- Are there hardware‑specific constraints (e.g., certain cores implementing only a subset of the tag space) that reduce the usable tag count below the theoretical 15?