Round 14 audit cleanup. Six coordinated fixes across seven files
plus a documentation log update:
1. local/recipes/system/redbear-wayland-guard/ — REMOVED entirely.
The directory contained only source/wayland_guard.c — an LD_PRELOAD
interposer stub for three wl_proxy_* functions — with NO recipe.toml.
This violated local/AGENTS.md STUB AND WORKAROUND POLICY ('No LD_PRELOAD
tricks'). The correct null-guard fix lives in libwayland upstream per
QT6-WAYLAND-NULL8-DIAGNOSIS.md (already covered by Mesa win compat).
2. recipes/system/redbear-wayland-guard — broken symlink cleaned up.
3. local/recipes/AGENTS.md — catalog entry for redbear-wayland-guard was
wrong (claimed 'Rust' but the code was C LD_PRELOAD). Replaced with
REMOVED note explaining the policy violation and the correct fix
location in libwayland.
4. local/recipes/system/firmware-loader/source/src/main.rs — converted
9 .expect() calls in the daemon init path (Socket::create, scheme_root,
create_this_scheme_fd, syscall::call_wo notify, setrens, next_request,
write_response) to Result propagation. get_init_notify_fd() and
notify_scheme_ready() now return Result; run_daemon() returns Result and
main() matches on Err to log+exit(1) cleanly. The daemon was
crashing the entire firmware-delivery subsystem on any init failure;
now init can fall back or restart the daemon.
5. local/recipes/system/{redbear-keymapd,redbear-ime,redbear-accessibility}/
source/src/main.rs — three scheme daemons used the same
Socket::create().expect() + register_sync_scheme().expect() pattern.
Replaced all six .expect() calls with match expressions that
log_msg('ERROR', ...) and process::exit(1). Same pattern.
6. local/docs/NETWORKING-AND-DRIVERS-SYSTEMATIC-ASSESSMENT-2026-07-27.md —
struck through 5 references to the now-removed redbear-wayland-guard
(line 65 missing-daemons list, line 344 table row, line 397
implementation list, line 414 source-list, line 797 P3-8 backlog).
7. local/docs/SUPERSEDED-DOC-LOG.md — appended a 'Rounds 11-14 Source-Level
Supersessions' table logging every lie-grade fix and stale-doc
strike from this session. Mirrors the original deletion-log style for
consistency, and gives operators a single place to see what was
resolved and where. Documents the emerging pattern: lie-grade code in
Red Bear concentrates in (a) relibc panic-site catch-alls (addressed
rounds 9-10), (b) scheme daemon init paths using .expect() instead of
Result (rounds 11-14), (c) Mesa DRM/Wayland stubbing (rounds 12;
remaining work tracked in 3D-DESKTOP-COMPREHENSIVE-PLAN.md).
Not committed in this commit (operator's parallel work, to be
committed by them):
- driver-manager/* (N-tier edits)
- redbear-sessiond/manager.rs (can_* probe refinements)
- redbear-statusnotifierwatcher/* (recipe + source)
- redbear-dbus-services/* (dbus service cleanup)
- redox-driver-core/manager.rs (test-only)
- Mesa redox_drm_cs.c (CS submit fix)
7 files changed in this commit + 2 deletions.
65 KiB
Red Bear OS — Networking & Drivers Systematic Assessment (2026-07-27)
MASTER FIX/IMPROVEMENT INDEX for the network stack + drivers + daemons + utils surface. This document is the single consolidated assessment. Canonical sub-plans are cross-referenced, not duplicated.
0. Document Status & Scope
0.1 Purpose
This is the canonical systematic assessment of every networking, driver, daemon, and util surface in Red Bear OS that touches the network or hardware stack. It is the single index that an operator or contributor reads first when:
- triaging a defect in networking, a driver, or a system daemon,
- planning which subsystem needs validation next,
- understanding what is "implemented but unproven" vs "missing",
- prioritizing P0 work across the network stack.
It does NOT replace the per-subsystem implementation plans (which own the per-subsystem roadmaps and per-step verification). It IS the umbrella that synthesizes defects, gaps, blockers, and bad practices across all of them.
0.2 In-Scope Subsystems (21)
Wired TCP/IP · Ethernet drivers · DHCP · Wireless (iwlwifi + linux-kpi) · Bluetooth · USB stack · PCI/ACPI/IOMMU · Graphics/GPU · Audio · Storage · Input/HID · System daemons · Power/Thermal · Session services · Network daemons & utils · Firmware loader & pkgs · Driver manager & policy · Quirks system · relibc/libredox/syscall network surface · Virtio paravirt drivers · USB hotplug.
0.3 Audit Provenance
Synthesizes 5 parallel deep audits (2026-07-27):
| Audit | Subsystem | Method | Output |
|---|---|---|---|
| A1 | Wired network stack | Per-file inventory + TODO grep | 42+12+2 files mapped; 13 TODO/FIXME in netstack |
| A2 | Wireless + Bluetooth stack | Per-file inventory + validation status | 328 tests counted (linux-kpi 93 + iwlwifi 8 + wifictl 20 + btusb 151 + btctl 56) |
| A3 | System drivers + daemons | Directory walk + recipe.toml inspection | 110-component inventory; 6 missing/skeleton |
| A4 | Documentation staleness | Head-of-doc classification + cross-ref check | 13-doc classification; 5 cross-ref gaps |
| A5 | Bad practices | grep + targeted reads | ~250 unsafe blocks (0 with Safety docs); 501 unwrap/expect; 32 TODO/FIXME |
0.4 Severity, Maturity & Confidence Rubric
Severity (defects): P0 = correctness/safety: UB, data leak, panic in production. P1 = high: missing functionality, broken validation. P2 = medium: maintainability, code quality. P3 = low: cosmetic.
Maturity (subsystems): builds compiles | host-tested unit tests pass on Linux | qemu-proven runtime verified in QEMU | validated bare-metal proof | experimental present, no runtime proof | missing no implementation.
0.5 How to Use This Document
- Operator triaging bug: §3 → canonical sub-plan → §6 defects → §14 file:line → §12 roadmap → §13 validation.
- Contributor planning: §11 doc audit → §5 completeness → §7 gaps → §8 blockers → §12 roadmap → §13 validation.
- Reviewer: §1 exec → §2 methodology → §9 bad practices → §10 cross-cutting.
0.6 Cross-Reference Convention
[REF: <path>] markers reference canonical authoritative docs. [ARCHIVED: <path>] for historical.
1. Executive Summary
1.1 Top-Line Findings
- Wired TCP/IP stack is the most mature userspace subsystem. smolnetd/netstack implements IPv4+IPv6, TCP (CUBIC), UDP, ICMP, netfilter, conntrack, NAT, TUN, VLAN, VXLAN, GRE, IPIP, Bridge, Bond, STP, packet capture. ~80-85% POSIX socket coverage. QEMU-proven.
- Wireless + Bluetooth stack is software-complete but hardware-unvalidated. redbear-iwlwifi is 3,368 LOC; redbear-btusb has 151 tests; redbear-btctl has 56 tests; linux-kpi has 93 tests; redbear-wifictl has 20 tests. No Intel Wi-Fi hardware, no USB Bluetooth adapter for runtime validation.
- ~110 components across drivers/daemons largely builds-clean. Driver-manager replaced pcid-spawner (v5.0). Shared-IRQ re-arm bug class swept across 11 drivers (2026-07-20). USB xHCI is QEMU-proven for hub + hub-child + storage BOT. 5 missing/skeleton daemons: audiodevd, usbd, redbear-dnsd, redbear-firmware-{amdgpu,intel,iwlwifi,bluetooth}. (
redbear-wayland-guardremoved 2026-07-27 — was an LD_PRELOAD stub violating zero-stub policy; correct fix lives in libwayland perQT6-WAYLAND-NULL8-DIAGNOSIS.md.) - Documentation is exceptionally well-organized. 13 networking docs: 8 canonical, 2 already in
legacy-obsolete-2026-07-25/, 3 reference. No genuinely stale docs need moving. Cross-reference gaps exist (NETWORKING-IMPROVEMENT-PLAN.mdshould back-referenceHARDWARE-NETWORKING-INVENTORY.md,HARDWARE-VALIDATION-MATRIX.md,FIREWALL-VALIDATION-LOG.md). - Single worst systemic issue: ZERO
# Safetydocumentation on ~250 unsafe blocks across relibc socket.rs (99), libredox lib.rs (49), ethernet drivers (52), netstack (7), daemons (43), driver libraries (~80). Future refactors / edition upgrades / compiler changes can introduce UB silently.
1.2 Maturity Heatmap
| Subsystem | Builds | Host | QEMU | Validated |
|---|---|---|---|---|
| Wired TCP/IP (netstack) | ✅ | ✅ | ✅ | 🚧 partial |
| DHCP | ✅ | ✅ | ✅ | 🚧 partial |
| Ethernet NICs (5) | ✅ | ✅ | ✅ 3 | ❌ 0 |
| POSIX sockets (relibc) | ✅ | ✅ | ✅ | 🚧 partial |
| LinuxKPI | ✅ | ✅ 93 tests | N/A | N/A |
| iwlwifi | ✅ | ✅ 8 tests | 🟡 VFIO only | ❌ |
| Wi-Fi control | ✅ | ✅ 20 tests | 🟡 lifecycle | ❌ |
| Bluetooth transport | ✅ | ✅ 151 tests | 🟡 in progress | ❌ |
| Bluetooth host | ✅ | ✅ 56 tests | 🟡 in progress | ❌ |
| USB xHCI | ✅ | ✅ 43 tests | ✅ | ❌ |
| USB EHCI/UHCI/OHCI | ✅ | ❌ | ❌ | ❌ |
| IOMMU | ✅ | ✅ | ✅ first-use | ❌ |
| PCI/ACPI/driver-mgr | ✅ | ✅ | ✅ | 🚧 AMD64 proven |
| Audio | ✅ | ❌ | ❌ | ❌ |
| Daemons (48) | ✅ 44 | varies | ✅ 12 | ❌ |
1.3 Critical Risks
- Wi-Fi hardware absent — blocks W4 (First Association Milestone). Without an Intel Wi-Fi NIC, v1.0 cannot be validated end-to-end. Acquiring a USB Wi-Fi adapter or VFIO passthrough of a host Wi-Fi device is the single biggest validation unlock.
- USB CDC ECM dongle absent — the LG Gram has NO wired NIC and NO USB-Ethernet dongle. The Gram is unnetworkable on bare metal unless USB CDC ECM driver (
redbear-ecmd) is validated AND a dongle is acquired. This is the LG Gram's only viable networking path. - Threadripper NIC inventory uncollected — blocks bare-metal Ethernet driver validation.
- relibc socket surface has 7 documented gaps — TCP
SendMsgentirely missing,MSG_NOSIGNALnot implemented, ICMP caps stubbed, flat option namespace causes TCP_MAXSEG/IP_TTL/SO_REUSEADDR collision. - No DHCP lease renewal — dhcpd is one-shot. Long-running sessions will lose IP after T1.
redbear-dnsdnot wired into any config — fully built, has a service file (11_dnsd.service), but included in zeroredbear-*.tomlconfig targets.
1.4 Top P0 Recommendations
| # | Action | Source | Effort |
|---|---|---|---|
| P0-1 | Add # Safety sections to all 99 unsafe blocks in relibc/src/platform/redox/socket.rs |
§6.2 / §9.3 | 1-2 days |
| P0-2 | Add # Safety sections to all 49 unsafe blocks in libredox/src/lib.rs |
§6.2 / §9.3 | 1 day |
| P0-3 | Add MMIO register bounds checks to e1000d, rtl8139d, rtl8168d (copy ixgbe's device.rs:237 pattern) |
§6.2 | 1 day |
| P0-4 | Replace panic! on failed BAR lookup in rtl8139d/main.rs:35, rtl8168d/main.rs:35 |
§6.2 | 1 hour |
| P0-5 | Add # Safety sections to all 52 unsafe blocks in ethernet drivers |
§6.2 / §9.3 | 1 day |
| P0-6 | Wire redbear-dnsd into redbear-mini.toml (add package + 11_dnsd.service) |
§6.2 / §7.4 | 1 hour |
| P0-7 | Acquire USB-C Ethernet dongle (CDC ECM, ~$15) for LG Gram validation | §8.1 | logistics |
| P0-8 | Collect Threadripper NIC inventory (lspci -nn | grep -i ethernet) |
§8.1 | logistics |
| P0-9 | Pass level parameter through SocketCall protocol to fix TCP_MAXSEG/IP_TTL/SO_REUSEADDR collision |
§6.2 | 3-5 days |
| P0-10 | Add cross-references to NETWORKING-IMPROVEMENT-PLAN.md for HARDWARE-NETWORKING-INVENTORY / HARDWARE-VALIDATION-MATRIX / FIREWALL-VALIDATION-LOG |
§11.5 | 1 hour |
1.5 Headline Metrics
| Metric | Count | Source |
|---|---|---|
| Total components audited | ~110 | A3 |
| Components that build | ~104 | A3 |
| Components QEMU-proven | ~50 | A3 |
| Components bare-metal-validated | 1 (AMD64 boot) | A3 |
| Missing/skeleton daemons | 6 | A3 |
.unwrap() + .expect() instances |
501 | A5 |
unsafe blocks total |
~250 | A5 |
unsafe blocks with # Safety doc |
0 | A5 |
TODO / FIXME / XXX markers in network code |
32 | A4 |
let _ = silent error swallows |
55 | A5 |
| Different error-handling strategies in concurrent use | 5 | A5 |
| Different async runtimes in concurrent use | 3 | A5 |
| Networking docs classified | 13 | A4 |
| Stale docs that need moving | 0 | A4 |
| Cross-reference gaps in canonical plans | 5 | A4 |
| Total host unit tests counted | 328 | A2 |
2. Assessment Methodology
Audit Boundaries: all source files under local/sources/, local/recipes/, and relevant recipes/ for the 21 subsystem classes. All networking docs in local/docs/ and docs/. All patches under local/patches/. Test scripts under local/scripts/.
Out of scope: build-system internals (own canonical plan), kernel CPU scheduler, Wayland/KDE compositor, D-Bus internals.
Method:
- A1 Wired network: directory walk of
local/sources/base/netstack/(42 files),local/sources/base/drivers/net/(12 files),local/sources/base/dhcpd/(2 files),relibc/src/platform/redox/socket.rs(1,236 lines),libredox/src/lib.rsSocketCall. - A2 Wireless/BT: directory walk of
redbear-iwlwifi/(C+Rust, 3,368 LOC),linux-kpi/(47 C headers + 19 Rust modules),redbear-wifictl/(4 files),redbear-btusb/(5 files),redbear-btctl/(6 files). - A3 Drivers/daemons: walk of
recipes/drivers/,local/recipes/drivers/,recipes/system/,local/recipes/system/. Per-recipe.toml inspection. Cross-check againstconfig/redbear-*.toml. - A4 Docs: head-of-doc identity verification for all 13 networking docs. Cross-reference integrity check.
- A5 Bad practices: grep for
.unwrap(),.expect(),panic!,unsafe,let _ =,as u8/...,TODO/FIXME/XXX/HACK. Targeted file reads for semantic context.
Sources of truth:
- Recipe builds:
recipes/<comp>/source/Cargo.toml+recipe.toml. - Recipe in config:
config/redbear-*.tomlpackage lists. - QEMU-proven: test scripts in
local/scripts/+ recent commit history. - linux-kpi scope:
local/AGENTS.md:1222+AGENTS.md:906.
Limitations: Build-state claims based on recipe.toml + target/ presence (not fresh full build). Validation claims based on commit history + script presence (not re-execution). Bare-metal validation is operator-reported only. Bad-practice counts are a snapshot at 2026-07-27.
3. Authoritative Document Index
3.1 Canonical Plans (Live)
| Topic | Doc | Summary |
|---|---|---|
| Wired TCP/IP stack | [REF: local/docs/NETWORKING-IMPROVEMENT-PLAN.md] |
smolnetd/netstack, Ethernet drivers, POSIX sockets, netcfg/dhcpd/netctl |
| Hardware gate (Phase -1) | [REF: local/docs/HARDWARE-NETWORKING-INVENTORY.md] |
Test bench inventory + per-driver hardware availability |
| Wi-Fi | [REF: local/docs/WIFI-IMPLEMENTATION-PLAN.md] |
iwlwifi + linux-kpi + redbear-wifictl + W0-W7 phases |
| Bluetooth | [REF: local/docs/BLUETOOTH-IMPLEMENTATION-PLAN.md] |
btusb + btctl + B0-B7 phases |
| USB (network-adjacent) | [REF: local/docs/USB-IMPLEMENTATION-PLAN.md] |
xhcid + CDC ECM (LG Gram path) |
| Driver manager | [REF: local/docs/DRIVER-MANAGER.md] |
pcid-spawner → driver-manager cutover + post-v5.9 review |
| Repo-level | [REF: docs/07-RED-BEAR-OS-IMPLEMENTATION-PLAN.md] |
Repository-level architecture, packaging, validation, staged HW |
3.2 Validation Logs & Runbooks
[REF: local/docs/FIREWALL-VALIDATION-LOG.md]— firewall 6 scenarios[REF: local/docs/HARDWARE-VALIDATION-MATRIX.md]— hardware validation tracking[REF: local/docs/USB-VALIDATION-RUNBOOK.md]— USB validation scripts
3.3 Historical Plans (legacy-obsolete-2026-07-25/)
| Doc | Status |
|---|---|
[REF: local/docs/legacy-obsolete-2026-07-25/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md] |
Active authority (despite folder name) — PCI interrupt, MSI/MSI-X, IOMMU. Mirror copy also at local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md for path-fork stability. |
[REF: local/docs/legacy-obsolete-2026-07-25/NETWORKING-STACK-STATE.md] |
Snapshot; superseded by NETWORKING-IMPROVEMENT-PLAN.md |
[REF: local/docs/legacy-obsolete-2026-07-25/BUILD-SYSTEM-ASSESSMENT-2026-07-18.md] |
Build-system scope (out of this doc) |
3.4 Archived Plans (local/docs/archived/)
Correctly placed historical archives. Do NOT cite as authoritative:
DRIVER-MANAGER-MIGRATION-PLAN.md, USB-BOOT-INPUT-PLAN.md, XHCID-DEVICE-IMPROVEMENT-PLAN.md, USB-VALIDATION-RUNBOOK-2026-07.md, RELIBC-IPC-ASSESSMENT-AND-IMPROVEMENT-PLAN.md, IMPLEMENTATION-MASTER-PLAN.md, SYSTEM-STABILITY-AND-UPSTREAM-SYNC-PLAN.md, UPSTREAM-SYNC-PROCEDURE.md, INTEL-HDA-IMPLEMENTATION-PLAN.md, ACPI-I2C-HID-IMPLEMENTATION-PLAN.md, SLEEP-IMPLEMENTATION-PLAN.md, KERNEL-SCHEDULER-MULTITHREAD-IMPROVEMENT-PLAN.md, IMPROVEMENT-PLAN.md, STUBS-FIX-PROGRESS.md, BUILD-SYSTEM-IMPROVEMENTS.md, repo-governance.md.
3.5 Build-System & Policy Docs (AGENTS.md family)
[REF: AGENTS.md]— linux-kpi scope (line 906), subsystem execution order (line 985-1009).[REF: local/AGENTS.md]— Wi-Fi validation scripts (line 1249-1262), linux-kpi scope (line 1222).[REF: recipes/AGENTS.md]— no network-specific content.
3.6 Document Freshness
All 13 networking docs reviewed. All current except NETWORKING-IMPROVEMENT-PLAN.md which needs cross-ref updates (§11.5).
4. Component Inventory & Maturity Matrix
4.1 Wired Network Core
| Component | Path | Maturity | Tests |
|---|---|---|---|
| netstack main + schemes (tcp/udp/icmp/ip/netcfg/netfilter/tun) | local/sources/base/netstack/src/ |
qemu-proven | n/a |
| netstack link layer (ethernet/loopback/vlan/vxlan/gre/ipip/bridge/bond/stp/tun/qdisc) | local/sources/base/netstack/src/link/ |
qemu-proven (ethernet, loopback); experimental (rest) | n/a |
| netstack filter (netfilter + conntrack + NAT) | local/sources/base/netstack/src/filter/ |
qemu-proven | 31 |
| netstack router | local/sources/base/netstack/src/router/ |
qemu-proven | n/a |
4.2 Wired NIC Drivers
| Component | Path | Maturity | Notes |
|---|---|---|---|
| driver-network (shared lib) | local/sources/base/drivers/net/driver-network/ |
builds | Shared traits |
| e1000d | local/sources/base/drivers/net/e1000d/ |
qemu-proven (QEMU -device e1000) |
MSI migration patch active |
| rtl8139d | local/sources/base/drivers/net/rtl8139d/ |
qemu-proven (QEMU -device rtl8139) |
Legacy 10/100 |
| rtl8168d | local/sources/base/drivers/net/rtl8168d/ |
experimental | No QEMU model |
| ixgbed | local/sources/base/drivers/net/ixgbed/ |
experimental | 10GbE; needs HW |
| virtio-netd | local/sources/base/drivers/net/virtio-netd/ |
qemu-proven | MSI-X proven |
4.3 Wireless Stack
| Component | Path | Maturity | Tests |
|---|---|---|---|
| linux-kpi C headers (47 files: asm/, drm/, linux/, net/) | local/recipes/drivers/linux-kpi/source/src/c_headers/ |
builds + host-tested | 93 |
| linux-kpi Rust impl (19 modules: pci/irq/dma/mac80211/wireless/etc.) | local/recipes/drivers/linux-kpi/source/src/rust_impl/ |
builds + host-tested | included |
| linux-kpi scope | GPU + Wi-Fi only — NOT USB, NOT input | per local/AGENTS.md:1222 |
n/a |
| redbear-iwlwifi C transport (2,715 LOC) | local/recipes/drivers/redbear-iwlwifi/source/src/linux_port.c |
builds + host-tested | 8 |
| redbear-iwlwifi MVM layer | local/recipes/drivers/redbear-iwlwifi/source/src/linux_mvm.{c,h} |
builds + host-tested | included |
| redbear-iwlwifi MLD layer (C + Rust modules) | local/recipes/drivers/redbear-iwlwifi/source/src/linux_mld.{c,h} + mld/*.rs |
builds + host-tested | included |
| redbear-iwlwifi bridge modules | local/recipes/drivers/redbear-iwlwifi/source/src/bridge/*.rs |
builds + host-tested | included |
| redbear-iwlwifi v5.2 channel-contract fix | main.rs |
applied 2026-07-26 | n/a |
| redbear-wifictl main.rs (480 LOC) | local/recipes/system/redbear-wifictl/source/src/main.rs |
builds + host-tested | 20 |
| redbear-wifictl backend.rs (1,440 LOC) | local/recipes/system/redbear-wifictl/source/src/backend.rs |
builds + host-tested | included |
| redbear-wifictl scheme.rs (807 LOC, scheme:wifictl) | local/recipes/system/redbear-wifictl/source/src/scheme.rs |
builds + host-tested | included |
| redbear-firmware-iwlwifi | local/recipes/system/redbear-firmware-iwlwifi/ |
recipe-only (downloads at build) | n/a |
4.4 Bluetooth Stack
| Component | Path | Maturity | Tests |
|---|---|---|---|
| redbear-btusb main.rs | local/recipes/drivers/redbear-btusb/source/src/main.rs |
builds + host-tested | 151 |
| redbear-btusb hci.rs (1,900 LOC) | local/recipes/drivers/redbear-btusb/source/src/hci.rs |
builds + host-tested | included |
| redbear-btusb scheme.rs (scheme:hciN) | local/recipes/drivers/redbear-btusb/source/src/scheme.rs |
builds + host-tested | included |
| redbear-btctl main.rs | local/recipes/system/redbear-btctl/source/src/main.rs |
builds + host-tested | 56 |
| redbear-btctl hci_backend.rs (GATT workflow) | local/recipes/system/redbear-btctl/source/src/hci_backend.rs |
builds + host-tested | included |
| redbear-btctl bond_store.rs | local/recipes/system/redbear-btctl/source/src/bond_store.rs |
builds + host-tested | included |
| redbear-firmware-bluetooth | local/recipes/system/redbear-firmware-bluetooth/ |
recipe-only | n/a |
4.5 USB Subsystem
| Component | Path | Maturity |
|---|---|---|
| xhcid | local/sources/base/drivers/usb/xhcid/ |
qemu-proven (hub + hub-child + storage BOT) |
| ehcid | recipes/drivers/ehcid/ + local/recipes/drivers/ehcid/ |
builds |
| uhcid | recipes/drivers/uhcid/ + local/recipes/drivers/uhcid/ |
builds (bulk/interrupt 2026-07-08) |
| ohcid | recipes/drivers/ohcid/ + local/recipes/drivers/ohcid/ |
builds |
| usb-core | recipes/drivers/usb-core/ + local/recipes/drivers/usb-core/ |
builds |
| usbhubd | local/sources/base/drivers/usb/usbhubd/ |
qemu-proven |
| usbscsid | local/sources/base/drivers/storage/usbscsid/ |
qemu-proven (BOT); UAS in flight |
| usbhidd | local/sources/base/drivers/input/usbhidd/ |
qemu-proven |
| usbctl | recipes/drivers/usb/usbctl/ |
experimental (marked TODO) |
| redbear-acmd (CDC ACM) | local/recipes/system/redbear-acmd/ |
builds |
| redbear-ecmd (CDC ECM — LG Gram path) | local/recipes/system/redbear-ecmd/ |
builds |
| redbear-usbaudiod | recipes/system/redbear-usbaudiod/ |
builds |
| redbear-usb-hotplugd | local/recipes/system/redbear-usb-hotplugd/ |
builds |
4.6 PCI / ACPI / IOMMU Substrate
| Component | Path | Maturity |
|---|---|---|
| pcid | recipes/drivers/pcid/ |
qemu-proven |
| pcid-spawner | recipes/drivers/pcid-spawner/ |
retired 2026-07-24 |
| redox-driver-pci | local/recipes/drivers/redox-driver-pci/ |
builds |
| redox-driver-sys (incl. quirks) | local/recipes/drivers/redox-driver-sys/ |
builds + host-tested + qemu-proven (via xhcid) |
| acpid | recipes/drivers/acpid/ |
qemu-proven + AMD64 bare-metal |
| redox-driver-acpi | local/recipes/drivers/redox-driver-acpi/ |
builds |
| redox-driver-core | local/recipes/drivers/redox-driver-core/ |
builds |
| amlserde | recipes/drivers/amlserde/ |
builds |
| hwd (legacy) | recipes/drivers/hwd/ |
qemu-proven (phasing out) |
| iommu (AMD-Vi) | recipes/system/iommu/ |
qemu-proven (first-use self-test) |
4.7 Graphics / GPU
| Component | Path | Maturity |
|---|---|---|
| redox-drm (AMD/Intel/virtio) | local/recipes/gpu/redox-drm/ |
builds + qemu-proven (virtio-gpu auto-probe) |
| amdgpu glue | local/recipes/gpu/amdgpu/ |
builds (glue compiles; full DC path not yet wired) |
| displayd | recipes/system/displayd/ |
builds (skeleton) |
| vesad | recipes/drivers/graphics/vesad/ |
qemu-proven |
| fbcond / fbbootlogd | recipes/drivers/graphics/{fbcond,fbbootlogd}/ |
qemu-proven |
4.8 Audio
| Component | Path | Maturity |
|---|---|---|
| ac97d / ihdad / sb16d | recipes/drivers/audio/ |
builds |
| audiodevd | recipes/system/audiodevd/ |
missing (recipe skeleton only) |
| redbear-usbaudiod | recipes/system/redbear-usbaudiod/ |
builds |
4.9 Storage
| Component | Path | Maturity |
|---|---|---|
| ahcid | recipes/drivers/storage/ahcid/ |
qemu-proven |
| ided / nvmed / virtio-blkd / lived / usbscsid | recipes/drivers/storage/, local/sources/base/drivers/storage/ |
qemu-proven |
| diskd | recipes/system/diskd/ |
qemu-proven |
| ext4d | local/recipes/core/ext4d/ |
builds |
| fatd | local/recipes/core/fatd/ |
builds + host-tested (60 tests) |
| redoxfs | recipes/core/redoxfs/ |
qemu-proven |
| bcm2835-sdhcid | recipes/drivers/storage/bcm2835-sdhcid/ |
builds (RPi-only) |
4.10 Input / HID
| Component | Path | Maturity |
|---|---|---|
| inputd / ps2d / usbhidd / evdevd | recipes/drivers/, local/sources/base/drivers/input/ |
qemu-proven |
| redbear-hid-core | local/recipes/drivers/redbear-hid-core/ |
builds + host-tested |
| redbear-input-headers | local/recipes/drivers/redbear-input-headers/ |
builds |
| virtio-inputd | recipes/drivers/virtio-inputd/ |
qemu-proven |
4.11 System Daemons
| Daemon | Path | Maturity |
|---|---|---|
| devfsd / driver-manager / dbus | recipes/system/ |
qemu-proven |
| driver-params / iommu / numad / rtcd / seatd / thermald / udev-shim | recipes/system/, recipes/drivers/rtcd/ |
builds (iommu/rtcd qemu-proven) |
| coretempd / cpufreqd / hwrngd | recipes/system/ |
builds |
| usbd | recipes/system/usbd/ |
missing (skeleton only) |
| netd | recipes/system/netd/ |
missing (ghost recipe, no source) |
| redbear-power (TUI, Intel MSR) | local/recipes/system/redbear-power/ |
builds |
4.12 Session & Desktop Services
| Daemon | Path | Maturity |
|---|---|---|
| redbear-authd / -sessiond / -greeter | local/recipes/system/ |
builds + qemu-proven |
| redbear-session-launch / -polkit / -upower / -udisks / -notifications / -statusnotifierwatcher | local/recipes/system/ |
builds |
local/recipes/system/redbear-wayland-guard/ |
REMOVED 2026-07-27 — LD_PRELOAD stub violation of zero-stub policy. The proper null guards belong in libwayland upstream (see QT6-WAYLAND-NULL8-DIAGNOSIS.md). |
|
| redbear-accessibility / -ime / -passwd / -keymapd / -ftdi / -login-protocol / -acmd / -ecmd / -info | local/recipes/system/ |
builds |
4.13 Network Daemons & Utils
| Daemon / Util | Path | Maturity | Notes |
|---|---|---|---|
| redbear-netctl (CLI, 1086 LOC) | local/recipes/system/redbear-netctl/ |
builds + qemu-proven | |
| redbear-netctl-console (TUI) | local/recipes/system/redbear-netctl-console/ |
builds + qemu-proven | ncurses |
| redbear-netstat | local/recipes/system/redbear-netstat/ |
builds + qemu-proven | TCP/UDP table NOT implemented |
| redbear-traceroute | local/recipes/system/redbear-traceroute/ |
builds + qemu-proven | UDP-based |
| redbear-nmap | local/recipes/system/redbear-nmap/ |
builds + qemu-proven | TCP connect only |
| redbear-mtr | local/recipes/system/redbear-mtr/ |
builds + qemu-proven | depends on redbear-traceroute |
| redbear-dnsd | local/recipes/system/redbear-dnsd/ |
builds but NOT wired into any config | 252 LOC main.rs |
| openssh | recipes/net/openssh/ |
builds (with IPv4-only sed workaround) |
3 TODO markers |
| redox-ssh / nginx / rsync / curl / wget / simple-http-server | recipes/net/ |
builds | upstream |
4.14 Firmware & Quirks
| Component | Path | Maturity |
|---|---|---|
| firmware-loader | recipes/system/firmware-loader/ + local/recipes/system/firmware-loader/ |
builds + qemu-proven |
| redbear-firmware (umbrella) | local/recipes/system/redbear-firmware/ |
builds |
| redbear-firmware-{amdgpu,intel,iwlwifi,bluetooth} | local/recipes/system/redbear-firmware-*/ |
recipe skeleton only |
| redox-driver-sys quirks (~85-entry tables: pci/usb/xhci/dmi/toml_loader) | local/recipes/drivers/redox-driver-sys/source/src/quirks/ |
builds + host-tested |
4.15 relibc / libredox / syscall Network Surface
| Component | Path | Maturity |
|---|---|---|
| relibc POSIX socket | local/sources/relibc/src/platform/redox/socket.rs (1,236 LOC) |
builds + qemu-proven |
| relibc socket header / constants | local/sources/relibc/src/header/sys_socket/ (443+221 LOC) |
builds + qemu-proven |
| libredox SocketCall (10 variants) | local/sources/libredox/src/lib.rs:909-980 |
builds |
| kernel SchemeSocketCall (2 variants) | local/sources/syscall/src/flag.rs:383-395 |
builds |
| kernel scheme dispatch | local/sources/kernel/src/scheme/{mod,user}.rs |
builds + qemu-proven |
4.16 Virtio Paravirt Drivers
| Component | Path | Maturity |
|---|---|---|
| virtio-core / virtio-inputd / virtio-blkd / virtio-netd | recipes/drivers/ + local/sources/base/drivers/net/virtio-netd/ |
qemu-proven |
| virtio-gpud (legacy) | recipes/drivers/graphics/virtio-gpud/ |
builds (superseded by redox-drm virtio) |
5. Completeness Assessment
5.1 Implemented & Functional (QEMU-proven)
IPv4/IPv6 TCP/UDP/ICMP · TCP_CUBIC · socket options (most) · Raw IP · Loopback · ARP/NDP/SLAAC · Default + multi-iface routing · Netfilter (5 hooks, conntrack, NAT) · IP forwarding · TUN · Packet capture · DHCPv4 (one-shot) · Interface/route config · DNS resolver + caching + mDNS · POSIX sockets (~80-85%) · pcid (MSI/MSI-X) · acpid (RSDP/SDT/MADT/FADT/AML) · IOMMU (AMD-Vi) · driver-manager · USB xHCI (51 quirks, 36 errors, hub enum) · USB BOT/HID · USB class autospawn framework · e1000/rtl8139/virtio-net · iwlwifi (37 PCI IDs) · redbear-wifictl · redbear-btusb (151 tests) · redbear-btctl (56 tests, BLE battery) · devfsd/driver-manager/dbus/redbear-{sessiond,greeter,authd} · redbear-{netctl,netctl-console,netstat,traceroute,nmap,mtr,openssh,curl,wget}.
5.2 Implemented & Compiles (No Runtime Proof)
rtl8168d · ixgbed · VLAN/VXLAN/GRE/Bridge/Bond/STP/IPIP/QoS link modules · Intel HDA (ihdad) · all redbear-firmware recipe skeletons · redbear-wayland-guard (source only; removed 2026-07-27) · audiodevd/usbd/netd (recipe skeletons).
5.3 Partially Implemented (Stubs / TODO)
See §14.2 for full list. 32 TODO/FIXME markers in network code. Highlights:
- netstack event notification (mod.rs:274), port claiming (tcp.rs:101, udp.rs:140), multiple IPs per if (netcfg/mod.rs:581), UDP socket insert workaround (netcfg/mod.rs:595), ICMP caps stub (icmp.rs:205,232).
- relibc TCP SendMsg (socket.rs:1028), MSG_NOSIGNAL (socket.rs:1027), socket option levels (socket.rs:784,1094), nonblock connect error (socket.rs:795).
- ethernet driver-network back pressure (lib.rs:29), scheme event API (lib.rs:88).
- e1000d statistics clear (device.rs:284), rtl8139 TSD_TOK wait (device.rs:206), rtl8139 DMA 32-bit limit (device.rs:224,227).
- virtio-net IRQ vector (main.rs:112), device init ordering (main.rs:136), TX descriptor layout (scheme.rs:74).
- openssh recipe: 3 TODOs (resolver runtime, utmpx.h, host key postscript) + IPv4-only workaround via
sed.
5.4 Missing / Not Started
audiodevd/usbd/netdsourceredbear-firmware-{amdgpu,intel,iwlwifi,bluetooth}sourceusbctl(USB control endpoint)- DHCPv6 client
- Raw Ethernet sockets (AF_PACKET)
- SCTP / DCCP / MPTCP
- IP multicast (IGMP/MLD)
sendmmsg/recvmmsg- SCM_RIGHTS (FD passing)
- Socket timestamping (SO_TIMESTAMP/SO_TIMESTAMPNS)
- Live TCP/UDP socket table in netstat
- DHCP lease renewal/rebind
- Wi-Fi IP datapath bridge (802.11→Ethernet into netstack's
DeviceList) - USB Bluetooth adapter autospawn (redbear-btusb uses explicit startup only)
5.5 Subsystem Completeness Status
| Subsystem | Status | Gap |
|---|---|---|
| Wired TCP/IP | Substantially complete | DHCPv6, raw Ethernet, multicast, SCTP/DCCP/MPTCP |
| Wireless | Software complete; HW validation pending | Wi-Fi IP datapath bridge, WPA3, roaming, offload |
| Bluetooth | Software complete; HW validation pending | A2DP/HFP/AVRCP/HoG, USB autospawn, pairing/SMP |
| USB | xHCI QEMU-proven; EHCI/UHCI/OHCI builds-only | UAS, U1/U2/U3 autosuspend, usbctl |
| Driver Infrastructure | Green | linux-kpi is GPU+Wi-Fi only (intentional) |
| Daemons | Green for core; 6 skeleton/missing | audiodevd, usbd, netd, firmware pkgs, wayland-guard |
| POSIX sockets | ~80-85% | TCP SendMsg, MSG_NOSIGNAL, IP_PKTINFO, IP_MULTICAST |
| Observability | Good basic; advanced gaps | live socket table, BPF/eBPF, prometheus |
6. Errors / Bugs / Issues
6.1 P0 Critical Defects (12)
| ID | Subsystem | File:line | Description |
|---|---|---|---|
| DEF-P0-1 | relibc | local/sources/relibc/src/platform/redox/socket.rs (99 sites) |
Zero # Safety documentation on 99 unsafe blocks. |
| DEF-P0-2 | libredox | local/sources/libredox/src/lib.rs (49 sites) |
Zero # Safety documentation on 49 unsafe blocks. |
| DEF-P0-3 | netstack | local/sources/base/netstack/src/buffer_pool.rs:84-86 |
Unsafe set_len on recycled Vec<u8> — leaks old packet data between unrelated flows. |
| DEF-P0-4 | netstack | local/sources/base/netstack/src/worker_pool.rs:61,65 |
Unsafe File::from_raw_fd without checking dup return — if dup returns -1, creates File from invalid fd (UB). |
| DEF-P0-5 | ethernet | local/sources/base/drivers/net/{e1000d,rtl8139d,rtl8168d}/src/device.rs |
unsafe fn new(base: usize) -> Result<Self> without # Safety docs. |
| DEF-P0-6 | ethernet | e1000d/rtl8139d/rtl8168d src/device.rs |
Missing MMIO register bounds check before volatile read/write. Only ixgbe has it (device.rs:237). |
| DEF-P0-7 | ethernet | rtl8139d/src/main.rs:35, rtl8168d/src/main.rs:35 |
panic!("...: failed to find BAR") — runtime PCI condition panics the entire driver. |
| DEF-P0-8 | libredox | local/sources/libredox/src/lib.rs:43 |
demux() .expect() panics on overflow edge case. |
| DEF-P0-9 | relibc | local/sources/relibc/src/platform/redox/socket.rs:1028 |
TCP SendMsg entirely missing — POSIX programs using sendmsg on TCP silently get ENOSYS. |
| DEF-P0-10 | config | config/redbear-mini.toml (and full) |
redbear-dnsd not wired into any config — daemon built, service file present, but excluded from all redbear-*.toml. |
| DEF-P0-11 | relibc | socket.rs scheme protocol |
Socket option level namespace collision — TCP_MAXSEG(2), IP_TTL(2), SO_REUSEADDR(2) all share option number 2. POSIX separates by level. |
| DEF-P0-12 | docs | local/docs/NETWORKING-IMPROVEMENT-PLAN.md:803 |
References non-existent file local/docs/networking-validation-log.md. |
6.2 P1 High-Severity Defects (23)
| ID | File:line | Description |
|---|---|---|
| DEF-P1-1 | socket.rs:1027 |
MSG_NOSIGNAL not implemented |
| DEF-P1-2 | socket.rs:599,689 |
FIXME clippy suggestion fails to compile |
| DEF-P1-3 | socket.rs:824 |
todo_skip returns ENOSYS for IP-level getsockopt |
| DEF-P1-4 | netstack/src/scheme/mod.rs:274 |
Event notification reliability TODO |
| DEF-P1-5 | netstack/src/scheme/tcp.rs:101 + udp.rs:140 |
Port claiming without IP awareness |
| DEF-P1-6 | netstack/src/scheme/netcfg/mod.rs:581 |
Multiple IPs per interface TODO |
| DEF-P1-7 | netstack/src/scheme/netcfg/mod.rs:595 |
UDP socket insert FIXME |
| DEF-P1-8 | netstack/src/scheme/icmp.rs:205,232 |
ICMP capabilities stub |
| DEF-P1-9 | netstack/src/link/ethernet.rs:179,281,318,327,352,387,397 |
Silent packet discard on TX errors |
| DEF-P1-10 | netstack/src/router/mod.rs:144,166,325,332 |
Silent router enqueue failures |
| DEF-P1-11 | netstack/src/scheme/mod.rs:520,544,609,626,635,644 |
Silent scheme response write failures |
| DEF-P1-12 | driver-network/src/lib.rs:29 |
No back pressure on scheme writes |
| DEF-P1-13 | driver-network/src/lib.rs:88 |
Scheme event API design gap |
| DEF-P1-14 | e1000d/src/device.rs:284 |
Statistics never cleared |
| DEF-P1-15 | rtl8139d/src/device.rs:206 |
No wait for TSD_TOK or error |
| DEF-P1-16 | virtio-netd/src/main.rs:112 |
IRQ vector assignment undecided |
| DEF-P1-17 | virtio-netd/src/main.rs:136 |
Device init ordering TODO |
| DEF-P1-18 | All 5 ethernet drivers | No memory barriers between DMA desc writes and doorbell writes |
| DEF-P1-19 | redbear-traceroute/source/src/lib.rs:154-214 |
Traceroute uses raw libc syscalls (bypasses relibc) |
| DEF-P1-20 | redbear-netctl/source/src/main.rs:782,857,916,985,1026,1051 |
Unsafe chmod equivalent using libc |
| DEF-P1-21 | redbear-dnsd/source/src/transport.rs:47 |
Unsafe FD handling without docs |
| DEF-P1-22 | recipes/net/openssh/recipe.toml |
3 TODOs + IPv4-only sed workaround |
| DEF-P1-23 | All drivers | Shared-IRQ re-arm bug class (swept 2026-07-20, HW validation open) |
6.3 P2 Medium-Severity Defects (15)
DEF-P2-1 logger init stderr-only (netstack/src/logger.rs:4) · DEF-P2-2 test-only FAKE Mutex in production (netstack/src/worker_pool.rs:170-186) · DEF-P2-3 85 integer truncation casts · DEF-P2-4 67 trait methods returning bool instead of Result · DEF-P2-5 157 integer casts in drivers · DEF-P2-6 ixgbed uses println! (ixgbed/src/main.rs:29) · DEF-P2-7 unwrap() on as_c_fd() (socket.rs:1055,1090) · DEF-P2-8 silent error swallow (socket.rs:85,572) · DEF-P2-9 single read/write without partial handling · DEF-P2-10 Drop ignores close failures (libredox:503) · DEF-P2-11 daemon init path unwrap/expect (redbear-netctl 61, redbear-wifictl 65, redbear-dnsd 11, redbear-usbaudiod 1) · DEF-P2-12 daemon unsafe blocks without docs (43 total) · DEF-P2-13 no logging in daemons · DEF-P2-14 ~80 unsafe FFI without docs in redox-driver-sys · DEF-P2-15 no clang static analysis in linux-kpi C headers.
6.4 P3 Low-Severity Defects (7)
DEF-P3-1 TODO const fn (netcfg/mod.rs:35) · DEF-P3-2 poll return underused (scheme/mod.rs:333) · DEF-P3-3 CheckVsLibcCrate FIXME (sys_socket/mod.rs:91) · DEF-P3-4 XXX TX descriptor layout note (virtio-netd/scheme.rs:74) · DEF-P3-5 unspecified TODO (e1000d/device.rs:359) · DEF-P3-6 unspecified TODO (netstack/scheme/socket.rs:469,498) · DEF-P3-7 stale route cleanup TODO (netstack/router/mod.rs:364).
6.5 Per-Subsystem Defect Grouping
6.6 Wired network: DEF-P0-3,4,11,12; DEF-P1-1,2,4-11; DEF-P2-1,2,3,4; DEF-P3-1,2,6,7. 6.7 Wireless/iwlwifi: none P0; v5.2 channel-contract fix already applied. 6.8 Bluetooth/btusb: none P0/P1; HW validation gap in §8.1. 6.9 PCI/IRQ/MSI-X: DEF-P1-23. 6.10 ACPI/AML: none P0. 6.11 GPU/DRM: none P0. 6.12 Audio/HDA: none P0. 6.13 Storage: none P0. 6.14 Input/HID: none P0. 6.15 USB: none P0. 6.16 Daemon: DEF-P0-10, DEF-P1-19,20,21,22. 6.17 Build: none P0. 6.18 Linker: none P0. 6.19 Race: DEF-P1-18. 6.20 Resource/Lifetime: DEF-P0-3,4; DEF-P2-10.
7. Gaps (Feature Gaps)
7.1 Core Protocols: TCP SACK (smoltcp), TCP ECN (smoltcp), IP frag offload, hw checksum offload, IP multicast (IGMPv3/MLDv2), IPsec/VPN.
7.2 Configuration: DHCPv6 (dhcpd is v4-only), DHCP lease renewal/rebind (one-shot), DHCPv6 prefix delegation, IPv6 SLAAC (code present, not proven), static IPv6 (partial), policy routing, multipath routing.
7.3 Wireless: WPA3-SAE (only WPA2-PSK), roaming, 802.11ax/OFDMA/MU-MIMO (partial in iwlwifi), 802.11be/MLO (partial EHT), hardware offload, multi-queue/Airtime Fairness, P2P/Wi-Fi Direct/NAN.
7.4 Bluetooth: A2DP/HFP/AVRCP/HID-over-GATT/PAN audio/headset/input profiles, SMP pairing, Classic BR/EDR (BLE-only), multiple simultaneous connections.
7.5 Driver API (linux-kpi scope = GPU+Wi-Fi only): Missing all USB headers, all input headers, most network device headers, most block device headers, most filesystem headers.
7.6 POSIX API: sendmmsg/recvmmsg, SCM_RIGHTS, SO_TIMESTAMP/NS, IP_PKTINFO/IP_RECVDSTADDR, IP_MULTICAST_*, SO_REUSEPORT (defined, not implemented), TCP Fast Open, netlink sockets, AF_PACKET.
7.7 Daemon Features: redbear-sessiond login1 subset (KWin-focused), redbear-polkit (untested with polkit-aware clients), redbear-passwd shadow format, redbear-notifications / -statusnotifierwatcher (completeness vs freedesktop unknown), audiodevd/usbd entirely missing.
7.8 Observability: Live TCP/UDP socket table (netstat gap), BPF/eBPF, Prometheus metrics, strace-equivalent for userspace schemes, tcpdump wire format (observer only).
7.9 Configuration: netctl profile encryption (plaintext Wi-Fi passwords), netd missing, usbd missing, redbear-driver-policy runtime validation pending.
7.10 Hardware (per HARDWARE-VALIDATION-MATRIX): Physical Intel e1000/e1000e (no bench has), Realtek RTL8168/8169 (none), Intel 10GbE X520/X540/X550 (none), Intel Wi-Fi (only LG Gram BE201), USB Bluetooth (none), EHCI/UHCI/OHCI (none), Intel HDA on LG Gram (cAVS/DSP, needs SOF port).
7.11 Test & Validation: No Intel Wi-Fi bare-metal (W4 blocked), no Bluetooth bare-metal (B7 blocked), no USB CDC ECM on real dongle, no bare-metal Ethernet, no bare-metal EHCI/UHCI/OHCI.
7.12 Documentation: NETWORKING-IMPROVEMENT-PLAN.md missing cross-refs to HARDWARE-NETWORKING-INVENTORY.md / HARDWARE-VALIDATION-MATRIX.md / FIREWALL-VALIDATION-LOG.md; references non-existent networking-validation-log.md (line 803); this doc fills the networking-bugs gap.
8. Blockers
8.1 Hardware Access
| Blocker | Impact | Action |
|---|---|---|
| No Intel Wi-Fi NIC | W4 blocked | Acquire AX210/AX211/AX201 or use LG Gram BE201 |
| No Bluetooth hardware | B7 blocked | Acquire USB Bluetooth adapter (~$10) |
| No USB-C Ethernet dongle | LG Gram bare-metal net blocked | Acquire CDC ECM dongle (~$15) |
| Threadripper NIC inventory uncollected | e1000/Realtek bare-metal blocked | Operator: lspci -nn | grep -i ethernet |
| No physical EHCI/UHCI/OHCI | Legacy USB blocked | Identify machine with such controller |
| No physical 10GbE | ixgbed blocked | Identify machine with X520/X540/X550 |
| LG Gram audio is cAVS/DSP | Legacy HDA blocked | Port SOF driver or use QEMU Intel HDA |
8.2 Other Blockers
- Kernel/syscall: Shared-IRQ re-arm class (swept 2026-07-20 but HW-unvalidated); MSI/MSI-X delivery (code-complete, HW-unvalidated).
- IRQ delivery (per IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN): Bare-metal validation of interrupt delivery quality still open.
- IOMMU: QEMU first-use passes; bare-metal AMD-Vi validation TBD; VFIO framework exists for Wi-Fi but no emulated Wi-Fi in QEMU.
- POSIX/relibc: TCP SendMsg missing, MSG_NOSIGNAL missing, SCM_RIGHTS missing.
- Firmware: redbear-firmware-{amdgpu,intel,iwlwifi,bluetooth} are recipe skeletons; AMD/Intel GPU blobs need their own download recipes; iwlwifi dual-format TLV validated only with HW.
8.3 Blocker Dependency Graph
Threadripper NIC inventory → e1000/Realtek bare-metal → Netfilter/NAT bare-metal → production wired net
LG Gram + USB-C dongle → CDC ECM validation → LG Gram bare-metal net → Wi-Fi (BE201) → W4 complete
USB BT adapter → btusb bare-metal → btctl bare-metal → B7 complete
8.4 Sequencing vs AGENTS.md Subsystem Priority
Per [REF: AGENTS.md § SUBSYSTEM PRIORITY AND ORDER]:
- Low-level controllers / IRQ quality / runtime-proof — IN PROGRESS
- USB controller and topology maturity — IN PROGRESS (xHCI QEMU-proven; EHCI/UHCI/OHCI builds-only)
- Wi-Fi native control-plane and one bounded driver path — SOFTWARE COMPLETE (HW validation pending)
- Bluetooth host/controller path — SOFTWARE COMPLETE (HW validation pending)
- Desktop/session compatibility layers — OUT OF SCOPE for this doc
9. Bad Practices
9.1 unwrap() / expect() (501 instances)
| Surface | Count |
|---|---|
| netstack | 48 (27 unwrap + 21 expect) |
| ethernet drivers | 45 (23 + 22) |
| relibc socket.rs | 8 (1 + 7) |
| libredox | 1 |
| redbear-netctl | 67 (61 + 6) |
| redbear-btctl (mostly tests) | ~227 |
| redbear-wifictl | 75 (65 + 10) |
| redbear-netctl-console | 19 |
| redbear-dnsd | 11 |
| redbear-usbaudiod | 10 |
| redbear-traceroute | 1 |
| redbear-netstat (tests) | 5 |
| Total | ~501 |
Action: Replace runtime-failable unwrap()/expect() with ? propagation or anyhow::Context. Test-code unwraps LOW severity.
9.2 unsafe Blocks Without Safety Docs (~250 instances, 0 docs)
| File | Unsafe blocks |
|---|---|
local/sources/relibc/src/platform/redox/socket.rs |
99 |
local/sources/libredox/src/lib.rs |
49 |
ethernet drivers (local/sources/base/drivers/net/) |
52 |
local/recipes/drivers/redox-driver-sys/source/src/ |
~80 |
| netstack | 7 |
| redbear-netctl / wifictl / netctl-console / btctl / dnsd / traceroute | 4 / 10 / 14 / 2 / 5 / 8 |
| Total | ~330 (incl. ~80 in driver-sys) |
Action: Add # Safety doc comment to EVERY unsafe fn and unsafe block. Estimated effort: 2-3 days mechanical + review.
9.3 TODO / FIXME / XXX (32 markers)
13 netstack · 11 ethernet drivers · 7 relibc socket.rs · 1 relibc sys_socket. See §5.3 / §14.2 for full list.
9.4 Silent Error Swallowing (55 instances)
netstack 35 (let _ = / if let Err(_) =) · ethernet 6 · relibc 2 · libredox 1 · daemons ~11.
Action: Replace let _ = ... with log::warn! or propagate.
9.5 Error Strategy Fragmentation (5 concurrent)
- Custom
Errorenum (netstackerror.rs) anyhow::Context+anyhow::Result(netstack mixed)SyscallErrordirectly (netstack scheme handlers)Errno(relibcsocket.rs)libredox::Error(libredox, all daemons)Stringerror messages (daemons)
Action: Create shared redbear-net-error crate with unified error enum.
9.6 Async Strategy Fragmentation (3 concurrent)
- Polling (netstack — smoltcp
poll()) - Tokio (redbear-wifictl via zbus feature)
- Synchronous blocking (all other daemons)
Action: Document async architecture; avoid mixing tokio with blocking I/O in same process.
9.7 Top Offenders by File
| File | unwrap/expect | unsafe | TODO/FIXME |
|---|---|---|---|
redbear-btctl/source/src/* |
227 | 2 | 0 |
relibc/src/platform/redox/socket.rs |
8 | 99 | 7 |
redbear-wifictl/source/src/* |
75 | 10 | 0 |
redbear-netctl/source/src/main.rs |
67 | 4 | 0 |
libredox/src/lib.rs |
1 | 49 | 0 |
local/sources/base/drivers/net/{5 drivers}/src/*.rs |
45 | 52 | 11 |
local/sources/base/netstack/src/*.rs |
48 | 7 | 13 |
10. Cross-Cutting Concerns
10.1 Logging: log crate used in netstack + ethernet drivers but NOT in daemons. Action: standardize on log crate in all networking daemons.
10.2 Error handling: see §9.5 — 5 strategies coexist.
10.3 Async/concurrency: see §9.6 — 3 patterns coexist.
10.4 Unsafe safety documentation: ZERO # Safety on ~250 unsafe blocks. Action: add per Rust API Guidelines.
10.5 IPC credentials: Per [REF: local/docs/KERNEL-IPC-CREDENTIAL-PLAN.md], credentials patch active (local/patches/relibc/P3-socket-cred.patch). SO_PEERCRED defined, may not be fully forwarded to netstack scheme. Action: verify end-to-end.
10.6 Memory safety & DMA: set_len on recycled Vec (DEF-P0-3); no memory barriers (DEF-P1-18); Drop ignores close failures (DEF-P2-10).
10.7 Firmware loading: Two layouts supported (/lib/firmware/iwlwifi-*.ucode and /lib/firmware/intel/iwlwifi/iwlwifi-*.ucode via path-map). Downloads at build, cached at build/redbear-firmware-cache/.
10.8 Quirk tables: ~85-entry PCI quirk, ~85-entry xHCI, USB, DMI, TOML loader. Action: document format + add-entry procedure.
10.9 Testing: Host unit tests for linux-kpi (93), iwlwifi (8), redbear-wifictl (20), redbear-btusb (151), redbear-btctl (56), fatd (60), netstack filter (31). QEMU tests in local/scripts/ per USB-VALIDATION-RUNBOOK.md. Bare-metal: operator-reported via HARDWARE-VALIDATION-MATRIX.md. Gap: no CI gate runs host unit tests on every PR.
10.10 Code reuse: 5 ethernet drivers share driver-network; 4 USB host controllers share usb-core; linux-kpi shared iwlwifi + amdgpu. Gap: some BAR lookup / IRQ registration boilerplate duplicated — could factor into driver-network.
10.11 Build invariants: Per [REF: AGENTS.md], ALWAYS use build-redbear.sh; stale prefix detection active; source-fingerprint tracking active; branch topology gate active.
11. Stale Document Audit
11.1 Cleanup History
| Date | Action | Source |
|---|---|---|
| 2026-05-03 | First batch → local/docs/archived/ |
archived/README.md |
| 2026-07-18 | Second batch (release-bump cleanup) | archived/README.md |
| 2026-07-25 | Round-5 → legacy-obsolete-2026-07-25/ |
SUPERSEDED.md |
| 2026-07-26 | Round-5 (SYSTEM-STABILITY) | archived/README.md |
| 2026-07-27 | PCI-spawner + driver-manager consolidations | archived/README.md |
Conclusion: Zero genuinely stale docs need to be moved. Previous rounds thoroughly cleaned the doc landscape.
11.2 The 13 Networking Docs
| Document | Classification | Lines | Action |
|---|---|---|---|
NETWORKING-IMPROVEMENT-PLAN.md |
CANONICAL | 1,063 | Update cross-refs (§11.3) |
HARDWARE-NETWORKING-INVENTORY.md |
CANONICAL | 273 | Keep current |
WIFI-IMPLEMENTATION-PLAN.md |
CANONICAL | 307 | Keep current |
BLUETOOTH-IMPLEMENTATION-PLAN.md |
CANONICAL | 703 | Keep current |
USB-IMPLEMENTATION-PLAN.md |
CANONICAL | 898 | Keep current |
USB-VALIDATION-RUNBOOK.md |
CANONICAL | 155 | Keep current |
FIREWALL-VALIDATION-LOG.md |
CANONICAL | 422 | Keep current |
HARDWARE-VALIDATION-MATRIX.md |
CANONICAL | 101 | Keep current |
legacy-obsolete-2026-07-25/NETWORKING-STACK-STATE.md |
STALE | 120 | Already in legacy (Round 5 cleanup) |
legacy-obsolete-2026-07-25/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md (mirror at local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md) |
STALE-but-ACTIVE | 1,022 | Active authority for IRQ/MSI-X/IOMMU; mirror at canonical path for path-fork stability (per AGENTS.md dual-location pattern). Both files identical (46980 bytes). |
docs/01-REDOX-ARCHITECTURE.md |
REFERENCE | 284 | Keep as reference |
docs/04-LINUX-DRIVER-COMPAT.md |
REFERENCE | 554 | Keep as reference (Wi-Fi note current) |
docs/07-RED-BEAR-OS-IMPLEMENTATION-PLAN.md |
CANONICAL | 463 | Keep current |
11.3 Drift Detected (Cross-Reference Gaps)
NETWORKING-IMPROVEMENT-PLAN.mddoes not back-referenceHARDWARE-NETWORKING-INVENTORY.md,HARDWARE-VALIDATION-MATRIX.md,FIREWALL-VALIDATION-LOG.md. Priority: HIGH.NETWORKING-IMPROVEMENT-PLAN.md:803references non-existentlocal/docs/networking-validation-log.md. Priority: MEDIUM.
11.4 Archive Actions
None required. All previously-stale docs are correctly placed in archived/ or legacy-obsolete-2026-07-25/.
11.5 Reconciliation
This document is consistent with all canonical sub-plans. The drift identified in §11.3 should be fixed by the canonical-plan owners.
12. Fix/Improvement Roadmap
12.1 P0 — Correctness & Safety (Immediate, 1-2 weeks)
| ID | Action | Source | Effort |
|---|---|---|---|
| P0-1 | # Safety on all 99 unsafe blocks in relibc/src/platform/redox/socket.rs |
DEF-P0-1 | 1-2 days |
| P0-2 | # Safety on all 49 unsafe blocks in libredox/src/lib.rs |
DEF-P0-2 | 1 day |
| P0-3 | MMIO register bounds checks in e1000d/rtl8139d/rtl8168d (copy ixgbe pattern) | DEF-P0-6 | 1 day |
| P0-4 | Replace panic! on failed BAR lookup in rtl8139d/rtl8168d main.rs:35 |
DEF-P0-7 | 1 hour |
| P0-5 | # Safety on all 52 unsafe blocks in ethernet drivers |
DEF-P0-5 | 1 day |
| P0-6 | Wire redbear-dnsd into redbear-mini.toml |
DEF-P0-10 | 1 hour |
| P0-7 | Acquire USB-C Ethernet dongle for LG Gram | §8.1 | logistics |
| P0-8 | Collect Threadripper NIC inventory | §8.1 | logistics |
| P0-9 | Pass level through SocketCall protocol |
DEF-P0-11 | 3-5 days |
| P0-10 | Add cross-refs to NETWORKING-IMPROVEMENT-PLAN.md (3 missing docs + line 803 fix) |
§11.3 | 1 hour |
12.2 P1 — Completeness & Validation (Near-Term, 4-6 weeks)
| ID | Action | Source | Effort |
|---|---|---|---|
| P1-1 | TCP SendMsg in relibc |
DEF-P0-9 | 3-5 days |
| P1-2 | MSG_NOSIGNAL in relibc |
DEF-P1-1 | 1-2 days |
| P1-3 | DHCP lease renewal/rebind in dhcpd | §5.5 | 3-5 days |
| P1-4 | Wi-Fi IP datapath bridge (802.11→Ethernet into netstack's DeviceList) |
§5.6 | 1-2 weeks |
| P1-5 | Memory barriers (fence) between DMA desc writes and doorbell writes in 5 drivers | DEF-P1-18 | 2-3 days |
| P1-6 | # Safety on all 52 unsafe blocks in ethernet drivers |
DEF-P0-5 | 1-2 days |
| P1-7 | Replace unsafe libc in redbear-traceroute with relibc socket API | DEF-P1-19 | 1 day |
| P1-8 | Compile-time MMIO register bounds assertions | §6.2 | 1 week |
| P1-9 | Acquire hardware (USB BT, USB-C Ethernet, Threadripper NIC inventory) | §8.1 | logistics |
| P1-10 | Validate shared-IRQ re-arm fix on real hardware (DEF-P1-23) | DEF-P1-23 | 1 week |
12.3 P2 — Quality & Performance (Medium-Term, 4-6 weeks)
| ID | Action | Source | Effort |
|---|---|---|---|
| P2-1 | Replace silent error swallowing with log::warn! + drop |
§9.4 | 1 week |
| P2-2 | Replace unwrap()/expect() in daemon init paths |
§9.1 | 1-2 weeks |
| P2-3 | # Safety on all unsafe blocks in driver libraries (~80 redox-driver-sys) |
§9.2 | 2-3 days |
| P2-4 | Standardize on log crate in all networking daemons |
§10.1 | 1-2 days |
| P2-5 | Create redbear-net-error crate with unified error enum |
§10.2 | 1 week |
| P2-6 | Integrate clang static analysis for linux-kpi C headers | §10.8 | 2-3 days |
| P2-7 | Add CI gate to run host unit tests on every PR | §10.9 | 1-2 days |
| P2-8 | Live TCP/UDP socket table enumeration in redbear-netstat | §5.4 | 1 week |
| P2-9 | #[repr(C)] on all structs serialized via from_raw_parts |
§6.2 | 1-2 days |
| P2-10 | Document quirk table format and add-entry procedure | §10.8 | 1 day |
12.4 P3 — Polish & Parity (Backlog, 6-12 months)
| ID | Action | Source | Effort |
|---|---|---|---|
| P3-1 | IP multicast (IGMPv3/MLDv2) | §7.1 | 2-4 weeks |
| P3-2 | sendmmsg / recvmmsg |
§7.6 | 1 week |
| P3-3 | SCM_RIGHTS (FD passing over UDS) | §7.6 | 1-2 weeks |
| P3-4 | SO_TIMESTAMP / SO_TIMESTAMPNS | §7.6 | 1 week |
| P3-5 | Implement audiodevd source |
§5.4 | 2-3 weeks |
| P3-6 | Implement usbd source |
§5.4 | 2-3 weeks |
| P3-7 | Wire redbear-firmware-{amdgpu,intel,iwlwifi,bluetooth} download recipes |
§5.4 | 1-2 days each |
redbear-wayland-guard recipe.toml |
QT6-WAYLAND-NULL8-DIAGNOSIS.md |
— | — |
| P3-9 | DHCPv6 client | §7.2 | 2-4 weeks |
| P3-10 | A2DP / HFP / AVRCP Bluetooth profiles | §7.4 | 4-8 weeks |
| P3-11 | WPA3-SAE for Wi-Fi | §7.3 | 2-4 weeks |
| P3-12 | Wi-Fi roaming | §7.3 | 2-4 weeks |
| P3-13 | BPF / eBPF for observability | §7.8 | 4-8 weeks |
| P3-14 | redbear-driver-policy runtime validation |
§7.7 | 1 week |
12.5 Roadmap Dependency Graph
P0 safety docs → P2-3; P0 MMIO bounds → P1-5, P1-8; P0 buffer_pool/worker_pool → P2-1; P1-1 (TCP SendMsg) → P3-2; P1-2 (option level) → P3-3; P1-3 (DHCP renewal) → P3-9; P1-4 (Wi-Fi datapath) → W4; P1-9 (hardware) → W4/B7/LG Gram net; P2-7 (CI gate) → unblocks all P3.
12.6 Effort Estimates
| Phase | 1 dev | 2 devs |
|---|---|---|
| P0 (10 items) | 1-2 weeks | 1 week |
| P1 (10 items) | 4-6 weeks | 2-3 weeks |
| P2 (10 items) | 4-6 weeks | 2-3 weeks |
| P3 (14 items) | 6-12 months | 3-6 months |
12.7 Owner Assignments (suggestion)
- P0-1 to P0-5 (relibc + libredox + drivers): Driver infrastructure owner
- P0-6 (dnsd wiring): Build system owner
- P0-9 to P0-10 (doc cross-refs): Doc maintainer
- P1-1 to P1-2, P1-7 (relibc socket surface): relibc owner
- P1-3 (DHCP renewal): Networking owner
- P1-4 (Wi-Fi datapath): Wi-Fi owner + netstack owner
- P1-5, P1-6, P1-8, P1-10 (driver memory safety + HW validation): Driver infrastructure owner
- P1-9 (hardware acquisition): Operator
12.8 Alignment with Canonical Sub-Plans
All P0/P1/P2/P3 items map to one or more of:
[REF: local/docs/NETWORKING-IMPROVEMENT-PLAN.md](wired TCP/IP phases)[REF: local/docs/WIFI-IMPLEMENTATION-PLAN.md](W phases)[REF: local/docs/BLUETOOTH-IMPLEMENTATION-PLAN.md](B phases)[REF: local/docs/USB-IMPLEMENTATION-PLAN.md](P phases)[REF: local/docs/DRIVER-MANAGER.md](post-v5.9 correctness review)
This assessment does NOT redefine those phase structures; it cross-references them and provides the cross-cutting synthesis.
13. Validation Plan
13.1 Validation Tiers
Per §0.4 maturity rubric:
- Host unit tests:
cargo teston Linux host. - QEMU tests:
local/scripts/test-*.shscripts (see USB-VALIDATION-RUNBOOK.md). - Bare-metal tests: operator-reported with captured log (HARDWARE-VALIDATION-MATRIX.md).
13.2 Wired Network Validation
cargo testinlocal/sources/base/netstack/— 31 filter tests.test-firewall-scenarios.shper FIREWALL-VALIDATION-LOG.md — 6 scenarios, expect PASS.- QEMU virtio-net → boot → DHCP → ping → curl.
- QEMU e1000 → boot → DHCP → ping → curl.
- QEMU rtl8139 → boot → DHCP → ping → curl.
- Bare metal: Threadripper with onboard NIC → DHCP → curl (after NIC inventory).
13.3 Wireless Validation
cargo testinlocal/recipes/drivers/linux-kpi/(93 tests).cargo testinlocal/recipes/drivers/redbear-iwlwifi/(8 tests).cargo testinlocal/recipes/system/redbear-wifictl/(20 tests).test-wifi-control-runtime.shperlocal/AGENTS.md:1249.test-wifi-passthrough-qemu.sh(VFIO framework).- Bare metal: LG Gram BE201 → boot → scan → connect → DHCP → curl (W4 First Association Milestone).
13.4 Bluetooth Validation
cargo testinlocal/recipes/drivers/redbear-btusb/(151 tests).cargo testinlocal/recipes/system/redbear-btctl/(56 tests).- QEMU with USB BT adapter →
redbear-bluetooth-battery-checkper BLUETOOTH-IMPLEMENTATION-PLAN.md. - Bare metal: USB BT on LG Gram → scan → battery read (B7).
13.5 USB Validation
Per USB-VALIDATION-RUNBOOK.md: test-xhci-irq-qemu.sh --check, test-xhci-device-lifecycle-qemu.sh --check, test-usb-qemu.sh, test-usb-storage-qemu.sh, test-uhci-runtime-qemu.sh --check (P1-B), test-ohci-runtime-qemu.sh --check (P1-B), test-ehci-class-autospawn-qemu.sh --check (P1-A), test-usb-hub-qemu.sh --check (P3-A), test-usb-error-recovery-qemu.sh --check (P8-C), test-usb-uas-qemu.sh --check (P4-A), NEW: test-usb-cdc-ecm-qemu.sh. Bare metal: LG Gram + USB-C dongle → boot → DHCP → curl.
13.6 Driver Runtime Validation
- PCID:
cargo testfor the 11 drivers swept in shared-IRQ re-arm class. - ACPI: boot test on AMD64 + LG Gram; verify shutdown/reboot/power.
- IOMMU:
iommu self-testin QEMU; bare-metal AMD-Vi TBD. - GPU: QEMU virtio-gpu auto-probe; bare-metal VESA.
- Audio: QEMU Intel HDA (ihdad); bare-metal audio TBD.
- Storage: QEMU AHCI/NVMe/virtio-blk; bare-metal NVMe (LG Gram SK Hynix).
13.7 Daemon Validation
redbear-sessiond— QEMU → verify login1 methods via D-Bus.redbear-greeter— QEMU → verify GREETER_HELLO/VALID.redbear-netctl— QEMU → verify profile application.redbear-dnsd— QEMU → verify name resolution (after P0-6 wiring).redbear-wifictl— see §13.3.redbear-btctl— see §13.4.driver-manager— QEMU → verify ahcid + e1000d bind (v3.2 QEMU gate).
13.8 CI Regression Gates
cargo test(host) on linux-kpi, iwlwifi, redbear-wifictl, redbear-btusb, redbear-btctl, fatd.cargo buildfor all in-tree recipes.lint-config-paths.shfor init service path violations.validate-init-services.shfor override effectiveness.validate-file-ownership.shfor file ownership conflicts.
13.9 Sign-off Criteria
A P0/P1/P2/P3 item is signed off when: fix implemented on canonical branch + verified by corresponding test (host unit / QEMU / bare metal) + cross-referenced from §14 + canonical sub-plan updated if maturity tier changes.
14. Appendix: file:line References
14.1 Wired Network Findings
| ID | File:Line | Description |
|---|---|---|
| DEF-P0-3 | local/sources/base/netstack/src/buffer_pool.rs:84-86 |
Unsafe set_len on recycled Vec |
| DEF-P0-4 | local/sources/base/netstack/src/worker_pool.rs:61,65 |
dup fd not checked |
| DEF-P0-11 | local/sources/relibc/src/platform/redox/socket.rs (scheme protocol) |
Option level collision |
| DEF-P0-12 | local/docs/NETWORKING-IMPROVEMENT-PLAN.md:803 |
References non-existent file |
| DEF-P1-1 | local/sources/relibc/src/platform/redox/socket.rs:1027 |
MSG_NOSIGNAL |
| DEF-P1-2 | local/sources/relibc/src/platform/redox/socket.rs:599,689 |
FIXME clippy |
| DEF-P1-3 | local/sources/relibc/src/platform/redox/socket.rs:824 |
todo_skip getsockopt |
| DEF-P1-4 | local/sources/base/netstack/src/scheme/mod.rs:274 |
Event notification |
| DEF-P1-5 | local/sources/base/netstack/src/scheme/tcp.rs:101 + udp.rs:140 |
Port claiming |
| DEF-P1-6 | local/sources/base/netstack/src/scheme/netcfg/mod.rs:581 |
Multiple IPs |
| DEF-P1-7 | local/sources/base/netstack/src/scheme/netcfg/mod.rs:595 |
UDP socket insert |
| DEF-P1-8 | local/sources/base/netstack/src/scheme/icmp.rs:205,232 |
ICMP caps stub |
| DEF-P1-9 | local/sources/base/netstack/src/link/ethernet.rs:179,281,318,327,352,387,397 |
Silent packet discard |
| DEF-P1-10 | local/sources/base/netstack/src/router/mod.rs:144,166,325,332 |
Silent router enqueue |
| DEF-P1-11 | local/sources/base/netstack/src/scheme/mod.rs:520,544,609,626,635,644 |
Silent scheme write |
| DEF-P1-23 | All drivers | Shared-IRQ re-arm validation |
| DEF-P2-1 | local/sources/base/netstack/src/logger.rs:4 |
Logger init stderr only |
| DEF-P2-2 | local/sources/base/netstack/src/worker_pool.rs:170-186 |
Test-only FAKE in production |
| DEF-P2-3 | 85 instances / 24 files | Integer truncation casts |
| DEF-P2-4 | 67 instances / 26 files | Trait methods returning bool |
| DEF-P2-7 | local/sources/relibc/src/platform/redox/socket.rs:1055,1090 |
unwrap on as_c_fd |
| DEF-P2-8 | local/sources/relibc/src/platform/redox/socket.rs:85,572 |
Silent error swallow |
| DEF-P2-9 | local/sources/relibc/src/platform/redox/socket.rs recvfrom/sendto |
Single read/write |
| DEF-P3-1 | local/sources/base/netstack/src/scheme/netcfg/mod.rs:35 |
TODO const fn |
| DEF-P3-2 | local/sources/base/netstack/src/scheme/mod.rs:333 |
Poll return underused |
| DEF-P3-6 | local/sources/base/netstack/src/scheme/socket.rs:469,498 |
Unspecified TODO |
| DEF-P3-7 | local/sources/base/netstack/src/router/mod.rs:364 |
Stale route cleanup |
14.2 Wireless Findings
| ID | File:Line | Description |
|---|---|---|
| (none P0/P1) | — | All software-complete; HW validation in §8.1 |
| §5.6 | local/recipes/drivers/linux-kpi/ |
linux-kpi scope: GPU + Wi-Fi only |
14.3 Bluetooth Findings
| ID | File:Line | Description |
|---|---|---|
| (none P0/P1) | — | All software-complete; HW validation in §8.1 |
| §4.7 | local/recipes/drivers/redbear-btusb/source/10_btusb.service |
Not autospawned |
14.4 Driver Findings
| ID | File:Line | Description |
|---|---|---|
| DEF-P0-5 | local/sources/base/drivers/net/{e1000d,rtl8139d,rtl8168d,virtio-netd}/src/*.rs |
unsafe fn new without Safety |
| DEF-P0-6 | local/sources/base/drivers/net/{e1000d,rtl8139d,rtl8168d}/src/device.rs |
Missing MMIO bounds check |
| DEF-P0-7 | local/sources/base/drivers/net/rtl8139d/src/main.rs:35, rtl8168d/src/main.rs:35 |
panic! on failed BAR |
| DEF-P1-12 | local/sources/base/drivers/net/driver-network/src/lib.rs:29 |
No back pressure |
| DEF-P1-13 | local/sources/base/drivers/net/driver-network/src/lib.rs:88 |
Scheme event API gap |
| DEF-P1-14 | local/sources/base/drivers/net/e1000d/src/device.rs:284 |
Statistics never cleared |
| DEF-P1-15 | local/sources/base/drivers/net/rtl8139d/src/device.rs:206 |
No TSD_TOK wait |
| DEF-P1-16 | local/sources/base/drivers/net/virtio-netd/src/main.rs:112 |
IRQ vector |
| DEF-P1-17 | local/sources/base/drivers/net/virtio-netd/src/main.rs:136 |
Device init ordering |
| DEF-P1-18 | All 5 drivers | No memory barriers |
| DEF-P2-5 | 157 instances / 10 files | Integer casts in drivers |
| DEF-P2-6 | local/sources/base/drivers/net/ixgbed/src/main.rs:29 |
println! instead of log |
| DEF-P2-15 | local/recipes/drivers/linux-kpi/source/src/c_headers/ |
No clang-analyzer |
14.5 Daemon Findings
| ID | File:Line | Description |
|---|---|---|
| DEF-P0-10 | config/redbear-mini.toml (and full) |
redbear-dnsd not wired |
| DEF-P1-19 | local/recipes/system/redbear-traceroute/source/src/lib.rs:154-214 |
Raw libc syscalls |
| DEF-P1-20 | local/recipes/system/redbear-netctl/source/src/main.rs:782,857,916,985,1026,1051 |
Unsafe chmod |
| DEF-P1-21 | local/recipes/system/redbear-dnsd/source/src/transport.rs:47 |
Unsafe FD handling |
| DEF-P1-22 | recipes/net/openssh/recipe.toml |
3 TODOs in openssh recipe |
| DEF-P2-11 | redbear-netctl (61) / redbear-wifictl (65) / redbear-dnsd (11) / redbear-usbaudiod (1) | unwrap/expect in daemon init |
| DEF-P2-12 | redbear-netctl-console (14) / redbear-btctl (2) / redbear-wifictl (10) / redbear-dnsd (5) / redbear-traceroute (8) | Unsafe blocks without docs |
| DEF-P2-13 | All networking daemons | No logging |
| DEF-P2-14 | local/recipes/drivers/redox-driver-sys/source/src/ (~80 unsafe blocks) |
Unsafe FFI without docs |
14.6 libredox Findings
| ID | File:Line | Description |
|---|---|---|
| DEF-P0-2 | local/sources/libredox/src/lib.rs (49 sites) |
Zero # Safety documentation |
| DEF-P0-8 | local/sources/libredox/src/lib.rs:43 |
demux() .expect() panics on overflow |
| DEF-P2-10 | local/sources/libredox/src/lib.rs:503 |
Drop ignores close failures |
14.7 relibc Findings
| ID | File:Line | Description |
|---|---|---|
| DEF-P0-1 | local/sources/relibc/src/platform/redox/socket.rs (99 sites) |
Zero # Safety documentation |
| DEF-P0-9 | local/sources/relibc/src/platform/redox/socket.rs:1028 |
TCP SendMsg missing |
| DEF-P0-11 | scheme protocol | Socket option level collision |
| DEF-P1-1 | local/sources/relibc/src/platform/redox/socket.rs:1027 |
MSG_NOSIGNAL |
| DEF-P1-2 | local/sources/relibc/src/platform/redox/socket.rs:599,689 |
FIXME clippy |
| DEF-P1-3 | local/sources/relibc/src/platform/redox/socket.rs:824 |
todo_skip getsockopt |
| DEF-P2-7 | local/sources/relibc/src/platform/redox/socket.rs:1055,1090 |
unwrap on as_c_fd |
| DEF-P2-8 | local/sources/relibc/src/platform/redox/socket.rs:85,572 |
Silent error swallow |
| DEF-P2-9 | recvfrom/sendto | Single read/write without partial handling |
| DEF-P3-3 | local/sources/relibc/src/header/sys_socket/mod.rs:91 |
CheckVsLibcCrate FIXME |
14.8 Documentation Findings
| ID | Doc | Description |
|---|---|---|
| DEF-P0-12 | local/docs/NETWORKING-IMPROVEMENT-PLAN.md:803 |
References non-existent file |
| §11.3 #1 | NETWORKING-IMPROVEMENT-PLAN.md |
Missing cross-refs to 3 docs (HIGH priority) |
| §11.3 #2 | NETWORKING-IMPROVEMENT-PLAN.md:803 |
References non-existent networking-validation-log.md (MEDIUM) |
14.9 Audit Provenance & Timestamps
- Audits executed: 2026-07-27 (Asia/Tokyo).
- Total session duration: ~30 minutes of audit + ~15 minutes of synthesis.
- Notepad:
/tmp/ulw-20260727-124424.GHGvim.md. - Background tasks: bg_fac0f480, bg_70c34323, bg_c7e85bcf, bg_d9d28bcc, bg_ae64abff.
14.10 Glossary
- scheme: Redox's filesystem-namespace IPC primitive (e.g.,
scheme:tcp,scheme:netcfg). - relibc: Redox's Rust-written POSIX libc.
- libredox: Redox's userland FFI crate (syscall wrappers).
- netstack / smolnetd: Userspace TCP/IP daemon (smoltcp 0.13.1).
- DHCP: base fork
dhcpd(DHCPv4 one-shot only). - linux-kpi: Linux Kernel Programming Interface shim (C headers + Rust wrappers).
- redox-driver-sys: Safe Rust FFI for scheme:memory, scheme:irq, scheme:pci + quirks.
- Quirk: Hardware-specific workaround flag in PCI/USB/xHCI tables.
- CUBIC: TCP congestion control algorithm.
- MSI/MSI-X: Message-Signaled Interrupts (PCIe interrupt delivery).
- PAM: Pluggable Authentication Modules.
- D-Bus: Desktop IPC bus (system + session).
- Zbus: Pure-Rust D-Bus crate.
15. Changelog
| Date | Change |
|---|---|
| 2026-07-27 | First edition. Synthesis of 5 parallel audits. Replaces no prior consolidated doc. |
| 2026-07-27 | §3.3, §11.2 — noted dual-location for IRQ plan (canonical at local/docs/, mirror at legacy-obsolete-2026-07-25/ per AGENTS.md path-fork stability pattern). |
End of document. For canonical per-subsystem details, see the [REF: ...] cross-references in §3.