Conversation
Record a pending exception for investigating the printk ringbuffer port after Loom rejects its speculative payload reads. Separate the state protocol model from the C access and compiler contracts without claiming that an atomic control validates ordinary C payload accesses. Keep the proposal inactive until accepted. The existing stop criteria continue to apply to production ports. Assisted-by: LLM [Codex]
bherrera
force-pushed
the
codex/gpt-6/feature/printk-port
branch
from
September 21, 2026 02:30
1a2adae to
cf2a8d9
Compare
Define merging PR #24 as acceptance of the printk-specific criterion-2 amendment. Preserve the single-forwarding-call FFI restriction and state that the existing stop criterion remains tripped until acceptance. Cite the local diagnostic commit and distinguish its minimal race model from complete ringbuffer certification. Assisted-by: LLM [Codex]
Record the explicit authorization to implement printk using the scoped Loom and LKMM validation approach while PR #24 is under development. Keep certification separate from permission to investigate, and link the now-published diagnostic and validation evidence. Assisted-by: LLM [Codex]
Replace the ring buffer algorithm under CONFIG_RUST_KERNEL while retaining the C header and caller ABI. Generate layout assertions from the active C configuration, including execution-context metadata. Keep reservation and recycling decisions in Rust. Forward shared data accesses, atomics and barriers through C primitives without retaining the C algorithm behind the boundary. This is an implementation checkpoint for the printk series. Sequential differential traces, two metadata layouts, C/Rust SMP KUnit runs and three LKMM barrier projections pass. The full compiler-boundary argument, source-comment audit and unsafe classification remain under review. Assisted-by: LLM [Codex]
bherrera
marked this pull request as draft
September 21, 2026 12:22
Keep speculative scalar reads inside C READ_ONCE helpers before descriptor validation. This avoids turning ordinary racing memcpy results into Rust scalar values while preserving the ring algorithm and C caller ABI. Test: printk ringbuffer differential harness, ten seeds and both metadata layouts. Test: SMP Rust kernel build with printk KUnit configuration. Assisted-by: LLM [Codex]
Emit the packed flags and level byte offset plus execution-context offsets from the active C layout. Use the generated values in the Rust mirror instead of deriving offsets from neighboring fields. Test: Rust main crate builds with execution-context metadata enabled. Assisted-by: LLM [Codex]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Implement printk in the agreed order in this PR: ring buffer, nbcon, printk_safe, then printk. The ring buffer implementation is now present; the later units remain outstanding.
The user authorized the scoped LKMM/C-access investigation while this PR is developed. Acceptance of that investigation is not certification of the C/Rust boundary. The single-forwarding-call FFI restriction remains binding.
Implemented checkpoint
Validation
Published infrastructure evidence is on misttech/linux-rust branch codex/gpt-6/feature/printk-port (diagnostic 818c24e, validation 3edea95).
Not ready to merge
The compiler/FFI argument, full preservation of C comments, unsafe classification audit, cross-architecture validation, and remaining printk units are unfinished. This PR is a draft implementation checkpoint.
Kill criteria: layout not tripped; original direct-copy ordering criterion still fails, with the authorized scoped alternative under investigation; KRef unaffected.