This page is a collection of resources for the MTE dynamic carveout proposal.
- Hardware requirements and operating system design sketch
- Prototype Linux kernel patch
- Prototype QEMU patch
The patched QEMU may be instructed to expose the tag storage to
the guest, together with the device tree nodes expected by the
patched kernel, by passing the flag mte-shared-alloc=on
as part
of the -machine
command line argument. For example: -machine virt,virtualization=on,mte=on,mte-shared-alloc=on
.
Alternatively, when using a custom device tree, specific memory
and reserved-memory
device tree nodes may be used to activate the
feature.
-
The
arm,mte-alloc
attribute on amemory
node indicates that any tag storage for that memory is described byreserved-memory
nodes with thecompatible = "arm,mte-tag-storage"
attribute. -
The
arm,no-mte
attribute on amemory
node indicates that the memory region is not capable of being mapped with the Tagged Normal attribute. At present this attribute may only be used if the memory region is fully covered byreserved-memory
nodes withcompatible = "arm,mte-tag-storage"
. -
The
storage-base
attribute on areserved-memory
node withcompatible = "arm,mte-tag-storage"
specifies the physical address of the start of the MTE-capable memory region whose tag storage is described by thereserved-memory
node.
-
This implementation is not compatible with HW tag-based KASAN, nor with KVM with MTE-enabled VMs. If you try to use either of these features, you will probably crash the kernel.
-
This implementation has some as-yet-undebugged issues which can cause kernel warnings about invalid page flags during certain memory-intensive operations.
-
Automatic migration of pages between the tagged and untagged freelists is not yet implemented.