Overview

Opensource support for Armv8.5-A Memory Tagging Extension [MTE]

Linux Kernel

Linux kernel support for MTE is currently in active development on Linux Kernel Mailing List

The first stage is agreement on a mechanism to select a modified kernel ABI to permit the passing of tags in the top byte of the pointer. Linux will require userspace to select between current ABI (which requires the top byte to be 0 for userspace pointers when passing them to the kernel) and passing tagged pointers. Support for the relaxed ABI is needed for both the software HWASAN feature and Arm MTE, and is  being actively discussed on:
https://lkml.org/lkml/2019/6/12/530

Final patches proposed here:

v8: https://lore.kernel.org/linux-arm-kernel/20190815154403.16473-1-catalin.marinas@arm.com/

v9: https://lore.kernel.org/linux-arm-kernel/20190821164730.47450-1-catalin.marinas@arm.com/

The new tagged address ABI has been agreed and the above patches are merged in linux-5.4, and our plan is to now develop arm64 specific kernel support for MTE.

Userspace support

Heap Tagging

The heap tagging will be implemented in the C library and the accompanying allocator.

Tools support

Stack Tagging

Stack tagging has been implemented in clang (LLVM C-compiler) and will become available in LLVM 9:

https://reviews.llvm.org/rL366360 - landed 17-Jul-2019

https://reviews.llvm.org/rL366361 - landed 17-Jul-2019

There are also plans for implementation in GCC.


Resources