Skip to content

Recheck Touch ID sensor status after registration - #303

Merged
RyanTheTide merged 4 commits into
aurora-wipfrom
fix/sep-post-registration-status
Oct 15, 2026
Merged

RyanTheTide merged 4 commits into
aurora-wipfrom
fix/sep-post-registration-status

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Sensor registration can clear and authenticate a new sensor session after wake_sensor has sampled status. The old fast path could trust that stale patch acknowledgement and proceed to capture while the sensor reports state 9 (needs patch).

Re-read status after registration. Refuse unreadable/silent status, and use the existing patch sequence when the fresh acknowledgement is absent or the sensor still needs a patch. Enrollment, authentication, patch implementation, and capture error handling remain unchanged.

Validation: the actual wake_sensor body runs with synthetic status/registration mocks across five scenarios, asserting registration precedes the second status read. The fixture passes this change and fails against the original 5f function. A separate, strict SEP-only module build passes with Clang 22.1.6, Rust 1.97.1 and bindgen 0.73.2 using the unchanged 7.1.12-aurora-g5f6c917 configuration. Module-version CRCs are disabled in that configuration; no CRC compatibility claim is made.

Update 2026-10-15: two more commits, and hardware qualification

The branch now also carries:

  • soc: apple: sep: serialize SBIO exchanges (bug fix). The capture work item and the ioctls share the one SBIO endpoint. When libfprint cancels an identify and starts the next one, GET_INFO used to run during the old work item's sensor registration. One side then got EBUSY ("did not register the sensor", "sensor did not come back online"), or in a narrow window took the other side's reply. Exchanges are now serialised.
  • tools: aurora-sep: run concurrent SBIO exchanges. This test fails 20/20 without the fix and passes with it.

Hardware (the earlier note about an unverified trial is superseded):

  • Attended, earlier today: Touch ID matched 2/2 after resume with Recheck Touch ID sensor status after registration #303. Without it, the first post-resume verify fell to state 9.
  • Unattended, on every integration and release boot (6 boots, more than 100 s2idle cycles in total): 3 enrolled prints restored at boot and still listed by fprintd-list after every resume. No "state 9" and no "status unavailable after registration".
  • T1, a storm of 20 cancelled verifies: 0 EBUSY, "did not register", "did not come back online" or "transfer failed" lines.
  • T4, suspend during a capture: "ending the capture in progress before sleep", no drain failure, prints intact.

Risk

  • MED for the post-registration status recheck and the SBIO lock.
  • Enrolment and stored identities are untouched.

Hardware qualification (MacBook Neo J700, 2026-10-15)

This series was qualified on the Neo inside the 2026-10-15 release stack: aurora-wip ac89582 plus, in merge order, tipd polish, input polish, speaker KUnit, SEP (#303), DCP sleep fixes, platform polish, audio polish, radio polish, power polish and fixes, and storage polish. It used the published 5f config with LLVM=1 and clang 22, and modules installed with INSTALL_MOD_STRIP=1. Each test was a one-shot GRUB boot. The saved default stayed on the public 5f kernel. The DTB came from Stage 2 and was not changed.

Results on the release kernels (7.1.12-aurora-rel-g257ca7bed, then -g3faecd4f7 with audio and radio added), and on the earlier integration kernels that also carried the held USB wake line (-integ-ge78a80fd8, -g07a8a7ff4, -g32b5436bd):

  • Boot reaches running with no failed units.
  • Kernel and journal warnings were diffed against the public 5f baseline (neo-public5f-20261015). No new kernel warning types appeared. These went away as expected: dockchannel "keyboard is not initialized", AOP "Unknown oslog message", and the PMGR "always-on domain ... not on at boot" ×8 (now info).
  • Both displays came back after every cycle: eDP plus DP at 1080p180, the internal panel alive (77–91 flips per 2 s), 0 DCP errors and 0 "Failed to resume". Run as dcp-s2idle-regress.sh 6 30 5, 6/6 cycles per run, 3 runs. The DCP mailbox rate in s2idle was about 3 IRQ/s, down from about 62/s.
  • USB: tools/aurora-wake/s2idle-rtc-regression.sh -c 5 -s 20 passed 5/5 per run. W1 ran 10 RTC cycles with the lsusb count steady at 13, and no "HC died", Host System Error or DART fault.
  • Touch ID: 3 prints after every resume, no "state 9". The T1 storm (20 cancelled verifies) logged 0 EBUSY or "did not register" lines. T4 (suspend during a capture) logged "ending the capture in progress before sleep" with no drain failure.
  • Audio enumerates and speakerguardd is active. Mic capture is non-zero. Local sink volumes were identical before and after; nothing was written to the mixer.
  • The camera streams at 30.01 fps for 10 s, before and after s2idle.
  • NVMe: a 512 MiB direct read at 2.9 GB/s. The storage in-flight check passed 5/5 RTC cycles, with acknowledged data verified by size and content.
  • Power check: E 2424 / P 4044 MHz, die zones 44–47 °C at idle, MCC 4 planes, rtc1 wake.
  • KUnit under qemu arm64 on the release stack: 132 tests in total (apple-drm, apple-dart 13/13, cd321x-pm, dwc3_apple_state, speaker ceiling, Rust core), all passing. The radio, macsmc-hwmon and PMC suites run when the series that adds them is present.

Evidence: /Volumes/AuroraS500/aurora-ctl/artifacts/integ-20261015/ (per-boot dmesg, journal and checks; scripts are in scripts/).

🤖 Generated with Claude Code

Registration can clear and authenticate the sensor session after the wake status was sampled. Read status again before trusting the patch acknowledgement, refuse unreadable or silent status, and send an explicit needs-patch state through the existing patch sequence. Preserve capture failures and enrolled identities.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Run the actual wake_sensor body with synthetic registration and status mocks. Check register-before-status ordering, stale accepted acknowledgement followed by needs-patch, unreadable and silent status, fresh accepted readiness, and missing acknowledgement.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The capture work item and the ioctl path both talk to the SBIO endpoint,
which has one out-of-line buffer and one reassembly state. GET_INFO and
ENROL_START list the enclave's identities before waiting for the last
work item, so libfprint cancelling an identify and starting the next one
lands that request in the middle of the previous work item's sensor
registration. The second caller is then refused with EBUSY, or, when it
starts between a completed reply and its collection, clears that reply
and the first caller takes the second caller's answer.

Hold an exchange lock for the whole request and reply, as the key store
already does with sks_exchange_lock. The receive path does not take it.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Compile the driver's sbio_transfer_raw against a threaded enclave mock
and run a work-item exchange and an ioctl exchange at the same time.
Each must get its own reply. Without the exchange lock the ioctl side is
refused with EBUSY in every round.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant