Repository navigation
libfprint-git: Touch ID on SEP interface v4 and v5 - #2737
Conversation
DO NOT MERGE (test pin). The 7.3 aurora kernel moves /dev/sep-bio to interface version 5 (aurora-silicon/linux f70f1acd352), which this driver refuses, so Touch ID turns off there. This carries Ryan Murray's two aurora-sep-userspace patches (12f26f61, as in alarm-aurora libfprint-aurora 0004 and 0005), renamed for this driver's aurora-bio.h, so one build works on 7.2 (v4) and 7.3 (v5): - aurora-touchid-bound-enrolment.patch: enrolment needs a Unix account and finger, prepares the Linux owner context first, and logs the matched SEP identity. aurora-bio.h moves to the v5 UAPI. - aurora-touchid-v4-and-v5.patch: accepts v4 and v5, rechecks the version at open, and sends v4 its old enrolment request; a failed v5 request is never retried the v4 way. Their interface test, renamed the same way, runs in check() on aarch64. pkgrel 6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
maralcbr
left a comment
There was a problem hiding this comment.
Reviewed at 2f4d196. Looks good to me, no blockers. The v4/v5 split is right: v4 sends the old 136-byte request through the private AURORA_ENROL_START_V4 (a different ioctl number, because _IOW encodes the size), and v5 runs PREPARE_ENROL then ENROL_START with no v4 fallback. The version is checked again on the fd that does the work. The struct layouts match include/uapi/linux/apple-sep.h on carry/edgeB-7.3. I found no leak of the floating FpPrint on the new error paths. Policy: nothing changes on x86, and the aarch64 changes stay inside Mac Touch ID.
Before it leaves draft
- The x86 build is red because
libfprint:egis_etu905failed incheck(): a umockdev replay timed out (run). x86 gets only the pkgrel bump, and the same test passed on aarch64 (132/132), so this looks like a flake. It still needs a green re-run. - Please run one enrol + verify on a 7.2 (v4) kernel. Right now only the v5 path has run on hardware. Users stay on 7.2 until they reboot, and they go back to it on rollback.
Follow-ups, non-blocking
- ENOSPC changes from
DATA_FULLtoGENERAL. I'm fine with that, but the reason is narrower than the patch comment says.fp_print_equal()compares the RAW data, which is the UUID, so fprintd'stry_delete_print()would only reclaim device prints the host doesn't know about. The change keeps unrepresented SEP prints, and the cost is that real orphans are no longer reclaimed automatically. Related: the comment aboveaurora_print_has_uuid()saysfp_print_equal()compares username and finger. That's stale for this libfprint pin. - IDENTIFY still reports a
MATCHwith an invalid or expired token as "no match" (identify_report(NULL, NULL)), while VERIFY now returns a terminal error. Neither path authenticates. But on IDENTIFY, fprintd's duplicate check before enrolment goes ahead anyway. It would be worth giving IDENTIFY the same error. - The
g_warnings on an identity mismatch write stable enrolment UUIDs to the journal. I'd drop the UUID values at warning level, or move these tofp_dbg. - The errno mapping is global, so an
EINVALfromVERIFY_STARTorDELETEnow says "invalid SEP enrolment account, finger or device request". Making that text enrolment-specific would help. - On
carry/edgeB-7.3, v5 has grown at the same version number:SEP_BIO_STATUS_LOCKOUT(8),LOCKOUT_STATE/REARM/REQUIRE_PASSWORD, and guidance codes 4–7. These are additive, so the ABI is fine. The driver reports a lockout as "verification failed, driver status 0x8" and nothing in this package re-arms. For the 7.3 rollout, it's worth checking that Touch ID recovers after a password re-arm and that a fresh enrolment survives a reboot. - v4 enrolment now also needs a canonical passwd name and a lookup that succeeds. fprintd always supplies both, so I'd accept that as is.
- Small one: the reverse-dry-run guard in
prepare()can't recognise patch 4 once patch 5 is in. The same was already true for patch 1, so this isn't a regression.
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds Apple Touch ID support for SEP interface versions 4 and 5 while keeping the upstream source pin unchanged.
No actionable issues were found. This review checked the source; it did not run builds or hardware tests.
|
|
Tested this on a 14" M4 MacBook Pro (J604) on our 7.3 kernel (7.3.0-1-1.1132), SEP bio interface v5. I built the PR head (2f4d196) as pinned for aarch64 (interface test and 132/132 meson tests pass), installed it in place of my own build (libfprint-git 1:1.94.100.r10.g6f9479c-5.604, which carries the same 0004/0005 as one patch), checked it, then put mine back:
With both patch stacks on 6f9479c the driver sources are identical; only aurora-bio.h differs (yours has the enclave list / delete-orphan part of the UAPI, which the driver doesn't call), and the installed library is byte-identical to mine. The same noise shows up in all three rows, so it isn't from this PR: Release after Claim fails in my check because Claim and Release go out as two separate gdbus calls, so the claim is already gone when Release runs; and every fprintd restart adds the same 4 err-priority journal lines with this package and with mine, none of them from fprintd, the Touch ID units or the kernel SEP driver. Not tested yet: an actual finger match with this package installed. I'll follow up with that. v4 isn't tested here either (this machine is v5). On this result I can drop my own libfprint patch on the J604 and use this package now that it's in edge. |
The 7.3 aurora kernel moves
/dev/sep-bioto interface version 5 (aurora-silicon/linuxf70f1acd352). Our driver accepts only version 4, so Touch ID turns off on 7.3. This carries Ryan Murray's two patches from aurora-silicon/aurora-sep-userspace12f26f61(the 0004 and 0005 that alarm-aurora's libfprint-aurora ships), renamed for our driver'saurora-bio.h, so one build works on 7.2 (v4) and 7.3 (v5):aurora-bio.hmoves to the v5 UAPI.Their interface test (renamed the same way) now runs in
check()on aarch64. It fails on the current driver and passes with the patches. pkgrel 6.The patches are LGPL-2.1-or-later like libfprint; the test is MIT. Their origin lines are kept in each file. After renaming, the driver is identical to aurora-sep-userspace's, and the header has the same ABI as the 7.3 kernel's.
Tested locally: the recipe's
prepare()applies the stack, the code builds with no warnings, and the interface test and meson tests pass. umockdev isn't installed here, so 33 tests skipped.Tested on hardware (v5): this build (libfprint-git 1:1.94.100.r10.g6f9479c-6) on a 16" M4 Pro (J616s) running the 7.3 edgeB2 kernel from omacom/linux-aurora
carry/edgeB-7.3: fingerprint verify works, and the SEP logs interrupt-driven sensor capture. The v4 path on a 7.2 kernel has not been run on hardware.This is meant to merge alongside the edge move to 7.3, which needs v5. It stays a draft until a maintainer has reviewed it, because a non-draft package PR auto-merges once green.
🤖 Generated with Claude Code