Repository navigation
arm64: keep MTE off on Apple SoCs without reserved tag storage - #1639
Merged
Merged
Conversation
On Apple SoCs with MTE (T6050 and T8142), iBoot keeps 1/32 of DRAM at the top of the RAM it hands over as the MTE tag store and programs TagOffset_EL2 (S3_0_C11_C9_0) with its base. On a 64 GiB J714s (T6050) that is 2 GiB at [0x10f4a500000, 0x10fca500000). No ADT or DT property names the range, and the boot loader (aura) currently gives it to Linux as normal memory. With MTE on, the kernel writes tags into that range, which is memory it uses, starting with the zero page's tags at boot. Until the loader reserves the tag store, these chips need arm64.nomte on every boot. Distribution boots go through U-Boot and GRUB, where the EFI stub replaces the bootargs the loader sets, so the loader cannot add it. Apply the arm64.nomte override from the early ID-register code when the root node is compatible with "apple,arm-platform", the CPU reports MTE2 or later, and /reserved-memory has no node compatible with "apple,mte-tag-storage". A loader that reserves the store adds that node, and the override no longer applies. Other platforms, and Apple SoCs without MTE, are unchanged. Through the same override, the MTE fields of ID_AA64PFR2_EL1 (MTEFAR, MTESTOREONLY) are hidden too, so userspace sees none of MTE's parts while it is off. Signed-off-by: Diljit Singh <[email protected]>
DjDeveloperr
force-pushed
the
fix/apple-mte-tag-storage-guard
branch
from
November 12, 2026 12:34
59d88cf to
42a362b
Compare
RyanTheTide
added a commit
to aurora-silicon/fedora-aurora
that referenced
this pull request
Nov 19, 2026
44-37 added arm64.nomte with grubby on T6050 and T8142 Macs, because no boot loader reserved the MTE tag storage. That is no longer a chip property for userspace to track: - the kernel (7.3.0-37, aurora-silicon/linux#1639) applies the nomte override itself on an Apple platform whose CPU reports MTE2 and whose /reserved-memory has no apple,mte-tag-storage node; - aura 1.0.0~b13 (aurora-silicon/aura#184) adds that node. So the posttrans no longer adds anything, and a one-shot triggerpostun on the update from 44-41 or older removes the argument. grubby --update-kernel=ALL wrote it to every BLS entry, GRUB_CMDLINE_LINUX and /etc/kernel/cmdline; --remove-args with ALL takes it out of all three. aurora-platform now requires those kernel and aura floors. Based on DjDeveloperr's 44-39 change in this branch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
RyanTheTide
added a commit
to aurora-silicon/alarm-aurora
that referenced
this pull request
Nov 19, 2026
20261018-17 added arm64.nomte to GRUB_CMDLINE_LINUX on T6050 and T8142 Macs through /etc/default/grub.d/45-aurora-mte.cfg, because no boot loader reserved the MTE tag storage. That is no longer a chip property for the distribution to track: - the kernel (linux-aurora 7.3.0.aurora1-37, aurora-silicon/linux#1639) applies the nomte override itself on an Apple platform whose CPU reports MTE2 and whose /reserved-memory has no apple,mte-tag-storage node; - aura 1.0.0b13 (aurora-silicon/aura#184) adds that node. Drop the fragment and depend on those floors. The grub hook keeps the fragment as a target, so with a Remove operation (alarm-aurora#287) its removal regenerates grub.cfg at once; without it the next kernel update does. Based on DjDeveloperr's 20261018-18 change in this branch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
RyanTheTide
added a commit
to aurora-silicon/nixos-aurora
that referenced
this pull request
Nov 19, 2026
The GRUB install step appended arm64.nomte to every linux line on T6050 and T8142 Macs, because no boot loader reserved the MTE tag storage. That is no longer a chip property for the distribution to track: - the kernel (aurora-silicon/linux#1639, in the pinned 9125b314) applies the nomte override itself on an Apple platform whose CPU reports MTE2 and whose /reserved-memory has no apple,mte-tag-storage node; - aura 1.0.0b13 (aurora-silicon/aura#184, pinned 5dcf62d0) adds that node. Drop the step. grub.cfg is rewritten on every switch, so the next switch removes the argument from every generation, older ones included: their kernels boot under the same aura, which reserves the store. Based on DjDeveloperr's change in this branch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 20, 2026
AxxzyWasTaken
pushed a commit
to AxxzyWasTaken/alarm-aurora
that referenced
this pull request
Nov 21, 2026
20261018-17 added arm64.nomte to GRUB_CMDLINE_LINUX on T6050 and T8142 Macs (/etc/default/grub.d/45-aurora-mte.cfg), because no boot loader reserved the MTE tag storage then. Two merged changes now make the argument moot on the T6050: - aura 1.0.0b13 (aurora-silicon/aura#184) reserves the tag storage as a no-map apple,mte-tag-storage node, or adds arm64.nomte itself when a check fails; - linux-aurora 7.3.0.aurora1-37 and later (aurora-silicon/linux#1639) keep MTE off by themselves on an Apple SoC with MTE whose device tree has no such node. The fragment now adds arm64.nomte only on the T8142 (M5), which has had no MTE trial. 95-aurora-grub.hook already regenerates grub.cfg when the fragment changes, so the update itself takes the argument off a T6050's boot entries. aurora-boot depends on aura>=1.0.0b13 and linux-aurora>=7.3.0.aurora1-37. This is the owner's T6050 policy for the M5 Pro deep-sleep Edge release (2026-11-20): MTE on. The broader draft aurora-silicon#288 drops the fragment on every chip; this one keeps it on the T8142. Signed-off-by: Diljit Singh <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
sioodmy
pushed a commit
to sioodmy/nixos-aurora
that referenced
this pull request
Nov 22, 2026
The GRUB install step (boot.loader.grub.extraInstallCommands) appended arm64.nomte to every linux line on T6050 and T8142 Macs, because no boot loader reserved the MTE tag storage then. Two merged changes now make the argument moot on the T6050: - aura 1.0.0b13 (aurora-silicon/aura#184) reserves the tag storage as a no-map apple,mte-tag-storage node, or adds arm64.nomte itself when a check fails; - the pinned kernel (aurora-silicon/linux#1639) keeps MTE off by itself on an Apple SoC with MTE whose device tree has no such node. The step now matches the T8142 (M5) only, which has had no MTE trial. NixOS rewrites grub.cfg on every switch, so a T6050's next switch drops the argument from every generation; older generations boot under the same aura on the ESP, which reserves the store. This is the owner's T6050 policy for the M5 Pro deep-sleep Edge release (2026-11-20): MTE on. The broader draft aurora-silicon#280 removes the step for every chip; this one keeps it on the T8142. Signed-off-by: Diljit Singh <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MTE tag store on Apple SoCs is unreserved until the aura change lands. Until a loader reserves it, this keeps MTE off on those chips.
Measured on the M5 Pro (J714s, T6050, 64 GiB):
region-id-218=[0x10f4a500000, 0x10fca500000), 2 GiB. Its base goes inTagOffset_EL2(S3_0_C11_C9_0, [41:20], lock in bit 63).node 0: [mem 0x10003b40000-0x10fca4effff]covers it, andNODE_DATAand the SWIOTLB are allocated inside it. With MTE on, the kernel writes tags there, starting with the zero page's at boot. Every M5 boot so far has carriedarm64.nomte./chosen/bootargswith GRUB's line (drivers/firmware/efi/libstub/fdt.c). A fresh image's first boot runs the command line baked at image build, so neither the loader nor a distro template can addarm64.nomteto that boot.Change (arch/arm64/kernel/pi/idreg-override.c): the early ID-register code applies the
arm64.nomtealias when all three hold:apple,arm-platform;ID_AA64PFR1_EL1.MTE >= MTE2;/reserved-memorychild is compatible withapple,mte-tag-storage.Other platforms, and Apple SoCs without MTE2 (M1 to M4, A18 Pro), return before the DT is read. The aura change, aurora-silicon/aura#184 (draft), adds a no-map
mte-tag-storage@<base>node with that compatible and ends/memoryat the base. With it, this override no longer applies.Build check:
arch/arm64/kernel/pi/idreg-override.cis identical there and at integration/aurora 3d7100c.CONFIG_ARM64_MTE=y, clang 23.1.1).arch/arm64/kernel/pi/builds with no warnings, andidreg-override.pi.opasses relacheck.__pi_fdt_node_check_compatible,__pi_fdt_first_subnode,__pi_fdt_next_subnodeand__pi_fdt_path_offsetreferences are defined inlib-fdt.pi.o/lib-fdt_ro.pi.o.🤖 Generated with Claude Code