Repository navigation
Conversation
touchid-eligibility admits apple,j313 on apple,t8103; the other M1-family boards (J293, J274, M1 Pro and Max) still read unsupported:m1-family. On the J313 the first setup rewrites a key-store session record macOS created, which the driver's xART guard refuses (omacom/linux-aurora#223: "refused to rewrite a kind-4 record this Linux install did not create", then CREATE_KEYBAG fails). The new lib/touchid-options prints the driver options both writers use (touchid-enable and enable-fingerprint) and adds xart_guard=0 on the J313 only, so the owner's agreement loads the driver with the guard off there and nowhere else. The README and the manual's Touch ID section say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
touchid-options now gives the J313 xart_guard_pin=1 (omacom/linux-aurora#486) in place of xart_guard=0. On the J313 the first setup rewrites three pre-Linux kind-4 lockers, two at the keybag's COPY_KEYBAG and one at the first activation's LOAD_KEYBAG; with the window held through the first activation and room for three pins, setup, enrol, match and a reboot restore pass with xart_guard_refusals 0, and the guard keeps every other macOS record. #486 as posted pins one locker around CREATE_KEYBAG only and fails on the J313; the changes it needs are reported there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scottjones
left a comment
There was a problem hiding this comment.
Thanks for this, and for testing the pin on the J313 itself. The script changes look right and the tests catch it if you break them (I tried). I'd hold it until the kernel side is published, and add a gate so it doesn't depend on merge order.
Nothing checks the kernel. lib/touchid-eligibility:51 says available for any J313, and lib/touchid-options:15 always adds xart_guard_pin=1. On a kernel without the parameter, modprobe ignores it and the guard refuses the setup. On a kernel with #486 but not #506, only one locker gets pinned, and in #506's own J313 run the second was then refused. The owner gets the one-time invitation, then a setup that can't finish. AGENTS.md asks for everything an invitation leads to to be published first.
A failed try makes the next one worse. #486 and #506 both say a Mac that already tried under the guard has to remove /var/lib/aurora-sep-xart-owned.bin before the pin window opens again. Nothing in omarchy-mac removes it, so after a failed try on an old kernel, upgrading the kernel won't be enough.
Could eligibility return something like unsupported:kernel on the J313 unless modinfo -p apple_sep shows the pin? It has to tell #506 apart from #486, so that needs a marker on the kernel side, which I've asked for on #506. It could be a new parameter name or a version that modinfo shows. The diag abi file only exists once the driver is loaded.
Smaller things:
mac-manual/content/04-security.md:42says the driver lets the three records through. That's only true on a kernel that has #506.test/touchid-consent-test.sh:256still says "loads with the guard off".test/touchid-consent-test.sh:580only checks the exit code. The J313's options file is still there at that point (it's removed at 582), so nothing gets rewritten. Remove it first, then check that the M2 Max line has no pin.- The description still says
xart_guard=0in Summary, Evidence and Verified.
omarchy-mac/version is unchanged.
From the review of #162: - touchid-eligibility records unsupported:kernel on the J313 unless `modinfo -p apple_sep` lists xart_guard_pins (omacom/linux-aurora#506). A kernel with #486's xart_guard_pin pins one locker at the create and cannot finish the setup; a built-in driver lists no parameters and is refused too, so the one-time invitation never leads to a setup that cannot finish. - touchid-options writes xart_guard_pins=1 on the J313. - Before loading on the J313, touchid-enable sets aside an earlier try's guard list and uncommitted keybag (anything without the driver's magic and a committed state) in /var/lib/aurora-sep-touchid-retry-<time>/, so the pin window opens again after a try that failed on an older kernel. A committed keybag keeps its list; any failed move fails the setup. - Tests: the kernel check against #506, #486 and parameter-less kernels; the set-aside for a list, a header, both, an unwritten file and a committed keybag; the M2 Max's options carry no pin. The manual says Touch ID is offered on the M1 Air only with such a kernel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, all addressed in e03a3b2. Each fix was checked by a separate agent against the code. Nothing checks the kernel.
A failed try makes the next one worse.
Smaller.
Hardware. The J313 ran #506's final kernel with exactly these options:
The header check also reads that Mac's real keybag as committed, and a failed try's 52-byte header as not committed. |
…thout the pins - The set-aside of an earlier try's guard list and uncommitted keybag moves into lib/touchid-retry-aside, which touchid-enable calls before loading as before. - enable-fingerprint's agreed branch calls it too, under the Touch ID lock, when the activation recorded a status that isn't ready and is not running now. A setup that crashed between the agreement and the load, or one whose spent state ends at failed, not-ready or blocked, is set aside so the restart sets it up again. With no status recorded the setup may still be running and nothing moves; the agreement and the status are re-read under the lock. - On a kernel whose driver has no xart_guard_pins, the agreed branch says so instead of telling the owner to restart, and moves nothing. - Tests: each recorded status, no status, an activation still running, a committed keybag and the unsupported kernel through the agreed branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Follow-up in a89429e. It closes the two gaps I'd left open in the description.
Tests cover each recorded status, no status, a running activation, a committed keybag and the unsupported kernel. The new agreed-branch case fails without the change. The full suite passes, 122 of 122, and a separate agent checked the change. |
scottjones
left a comment
There was a problem hiding this comment.
Thanks, the recovery path looks right to me. I checked it against the unit files and the kernel's keybag format: a committed keybag is never moved, other Macs never reach the move, and on an older kernel nothing moves. That closes the crash gap, so please ignore my earlier idea of writing the agreement last. Same for my omarchy-mac/version note, since CONTRIBUTING says PRs leave it alone.
One fix: systemctl is-active never succeeds while the activation is running. omarchy-mac-touchid-activate.service is a oneshot without RemainAfterExit, so while it runs it's activating and is-active exits 3 (I checked with a oneshot unit here). That means the "while the activation runs, nothing moves" check never fires on a real Mac, and the test only passes because the stub returns 0.
To fix it, skip the move unless systemctl show -p ActiveState --value omarchy-mac-touchid-activate.service is inactive or failed, and have the stub print activating. The impact is small, since it needs a setup that was interrupted during its wait, or an activation re-run while a non-ready status is recorded. But that's exactly when the check should hold.
Smaller asks, none blocking:
-
Could the Evidence line name the #506 commit you ran on, instead of "#506's head"? The head has moved since. And if the parameter gets renamed again during #506's review, this gate needs the same change.
-
If a J313 set up on #506 later boots an older kernel, the new message is right, but
omarchy-mac-touchid-load.servicestill runsmodprobe apple-sepand the driver loads without the pins. A secondExecCondition=that skips the load on a J313 whenmodinfo -p apple_seplacksxart_guard_pinswould keep it off until a kernel with the pins is back. -
The tests still pass when I break the code in these three ways:
- dropping 3 from
[13]intouchid-retry-aside(a Mac whose enclave writes state 3 would lose its keybag and list) - masking a failed
mvwith|| true - calling
touchid-retry-asideaftermodprobeintouchid-enable
A
keybag_file 3 116case, a failingmvcase, and a check in themodprobestub that the list is already gone would cover them. - dropping 3 from
Once the is-active check is fixed I'm happy to approve.
…ithout the pins
- enable-fingerprint read the activation with systemctl is-active, which a
oneshot never passes while it runs ("activating"). It now sets the state
aside only when ActiveState is inactive or failed.
- lib/touchid-kernel-ready (new) holds the J313 check eligibility made:
modinfo -p apple_sep must list xart_guard_pins. The load unit runs it as a
second ExecCondition, so an M1 Air set up with the pins that boots an
older kernel keeps the driver off until a kernel with them is back.
- Tests: the systemctl stub answers show as systemd does (activating,
failed); a keybag in state 3 keeps its list; a guard list mv that fails
stops the setup before the load; the modprobe stub records a list still
in place at the load. Each of these fails on the mutation it covers.
- README and manual say the driver stays off on such a kernel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks. All addressed in b9e9b2e. A separate agent checked each fix against the code and reran the mutations. The
Smaller asks.
|
scottjones
left a comment
There was a problem hiding this comment.
Thanks, this looks good to me. The ActiveState check now matches what systemd actually reports: I checked a real oneshot shows activating while it runs, failed after a failed run, inactive after a clean run, and inactive for a unit that doesn't exist, and the stub answers the same way. The second ExecCondition only ever skips on a J313 whose apple_sep lacks xart_guard_pins, every other Mac exits 0 before modinfo runs, and an exit 1 there is a skip, not a failed unit. I redid your mutations plus a few of my own (only failed, the kernel check always passing, the J313 match broken) and each one fails the suite, which passes 122 of 122 here. One small optional fix: the comments say a built-in driver lists no parameters, but kmod 34's modinfo -p does list a built-in module's parameters from modules.builtin.modinfo, so a built-in apple_sep with the pins would pass. That's fine while linux-aurora ships it as a module, so it's only the comment that needs changing.
Why
Touch ID on the MacBook Air M1 (J313), with the Secure Enclave driver's xART guard kept on. Today
touchid-eligibilityreadsunsupported:m1-familyon every M1.Summary
touchid-eligibility:apple,j313onapple,t8103) is offered Touch ID only whenmodinfo -p apple_seplistsxart_guard_pins, the parameter from soc: apple: sep: xart_guard_pin on the M1 Air: hold the window through the first activation, pin up to three lockers (builds on #486) linux-aurora#506.unsupported:kernel. That covers a kernel with #486'sxart_guard_pin, which pins one locker at the create and cannot finish the setup on the J313, and a built-in driver, which lists no parameters.unsupported:m1-family.touchid-options(new): prints the driver options line both writers use (touchid-enable,entrypoints/enable-fingerprint):xart_writes=1 provision_keybag=1, plusxart_guard_pins=1on the J313 only.touchid-enable: before loading on the J313, it sets aside an earlier try's guard list (/var/lib/aurora-sep-xart-owned.bin) and an uncommitted keybag in/var/lib/aurora-sep-touchid-retry-<time>/.Evidence
All on one MacBook Air M1 (J313), macOS 13.5 firmware, 2026-11-19:
2b718e52a, the same tree before the sign-off rebase; the head since,56b08faee, changes only comments and docs), booted with optionsxart_writes=1 provision_keybag=1 xart_guard_pins=1, the linetouchid-optionswrites on the J313.identity keybag provisioned,xart_guard_refusals0, activationready.fprintd-enrollcompleted; 3 of 3verify-match.enrolment survived reboot, 2 of 2verify-match, refusals 0.Verified
omarchy-mac/test/allpasses all 122 checks.check-scope,check-architecture-gatesandcheck-fixture-driftpass.omarchy-mac/versionis unchanged (release bumps only).the M1 Air is not offered Touch ID on a kernel that pins one locker at the createreadavailable).modinfostub answering a different module fails the J313 case. From the second review, each of these fails the suite: dropping 3 from[13], masking a failedmv, setting aside aftermodprobe, going back tois-active, treating onlyinactiveas ended, and removing the load unit's kernel check.mv, the keybag test used a size proxy, and themodinfostub ignored its arguments.Depends on
unsupported:kernel, so nothing is offered./dev/sep-biointerface has to matchlibfprint-git. #506's tree speaks v4, which Omarchy's package handles. A 7.3 kernel speaking v5 needs libfprint-git: Touch ID on SEP interface v4 and v5 omarchy-pkgs#2737.Recovery
failed,not-readyorblocked, is set aside by the fingerprint setup's agreed branch (lib/touchid-retry-aside, under the Touch ID lock), so the restart sets it up again. With no status recorded, or while the activation runs (itsActiveStateis anything butinactiveorfailed), nothing moves.xart_guard_pinsis told the kernel can't set Touch ID up on this Mac, not to restart.omarchy-mac-touchid-load.serviceskips the load on that kernel (ExecCondition=/usr/lib/omarchy-mac/touchid-kernel-ready, the check eligibility makes), so the driver stays off until a kernel with the pins is back. If #506 renames the parameter again,lib/touchid-kernel-readychanges with it.Not covered
🤖 Generated with Claude Code