Skip to content

media: apple: isp: reject overlapping IPC rings - #218

Closed
RyanTheTide wants to merge 1 commit into
aurora-wipfrom
j616s-isp-contracts
Closed

RyanTheTide wants to merge 1 commit into
aurora-wipfrom
j616s-isp-contracts

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

The ISP channel parser currently permits a ring to overlap another ring or the channel table, boot arguments and command area. A response publication can then overwrite unrelated protocol storage. Unaligned starts also reach the aligned u64 publication store.

Reject these layouts before ring initialization, preserve full 64-bit IOVAs, and record the boot storage span validated in stage2. Doorbell sources may remain shared. No SoC match data, DTS activation or firmware payload is added.

Validation:

  • Six KUnit cases pass in x86 QEMU: high addresses, bounds, alignment, overlap, overflow and recorded J616s ring geometry.
  • The complete ISP directory compiles for ARM64.
  • Checkpatch and diff whitespace checks pass (the generic new-file MAINTAINERS advisory was reviewed; this tree has no ISP-specific entry).
  • A source-only Opus 5.5 parser review completed; the module metadata and adjacency-test feedback were addressed.

This is parser groundwork. It does not qualify Linux camera operation on J616s or any new hardware lifecycle.

A channel ring can currently overlap another ring or the channel table,
boot arguments and command storage while still translating inside the
IPC surface. Publishing a response then corrupts unrelated protocol
storage. Unaligned starts also reach the aligned u64 publication store.

Keep the boot storage span validated in stage2 and reject invalid ring
extents before initializing them. Preserve full 64-bit addresses and
shared doorbell sources. Use subtraction for extent bounds and overlap
checks so firmware-selected addresses cannot wrap those calculations.

Add six device-independent KUnit cases, including the parsed seven-ring
J616s 25G76 geometry above 1 TB. They pass in x86 QEMU; the complete ISP
directory compiles for ARM64. No new SoC match or device activation is
added. Hardware runtime regression has not been performed.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Assisted-by: LLM
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Consolidated into PR #231 at a4e7ee8. All ten added source/config/build blocks from this PR remain verbatim in that head; the IPC layout helper and KUnit test blobs are identical. The replacement also carries the broader gated J616s integration. This closes duplicate tracking without claiming that #231 is hardware-qualified or canonically merged; immutable history is preserved.

@DjDeveloperr
DjDeveloperr deleted the j616s-isp-contracts branch October 16, 2026 21:59
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