Page MenuHomeFreeBSD

arm64: mte: userspace configuration of MTE via sysarch() system call
Needs ReviewPublic

Authored by andrew on Mar 19 2026, 4:07 PM.
Tags
None
Referenced Files
F152963402: D55958.id173928.diff
Sat, Apr 18, 8:56 AM
F152951995: D55958.diff
Sat, Apr 18, 7:18 AM
Unknown Object (File)
Wed, Apr 15, 3:09 AM
Unknown Object (File)
Tue, Apr 14, 8:09 AM
Unknown Object (File)
Tue, Apr 14, 5:29 AM
Unknown Object (File)
Tue, Apr 14, 3:00 AM
Unknown Object (File)
Sun, Apr 12, 12:05 AM
Unknown Object (File)
Fri, Apr 10, 6:01 PM
Subscribers

Details

Reviewers
manu
Group Reviewers
arm64
Summary

Introduce two new sysarch options to allow for userspace configuration
of MTE: ARM64_MEMORY_TAG and ARM64_MTE_CTRL.

ARM64_MTE_CTRL allows for userspace configuration of MTE for a process,
including setting the Tag Check Fault and Allocation Access bits in
SCTLR_EL1 to control whether accesses to tagged memory cause an
exception on a tag check fault, and whether that exception is raised
synchronously or asynchronously.

ARM64_MEMORY_TAG is used to tag the pages in a given memory range by
changing their memory attributes. The arguments for this are the same as
the sysarch BTI option, so the arm64_guard_page_args struct has been
renamed to arm64_memory_args.

Sponsored by: Arm Ltd
Signed-off-by: Harry Moulton <harry.moulton@arm.com>
Co-authored-by: Andrew Turner <andrew@FreeBSD.org>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71539
Build 68422: arc lint + arc unit