Skip to content

iio: aop_devmotion: refuse starts after an unconfirmed client transition - #3558

Merged
RyanTheTide merged 1 commit into
mainfrom
fix/aop-devmotion-unconfirmed-client
Nov 28, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
fix/aop-devmotion-unconfirmed-client

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

An unconfirmed fast-path open or close can leave the AOP using the DMA ring. A later read or buffer enable could reuse the unresolved client or send another open with the same mapping.

Keep the mapping and refuse new starts on that driver binding. A confirmed close still permits reopening. The fixed-size close request no longer requires an allocation.

Tested: ARM64 aop_devmotion.o built with W=1 using the fleet configuration at 9bd523751aeb. Three host cases exercise the exact driver methods against a mock EPIC service. The two failure-path cases reproduce on base 18058ea228e2 and pass with the change. The confirmed-close and explicit-refusal control passes on both.

An unconfirmed fast-path open or close leaves the firmware possibly
using the DMA ring. The driver keeps that ring mapped, but a later
read or buffer enable can reuse the unresolved client or open another
one against the same ring.

Refuse starts on that binding once the ring must be retained. Build
the fixed-size close request on the stack so an allocation failure
cannot prevent the close attempt.

Fixes: 091f105 ("iio: apple: devmotion: pace the fast path on the host, open it on demand")
Signed-off-by: Ryan Murray <[email protected]>

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at 9bd5237 after exact-head runtime validation.

Checked: the new open guard rejects a retained DMA ring before assigning a new client or asking the service to enable reports. Failed close keeps the ring retained, a confirmed close permits reopening, and the stack buffer preserves the close message size and layout. Checked that the diff is confined to device-motion and leaves calibration and DT unchanged. The reported mock controls and ARM64 build support the source review. The two-family runtime rows remain due.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

@aurora-silicon/core @aurora-silicon/omarchy-mac @aurora-silicon/aurora-maintainers review requested for 9bd523751aeb. The change keeps the DMA ring mapped and blocks subsequent starts after an unconfirmed device-motion client open or close. The ARM64 object and three host cases passed. Two-family hardware validation is pending.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

J316s (M1 Pro, T6000) at exact #3558 head 9bd523751aeb458d5fdd39c00412854743094266 — PASS. The signed 7.3.0-aurora-devmotion3558 trial carried that head on 4ffd63af1907. It loaded the signed device-motion module with build ID afbb018ca9a1238890bf7cf09404c7b483d594be on the saved Stage 2 and normal command line.

The devmotion6 direct read, three buffered quaternion scans and fresh direct read passed before and after one 15-second s2idle cycle through the PMU RTC. The boot ID stayed the same and the suspend-success counter advanced from 0 to 1. Saved fleet89, its Stage 2, default GRUB entry, SELinux Enforcing and zero failed units were verified after restoration. The trial files were removed.

The second-family candidate row is pending.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

J615 (M3 Air, T8122), exact Linux #3558 head 9bd523751aeb458d5fdd39c00412854743094266 — PASS.

The signed 7.3.0-aurora-devmotion3558 Image and AOP module match the prior J316s row. The shared one-shot also carried the signed exact #3548 GPU module. J615 loaded aop_devmotion build ID afbb018ca9a1238890bf7cf09404c7b483d594be.

Direct quaternion read, three buffered scans and a fresh direct read all passed before and after one 15-second PMU RTC s2idle on the same boot. The same-boot journal records one suspend entry and exit. The final counters show one successful suspend and zero failures. The scoped AOP and kernel error scan was clean.

Verified the saved Edge boot, unchanged Stage 2 and command line, empty next entry, GRUB boot success 1, SELinux Enforcing and zero failed units after return. Removed the one-shot files. This is the second family alongside the signed J316s T6000 row.

Lab evidence: traces/ci/20261129-j615-3548-3558.

@RyanTheTide
RyanTheTide marked this pull request as ready for review November 28, 2026 21:04
@RyanTheTide
RyanTheTide requested review from a team as code owners November 28, 2026 21:04
@github-actions github-actions Bot added door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 28, 2026
@github-actions

Copy link
Copy Markdown

Merge readiness at 9bd52375: not ready yet

Check Detail
CI at head running running: pr-text / pr-text
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok comment at 9bd52375
Conflicts ok none
PR text ok Risk: two-way · Macs whose AOP offers devmotion6. An unconfirmed transition leaves this driver binding unavailable for further starts.

Areas: none matched in CODEOWNERS

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide

RyanTheTide commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Merging under the 6-point rule (Ryan 09:29, permanent), at 9bd52375. (1) The review App approved at this head. (2) Full CI is green. (3/4) Rows: J316s-T6000+J615-T8122. (5) There's no blocking review. (6) Dj was pinged here 260 min ago with no objection. Revert: git revert -m 1 b48f89158d7c.

@RyanTheTide
RyanTheTide merged commit b48f891 into main Nov 28, 2026
4 of 6 checks passed
@RyanTheTide
RyanTheTide deleted the fix/aop-devmotion-unconfirmed-client branch November 28, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant