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
Unknown Object (File)
Thu, Jun 4, 10:17 PM
Unknown Object (File)
Thu, Jun 4, 10:17 PM
Unknown Object (File)
Fri, May 22, 9:40 AM
Unknown Object (File)
Sun, May 17, 7:00 AM
Unknown Object (File)
Sun, May 17, 7:00 AM
Unknown Object (File)
Thu, May 14, 8:30 AM
Unknown Object (File)
Apr 18 2026, 8:56 AM
Unknown Object (File)
Apr 18 2026, 7:18 AM
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