Skip to content
This repository was archived by the owner on Oct 18, 2026. It is now read-only.

Initialize device coredump reads and validate ISP ring storage - #131

Merged
chriskearney merged 4 commits into
custom/sepfrom
fixes/sweep-safety-20261011
Oct 11, 2026
Merged

chriskearney merged 4 commits into
custom/sepfrom
fixes/sweep-safety-20261011

Conversation

@chriskearney

@chriskearney chriskearney commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Rust device-coredump readers now receive an initialized byte buffer. Oversized results return -EIO. Both the foreign owner and dump must support concurrent reads, and ownership must support delayed workqueue disposal. Byte slices also work where c_char is signed.

The ISP rejects misaligned rings and rings overlapping the channel table, boot arguments, command storage or another ring. Firmware addresses remain 64-bit; device matching and camera activation stay unchanged. The existing Rust KUnit comparison helper gains its required Debug bound.

Validation: ARM64 QEMU KUnit passed 49 tests with one intentional skip, including five coredump and six ISP cases. Rust 1.93.1 accepts owned and thread-safe foreign-owner dumps and rejects non-Send, non-Sync and borrowed dumps. The same non-Sync owner compiles against the predecessor and fails against the corrected API. The corrected full ARM64 kernel and headers package build passed, including the Asahi and Neo consumers. Independent artifact checks bind both packages to the frozen recipe/source and confirm unchanged configuration, GPU UAPIs and 115 device trees. No new physical camera qualification is claimed.

Related upstream changes: device-coredump safety and ISP IPC ring validation.

chriskearney and others added 4 commits October 10, 2026 18:00
The KUnit buffer comparison prints mismatched values. Require Debug in
the test helper so the Rust KUnit crate compiles.

Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
Initialize the kernfs buffer before exposing it as bytes and reject a
reader result larger than that buffer. Require owned dumps to be Send
and static, and readers to be Sync for concurrent userspace reads.

Keep byte slices independent of the architecture c_char signedness.
Exercise unwritten bytes, short reads, oversized results, offsets,
errors and EOF through the read and release callbacks.

Signed-off-by: Daniele Scaratti <lupo.develop@gmail.com>
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
Retain the boot argument and command span, then reject channel rings
that overlap it, the channel table or another ring. Require aligned
u64 publication addresses and complete 64-byte message slots.

Keep full 64-bit addresses and use subtraction for extent bounds and
overlap checks to reject wrapping firmware-selected ranges.

Signed-off-by: RyanTheTide <RyanTheTide@users.noreply.aur.archlinux.org>
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
Concurrent read callbacks borrow the foreign owner before accessing the dump. Require the owner itself to be Sync as well as its reader, so ownership wrappers with unsynchronized interior state cannot be registered.

Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
@chriskearney
chriskearney marked this pull request as ready for review October 11, 2026 01:31
@chriskearney
chriskearney merged commit 85c31e8 into custom/sep Oct 11, 2026
@chriskearney chriskearney added bug Something isn't working priority:P0 Fix first: confirmed session/security or destructive failure. status:merged Fix merged into integration branch; release or stated hardware retest pending. labels Oct 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working priority:P0 Fix first: confirmed session/security or destructive failure. status:merged Fix merged into integration branch; release or stated hardware retest pending.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants