Repository navigation
soc: apple: sep: keep Touch ID across a boot policy change - #545
Merged
Merged
Conversation
aurora-sep-greeter-fingerprint.service held gdm back until aurora-sep-ready.service finished, so the login screen would find the reader and its fingerprints. The enclave takes tens of seconds after boot, and when it does not come up the job timeout holds gdm until 90 s after boot. On the J616s the desktop appeared at 95 s; with automatic login that wait bought nothing at all. The greeter unit now only prepares the login screen's shell and no longer waits for Touch ID. A new aurora-sep-greeter-refresh.service runs once both gdm and Touch ID are up. When nobody has logged in yet, it shows the login screen again so it asks fprintd for the reader again and offers fingerprint. With automatic login, or once anyone has logged in, it changes nothing, since restarting gdm would end their session. Enabling the greeter unit enables the refresh unit with it. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
A new Stage 1 changes the boot policy the Mac keeps for Linux. The first time Linux's identity keybag is unlocked under the new policy, the enclave rewrites one session record that already existed. Linux did not create it, so the xART guard refuses the write. The enclave then never answers CHANGE_LOCK_STATE, the machine ref-key stays down and every trusted-key seal fails with EIO, so Touch ID is gone until the policy changes back. On a J616s (T6040) this happened after a Stage 1 reinstall that changed only the kernel collection hash. Under an unchanged policy that first unlock rewrites no session record at all, so a rewrite inside it is the policy change. Let exactly one through: during the first unlock of an identity keybag that already existed, once per boot, one kind-4 session record, a rewrite and never a delete, and only once the record's previous value is durable in a host file. The record is not added to Linux's list. A ref-key created this boot closes the window. For a change the window does not cover, aurora-sep-policy-change leaves a one-time allowance in /var/lib/aurora-sep-xart-allow-once.bin naming the refused record, or before a planned change the first existing kind-4 record asked for. The driver empties the file at probe before it uses it, so an allowance lasts one boot, on the same terms. Name refused records by their session id. Linux's list of records already holds session ids, so this reveals nothing new. On the J616s the allowance restored Touch ID with the existing enrolment: one kind-4 record and one shared root were rewritten, the other seven session records kept their revisions, and the enrolled finger matched. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r hold the boot for it aurora-sep.service was ordered before multi-user.target, so a boot whose enclave did not come up waited for the loader's full two-minute timeout. On a J616s after a Stage 1 reinstall, userspace took 2 min 1.6 s. It now has no ordering before multi-user.target. fprintd and aurora-sep-ready still wait for it, and the login screen no longer does. aurora-sep-load retried the seal every 100 ms for those two minutes even when the xART guard had refused the enclave's write, which does not go away by waiting. It now stops at the first refusal and says what happened and what to run. The same J616s reached graphical.target in 11.1 s, with one seal failure logged instead of about 1,100. The driver now follows a boot policy change by itself. When it logs that it did, aurora-sep-load notes the m1n1, iBoot and OS firmware versions the boot came up with. For a change it could not follow, aurora-sep-policy-change backs up the gigalocker, the driver's host files and the fingerprints, then arms the driver's one-time allowance: with no arguments for the record this boot refused, or with --expect before a planned change. XART-SAFETY.md describes the event, the automatic update and the allowance. The Arch package also gets the aurora-sep-greeter-refresh.service link that its PKGBUILD already lists. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 28, 2026
Contributor
Author
|
Tested on the J616s (M4 Pro), 2026-10-29, kernel 7.3.0-aurora-fleet8 with this driver:
That covers both remaining items from the description. |
RyanTheTide
marked this pull request as ready for review
October 29, 2026 07:45
This was referenced Oct 30, 2026
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.
Touch ID on the J616s (M4 Pro) stopped working after a Stage 1 reinstall, and every boot waited two minutes for it. This keeps Touch ID and its fingerprints across a boot policy change, and stops the enclave from holding the boot back at all.
What happened
A new Stage 1 changes the boot policy the Mac keeps for Linux. The first time Linux's identity keybag is unlocked under the new policy, the enclave rewrites one session record in the shared xART gigalocker. Linux did not create that record, so the xART guard refused the write. The enclave then never answered
CHANGE_LOCK_STATE, the machine ref-key stayed down, and every trusted-key seal failed with EIO. The keybag, the ref-key and the enrolled fingerprints were all intact.Under the old policy the same kernel unlocked the keybag with no session record write at all. That is what makes the change detectable.
The change
Driver (
xart_guard.rs,xart_store.rs,refkey.rs)/var/lib/aurora-sep-xart-policy-previous.bin;aurora-sep-policy-changeallows the same thing on the next boot. The driver empties that file before it uses it.Userspace (
tools/aurora-sep)aurora-sep.serviceis no longer ordered beforemulti-user.target.aurora-sep-greeter-refresh.serviceshows the login screen again once Touch ID is up, if nobody has logged in.aurora-sep-loadstops at the first guard refusal and says why, instead of retrying a seal every 100 ms for two minutes.aurora-sep-policy-changebacks up the 6 MiB gigalocker extent, the driver's host files and/var/lib/fprintwithSHA256SUMS, then arms the allowance. With no arguments it allows the record refused this boot;--expectarms it before a planned change.aurora-sep-greeter-refresh.service, which the PKGBUILD already listed.XART-SAFETY.mdhas a new "Boot policy changes" section.Tested on the J616s (aoplid2, apple-sep built from this tree with #543)
fprintd-verify, and kept matching after later reboots.Depends on nothing. #543 (warn once on seal failure) is complementary.
🤖 Generated with Claude Code