Skip to content

libfprint-git: Touch ID on SEP interface v4 and v5 - #2737

Merged
maralcbr merged 1 commit into
omacom:masterfrom
scottjones:pin/libfprint-sep-v4-v5-test
Nov 20, 2026
Merged

maralcbr merged 1 commit into
omacom:masterfrom
scottjones:pin/libfprint-sep-v4-v5-test

Conversation

@scottjones

@scottjones scottjones commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

The 7.3 aurora kernel moves /dev/sep-bio to interface version 5 (aurora-silicon/linux f70f1acd352). 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-userspace 12f26f61 (the 0004 and 0005 that alarm-aurora's libfprint-aurora ships), renamed for our driver's aurora-bio.h, so one build works on 7.2 (v4) and 7.3 (v5):

  • Bound enrolment: enrolment needs a Unix account and finger, and prepares the Linux owner context first. aurora-bio.h moves to the v5 UAPI.
  • v4 and v5: both are accepted, and the version is checked again at open. v4 gets its old enrolment request, and a failed v5 request is never retried the v4 way.

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

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 maralcbr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_etu905 failed in check(): 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

  1. ENOSPC changes from DATA_FULL to GENERAL. 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's try_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 above aurora_print_has_uuid() says fp_print_equal() compares username and finger. That's stale for this libfprint pin.
  2. IDENTIFY still reports a MATCH with 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.
  3. 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 to fp_dbg.
  4. The errno mapping is global, so an EINVAL from VERIFY_START or DELETE now says "invalid SEP enrolment account, finger or device request". Making that text enrolment-specific would help.
  5. 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.
  6. 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.
  7. 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.

@maralcbr
maralcbr marked this pull request as ready for review November 20, 2026 22:09
@maralcbr
maralcbr merged commit f62f472 into omacom:master Nov 20, 2026
13 of 15 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Publish succeeded → live

Packages: libfprint-git (x86_64, PR artifact); libfprint-git (aarch64, PR artifact)

  • edge/x86_64: libfprint-git-1:1.94.100.r10.g6f9479c-6-x86_64
  • edge/aarch64: libfprint-git-1:1.94.100.r10.g6f9479c-6-aarch64

Commit f62f472 · run

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds Apple Touch ID support for SEP interface versions 4 and 5 while keeping the upstream source pin unchanged.

  • One Touch ID build now speaks SEP interface versions 4 and 5.
  • Touch ID enrollment now binds each print to a Unix account and finger.
  • Touch ID now reports which SEP identity matched when saved prints do not line up.

No actionable issues were found. This review checked the source; it did not run builds or hardware tests.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Open device and read interface version] --> B{Version supported?}
  B -->|No| C[Close device and return error]
  B -->|Yes| D[Resolve enrolment account and finger]
  D --> E{Interface version}
  E -->|4| F[Send legacy enrolment request]
  E -->|5| G[Prepare Linux owner context]
  G -->|Success| H[Send v5 enrolment request]
  G -->|Failure| I[Return error without legacy retry]
Loading

Reviews (1) · Last reviewed commit: "libfprint-git: Touch ID on SEP interface..." · Reviewed by Greptile

@IronsideXXVI

Copy link
Copy Markdown
Contributor

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:

package fprintd sensor enrolled print Claim (opens the SEP session)
before -5.604 (mine) active Apple secure enclave fingerprint sensor right index, listed OK
this PR -6 active same right index, still listed OK
restored -5.604 active same right index, listed OK

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.

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.

3 participants