Repository navigation
soc: apple: sep: retry a failed sensor bring-up before a verify (Touch ID after resume) - #339
Merged
Merged
Conversation
…sable After a sensor registration the status is read again before the patch acknowledgment is trusted. When that read is unusable the bring-up stops with "status unavailable after registration", which covers two different failures: the SPI transfer failed, or the sensor answered with an all-zero (silent) status. They point at different causes, the bus or the sensor, and the line does not say which, nor how long after power-on it happened. Name which one it was and the time since the sensor was powered on, as the other registration steps already do. The start of the message is unchanged, so existing log searches still match. No functional change. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Every verify powers the sensor up and registers it with the enclave again before it captures. The first verify after a system suspend on a MacBook Neo failed that way: the re-registration completed, the status read straight after it was unusable, and the verify ended with "the sensor did not come back online". libfprint reports that as an error, so fprintd ends the verify and the lock screen drops its fingerprint prompt although the sensor works. The first registration after boot fails in the same ways now and then, and commit 6c39413 ("soc: apple: sep: Retry a failed attach-time sensor bring-up") recovers it by starting again from a power-cycled sensor, which clears the enclave's registration before the new one. The verify path never got that retry, and the first verify after a suspend is where a failed re-registration has been seen: in the kernel logs on record, re-registrations that did not follow a suspend have not failed, and one of the four that first followed one failed like this. Before commit 4db9a38 ("soc: apple: recheck sensor status after SEP registration") the same verify fell to state 9 instead. Move attach's bounded retry into a helper and use it for a verify too, on the same nonce-session profiles. A verify asks before each new attempt whether it is still wanted, so a cancel, a close or a suspend does not wait for further attempts. Other profiles keep their single attempt. Attempts cost tens of milliseconds each and are logged. Authentication is unchanged: each attempt still needs the enclave to accept the session commit, and the match itself is the same. tools/aurora-sep/tests/test_verify_bringup.py runs the verify and attach code with mocks; it fails without this change. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
RyanTheTide
added a commit
that referenced
this pull request
Oct 17, 2026
Bring the 7.2.10 assembly to the tree of the canonical top-up #5 assembly 1c824ed, stacked on top-up #4 5043778 so that it is a fast-forward of the published branch. The second parent is that canonical assembly; the tree is identical to it. Ported from aurora-wip, each with cherry-pick -x and its original author: - #338 tipd lost IRQ (5): never leave CD321x interrupt events unacknowledged, recover from a failed partner identity read, keep SN201202x events unhandled while it sleeps and wake it when suspend fails, and the KUnit race fix of the IRQ test (170-usb). - #339 Touch ID verify retry (2): say why the sensor status after registration was unusable, and retry a failed sensor bring-up before a verify (100-sep). - #340 USB and Bluetooth wake v4.1 (30): AIC wake (010-soc); xHCI, DWC3 and hub suspend-to-idle wake with their KUnit tests (170-usb); MT7932 Bluetooth wake and MSI wake for Apple PCIe (080-radio); the apple-dcp DWC3 wake model (200-dcp); the tools/aurora-wake regression tools (900-config-tooling). - #341 apple-dcp selftests for the tipd lost-IRQ helpers (200-dcp). - batch1 backlog: rust-clippy (4; 070-audio, 210-gpu), boot-warnings (3; 200-dcp), and the 4 harden-all commits not yet carried (010-soc qspi resume, 070-audio AOP wrapped-entry test, 200-dcp start completion). kunit-parsers, spi-apple-cs and the other 34 harden-all commits were already in the topics, including the AOP ring fix that top-up #4 brought; it is not duplicated. Not ported: 3132675, superseded on 7.2.10 by b69728b ("selftests: apple-dcp: Follow the 7.2.10 driver boundaries"). Adaptations, each with a [ryan: ...] note in its commit: - the new tipd KUnit tests take the CD321x and SN201202x data from the exported tipd_hw_variants[] table of 7.2.10; - the #341 lifecycle.py import also keeps ATC_POST_TUNABLE; - drm/asahi statistics style without the driver.rs part, which 7.2.10 already has; - the Rust doc example refresh only for KVec and Drain: iosys_map.rs, the old IoMem example and declare_flags_type!() are gone in 7.2.10; - "Do not arm the core interrupt for wakeup" split between 170-usb and 200-dcp. New: 11e0ce6 ("usb: typec: tipd: cd321x: Don't race the resume read in the sleep retry test"). Assisted-by: LLM Signed-off-by: Ryan Murray <[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.
On the MacBook Neo, the first Touch ID verify after a system suspend sometimes failed with "the sensor did not come back online". fprintd then ended the verify, and the lock screen dropped its fingerprint prompt even though the sensor worked. It was seen on 2026-10-16, when the lid was reopened after a sleep.
Cause
6c394131cf7e). The verify path never got it.Fix (2 commits)
Testing
F: tools/aurora-sep/entry, left for a later tidy-up.tools/aurora-sep/tests/test_verify_bringup.pyruns the verify and attach code with mocks, and fails without the change.3aecdf80:apple_sep_registration,apple_sep_transfer) passes on the merged tree.7.1.12-aurora-sep-verify-retry-gaf1c264b6, a published-config build with 0 warnings, booted one-shot.fprintd-verify:🤖 Generated with Claude Code