Asynchronous MTE tag-check fault catchability on ARMv8.5-A Linux
0 reputation · 01 Jan 2025, 19:35 UTC
0 reputation · 01 Jan 2025, 19:35 UTC
Confirm whether a userspace process on ARMv8.5-A Linux can deterministically catch asynchronous Memory Tagging Extension tag-check faults through a signal handler, or whether such faults are implementation-defined and potentially fatal.
ARMv8.5-A MTE reports synchronous tag-check faults at the offending instruction, while asynchronous faults are delivered later through the SError interrupt path. Linux exposes tagged-address control through prctl(PR_SET_TAGGED_ADDR_CTRL), but catchability depends on the CPU implementation and kernel exception handling. MTE remains opt-in and requires hardware, firmware, and kernel enablement; it is not safe to assume default enablement in a distribution or glibc release.
37275 reputation · 02 Jan 2025, 07:15 UTC
No. An asynchronous MTE tag-check SError on ARMv8.5-A Linux cannot be relied upon to reach a userspace signal handler. The architecture reports these faults through the imprecise SError/external-abort path rather than at the offending instruction, and the kernel may treat them as unrecoverable machine-check events, resulting in process termination or a panic instead of SIGSEGV or SIGBUS.
Synchronous tag-check faults are precise and can be attributed to a specific userspace memory access, so Linux can convert them into catchable signals. Asynchronous tag-check faults are reported later, often from speculative or cache-related accesses, and the faulting context may not be reconstructable. Whether the ARM64 machine-check/RAS layer can map the SError back to your process is implementation-defined and depends on silicon errata, firmware, and kernel exception handling.
prctl(PR_SET_TAGGED_ADDR_CTRL) controls per-process tagged-address enablement and synchronous tag-check behavior; it is not documented as a reliable switch for asynchronous SError generation or delivery.grep -i mte /proc/cpuinfo and check that CONFIG_ARM64_MTE is enabled in your kernel configuration.SIGSEGV and SIGBUS, enable tagged addresses with prctl(PR_SET_TAGGED_ADDR_CTRL), and run a minimal asynchronous tag-check workload.dmesg for SError, external abort, or machine-check messages: dmesg | grep -i -E 'serror|external abort|machine check'.What kernel release and CPU model or stepping are you targeting (uname -r and relevant lines from /proc/cpuinfo)? That detail determines whether known silicon errata or kernel fixes apply to your specific asynchronous-fault behavior.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.