Skip to content

tools: aurora-sep: share the SELinux device type and let fprintd read the lid - #567

Closed
RyanTheTide wants to merge 1 commit into
integration/aurorafrom
aurora-sep/selinux-shared-type
Closed

RyanTheTide wants to merge 1 commit into
integration/aurorafrom
aurora-sep/selinux-shared-type

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

This makes the SEP policy module in tools/aurora-sep the same policy that fedora-aurora ships, so a Mac can move between the kit and the package without losing the /dev/sep-bio label.

Why

Both build a module named aurora_sep. The kit labelled the device sep_bio_device_t and the package aurora_sep_device_t. Only one module of a name is active at a priority, so on a ref Mac that went from the kit's aurora-sep-selinux to the package the kernel logged "Context sep_bio_device_t became invalid" and fprintd lost the device.

The package's module also has two rules the kit lacks:

  • dev_read_input(fprintd_t). libfprint's aurora build hides the reader while the lid is closed by following SW_LID on the input event devices. Without the rule fprintd logs "Cannot open /dev/input/eventN: Permission denied" under the enforcing targeted policy and keeps offering Touch ID in clamshell. libfprint's own fprintd drop-in already allows char-input for the device cgroup.
  • init_t may open, read and query the device, for the readiness helpers the units run.

What changes

  • aurora_sep.te and aurora_sep.fc use aurora_sep_device_t, the package's name, which also follows the habit of prefixing a module's types with its name. The two rules above are added, the fprintd ones inside the existing optional_policy.
  • README.md says what the input rule is for, and that semodule -i loads at priority 400 and shadows the packages' 200 until removed with semodule -X 400 -r aurora_sep. Both ref Macs have exactly that today: a hand-loaded module at 400 over aurora-sep-selinux at 200.
  • packaging/fedora/aurora-sep.spec goes to 1-9 with a changelog entry. The Arch pkgrel goes to 14 for the README checksum. The Arch package does not ship the policy.

Testing

  • tests/test_packaging.py passes on the changed tree (Arch sums, spec sources, the label and type check).
  • The module compiles with the Fedora 44 selinux-policy-devel Makefile on the M1 Pro, in a temporary directory, without loading it.
  • The policy text is the one the M1 Pro and M2 run today (hand-loaded from fedora-aurora), where clamshell hiding was confirmed on the M1 Pro.

The distribution side:

Once this merges, the Fedora provenance can move from this branch's commit to the merged one.

🤖 Generated with Claude Code

… the lid

The fedora-aurora package builds a policy module of the same name,
aurora_sep, but labels /dev/sep-bio aurora_sep_device_t where this tree
says sep_bio_device_t. Only one module of a name is active per priority,
so a Mac that moved from this tree's aurora-sep-selinux to the package
logged "Context sep_bio_device_t became invalid" and was left with an
unlabelled /dev/sep-bio, which fprintd may not open. Use the package's
name. It follows the reference policy habit of prefixing a module's types
with the module name.

The package's module also has two rules this one lacks. libfprint's
aurora build hides the reader while the lid is closed by following SW_LID
on the input event devices. Under the targeted policy fprintd may not read
those, logs "Cannot open /dev/input/eventN: Permission denied" and keeps
offering Touch ID in clamshell. dev_read_input(fprintd_t) allows the read;
the fprintd unit drop-in that libfprint ships already allows char-input
for the device cgroup. The package also lets init_t open, read and query
the device, for the readiness helpers its units run. Take both, so the
two modules are the same policy.

The README says what the input rule is for and that a module loaded by
hand with semodule -i sits at priority 400 and shadows a packaged one.
Bump the Fedora spec to 1-9 for the policy change, and the Arch pkgrel to
14 for the README checksum.

Built with the Fedora 44 selinux-policy-devel Makefile.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Held: on the Neo (J700) this kit regresses Touch ID. Same kernel (7.3.0-aurora-fleet8) and Stage 2 before and after; the only change was aurora-sep 1-3 to 1-9.

  • With 1-3: no calibration refusals, and Touch ID ready at once.
  • First boot on 1-9: LOAD_CALIBRATION refused with status 0x1c ten times (source 6, 122571 bytes), and aurora-sep-ready failed ("sensor attach incomplete").
  • Back on 1-3, and with the new /var/lib/aurora-sep calibration cache moved aside: still ten refusals each boot, but Touch ID recovers in about 9 s with both enrolled fingers.

So the first 1-9 run left persistent state behind. The J616s and both ref Macs are fine on 1-9. Investigating; this stays unmerged until the Neo is clean.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Superseded by #584, which carries the same policy text plus the Arch sum fix and is now merged. The M2 and M1 Pro (fleet10, packaged policy at priority 200) both label /dev/sep-bio as aurora_sep_device_t.

🤖 Generated with Claude Code

@RyanTheTide
RyanTheTide deleted the aurora-sep/selinux-shared-type branch October 30, 2026 11:31
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