Repository navigation
iio: aop_devmotion: refuse starts after an unconfirmed client transition - #3558
Conversation
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]>
There was a problem hiding this comment.
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.
|
@aurora-silicon/core @aurora-silicon/omarchy-mac @aurora-silicon/aurora-maintainers review requested for |
|
J316s (M1 Pro, T6000) at exact #3558 head The The second-family candidate row is pending. |
|
J615 (M3 Air, T8122), exact Linux #3558 head The signed Direct quaternion read, three buffered scans and a fresh direct read all passed before and after one 15-second PMU RTC 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: |
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Merging under the 6-point rule (Ryan 09:29, permanent), at |
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.obuilt withW=1using the fleet configuration at9bd523751aeb. Three host cases exercise the exact driver methods against a mock EPIC service. The two failure-path cases reproduce on base18058ea228e2and pass with the change. The confirmed-close and explicit-refusal control passes on both.9bd523751aeb. Direct and buffered device-motion reads passed before and after same-boot PMU RTC s2idle on each Mac. Both returned to their saved boots. J316s row J615 rowRisk: two-way door · Macs whose AOP offers
devmotion6. An unconfirmed transition leaves this driver binding unavailable for further starts.The calibration and direct-read idle-window changes remain in iio: aop_motion: fix the M1/M2 accelerometer and gyroscope, and idle-window aop_devmotion (stacked on #2910) #2927.