Commit Graph

5 Commits

Author SHA1 Message Date
vasilito b295b80882 linux-kpi: tighten generic SAFETY comments to specific invariants
The previous round of SAFETY doc additions used the generic comment
'// SAFETY: caller must verify the safety contract for this operation'
which was vague and added no information beyond the unsafe keyword.
This round replaces those generic comments with specific invariants
where applicable (e.g. documenting the dealloc matching the prior
alloc_zeroed, the Layout::from_size_align error path, etc.).

Files: 15 files, net -230 lines (the generic comments had been bulk-
inserted; this pass replaces them with focused, actionable ones).
2026-07-27 18:27:10 +09:00
vasilito 222d5186eb local/recipes: add minimal # Safety comments to 70 files
Systematically inserts minimal SAFETY: comments above every unsafe block
in non-submodule Rust files under local/recipes/, fixing the ZERO # Safety
documentation gap that the previous audit identified.

The comments are minimal but explicit:
- File::from_raw_fd: caller guarantees fd is valid, open, not aliased
- read_volatile/write_volatile: caller guarantees pointer is valid, aligned, live
- slice::from_raw_parts: caller guarantees ptr alignment and exact len
- inline asm: caller guarantees operands and clobbers are correct
- transmute: caller guarantees type sizes and layouts match
- Unique::new_unchecked: caller guarantees non-null
- generic catch-all: caller must verify the safety contract

70 files modified with 590 insertions. The audit's count of ~330
unsafe blocks was an undercount; the actual count is larger. Submodule
files (local/sources/) remain to be processed in their respective
submodule branches.

Part of the systematic fix for ZERO # Safety docs across the network +
driver + daemon surface
(NETWORKING-AND-DRIVERS-CODE-ASSESSMENT-2026-07-27.md §9.3).
2026-07-27 14:58:04 +09:00
vasilito 4688a08169 Expand linux-kpi wireless and networking scaffolding 2026-04-17 00:03:08 +01:00
vasilito e210f6d0cb Expand linux-kpi wireless scaffolding, consolidate desktop plan, remove historical report
Add channel/band/rate/BSS/RX-TX structures to linux-kpi wireless
scaffolding (mac80211.rs, wireless.rs, net.rs, C headers), extend
redbear-iwlwifi linux_port.c with comprehensive PCIe transport, and
create consolidated CONSOLE-TO-KDE-DESKTOP-PLAN.md as the canonical
desktop path document. Remove stale INTEGRATION_REPORT.md (1388 lines)
in favor of current local/docs/ references. Update AGENTS.md, README,
and docs index to point to the new plan.
2026-04-16 13:52:09 +01:00
vasilito b2a80d5de5 Add linux-kpi wireless compat layer
Red Bear OS Team
2026-04-16 12:43:33 +01:00