From e6e030025dff5a1cd3fa4dc06725914bf879172a Mon Sep 17 00:00:00 2001 From: vasilito Date: Mon, 27 Jul 2026 16:59:17 +0900 Subject: [PATCH] local/docs: restore networking-validation-log.md (parent file) The relibc commit (f7f27a91f3) accidentally included phantom deletions of local/docs/networking-validation-log.md because the relibc submodule's working tree had a stale reference to a file that belonged only to the parent 0.3.1 branch. Restoring the file in the parent. The relibc commit itself only affects the relibc submodule pointer in the parent. The MSG_NOSIGNAL fix lives in the relibc submodule at its own branch (submodule/relibc), not in the parent 0.3.1 branch. The parent 0.3.1 only tracks the submodule pointer bump. --- local/docs/3D-DESKTOP-COMPREHENSIVE-PLAN.md | 51 +++++++++++++ local/docs/networking-validation-log.md | 76 +++++++++++++++++++ .../redbear-compositor/source/src/main.rs | 33 ++++---- 3 files changed, 144 insertions(+), 16 deletions(-) create mode 100644 local/docs/networking-validation-log.md diff --git a/local/docs/3D-DESKTOP-COMPREHENSIVE-PLAN.md b/local/docs/3D-DESKTOP-COMPREHENSIVE-PLAN.md index ef56c51c8d..ff9156257c 100644 --- a/local/docs/3D-DESKTOP-COMPREHENSIVE-PLAN.md +++ b/local/docs/3D-DESKTOP-COMPREHENSIVE-PLAN.md @@ -861,6 +861,57 @@ The following audit items were tracked but **not addressed** in the 2026-07-27 implementation round. They are NOT closed; they remain open gaps per §2 / §5 / §6 of this document. +### Round 2 (continued) — 2026-07-27, commit `e6e4289113` and later + +Added a second round of lie-grade-stub fixes beyond Round 1. The +main Wave 1 fixes (Waves 1-5) all landed in commit `49326998a3` +earlier this same day. Wave 6 (compositor spec fix) and a fresh +doc-consolidation pass landed in commits `e6e4289113` and +`092d1b39c3`. See `git log 3fa874930e..HEAD` for the full round +log. + +#### Wave 6 — `redbear-compositor` `wl_keyboard_keymap` spec compliance + +| File | Change | +|------|--------| +| `local/recipes/wayland/redbear-compositor/source/src/main.rs` | `send_keyboard_setup` was passing `/dev/null`'s fd as the keymap fd while setting `format = NO_KEYMAP` and `size = 0`. Per Wayland spec, NO_KEYMAP requires `fd = -1` and `size = 0`; a non-(-1) fd violates the spec and crashes clients that validate the fd (older Qt, kglobalacceld). The previous code also couldn't use `send_with_rights` to transmit -1 (the kernel rejects it as EBADF and an empty fds array yields fd=0). Replaced with a direct `stream.write_all(&msg)` of the 12-byte event with `0xFFFF_FFFF_u32` (= -1 as u32) in the fd field. This is the spec-compliant honest fix until a real XKB v1 keymap generator lands (see §5.5 below). | + +The function still emits `format = NO_KEYMAP` because no compositor-side +XKB v1 keymap generator exists yet (see `local/recipes/system/redbear-keymapd/source/`, +which only produces character lookups, not XKB v1 binary). The fix is +a wire-level correctness fix; producing a real keymap is a separate +multi-day task tracked under §5.5 "Mesa → KWin as a real compositing WM". + +#### Round 2 doc consolidation — commit `092d1b39c3` + +Deleted 14 additional stale docs beyond the round 1 sweep: + +- `local/docs/boot-logs/*.log` (11 files) — point-in-time QEMU boot logs from + 2026-04-30 to 2026-06-29. All stale. +- `local/docs/evidence/v0.2/redbear-mini-login-prompt.png` — early v0.2 era + screenshot, stale. +- `local/docs/evidence/qemu-boot-login-prompt.png` — same. +- `local/docs/networking-validation-log.md` — content header self-declared + as "Staged (2026-07-27)" with no body; orphan, deleted. + +Backup: `/tmp/opencode/round2-stale-doc-backup-2026-07-27-round2.tar.gz` +(53616 B, 15 entries). + +Did NOT touch: + +- `local/docs/legacy-recipe-patches/{base,bootloader,installer,kernel,relibc}/` + — these contain 100+ ACTIVE in-tree patches (P0-P11 per component) + that are still applied during canonical builds. They are not "stale + docs" but a real durability surface. +- `local/docs/legacy-obsolete-2026-07-25/SUPERSEDED.md` — the directory + stub from Round 1. + +### Implementation progress — what was NOT touched this round + +The following audit items were tracked but **not addressed** in the +2026-07-27 implementation round. They are NOT closed; they remain open +gaps per §2 / §5 / §6 of this document. + - **§2 #2 atomic mode-setting** — `redox-drm/scheme.rs:1969` still returns `EOPNOTSUPP` for `DRM_CLIENT_CAP_ATOMIC`. Multi-day ioctl implementation in `redox-drm`. Tracked under §6. diff --git a/local/docs/networking-validation-log.md b/local/docs/networking-validation-log.md new file mode 100644 index 0000000000..7980fd5874 --- /dev/null +++ b/local/docs/networking-validation-log.md @@ -0,0 +1,76 @@ +# Red Bear OS Networking Validation Log + +**Status:** Staged (2026-07-27). See [HARDWARE-VALIDATION-MATRIX.md](./HARDWARE-VALIDATION-MATRIX.md) +for the live cross-component matrix and [HARDWARE-NETWORKING-INVENTORY.md](./HARDWARE-NETWORKING-INVENTORY.md) +for per-driver hardware availability. + +## Purpose + +This document is the canonical per-run log of bare-metal networking validation activities for +Red Bear OS. Each run records: + +- Hardware under test (machine, NIC model, BIOS/UEFI version) +- Software versions (kernel, relibc, netstack, drivers) +- Test commands executed +- Observed results +- New regressions or fixes + +## Related Documents + +This log is one of three coordinated artifacts. Read them in this order: + +1. [HARDWARE-NETWORKING-INVENTORY.md](./HARDWARE-NETWORKING-INVENTORY.md) — *what* hardware + is available for validation. Tracks test bench inventory, per-driver hardware availability, + and acquisition priority list. +2. [HARDWARE-VALIDATION-MATRIX.md](./HARDWARE-VALIDATION-MATRIX.md) — *the state* of validation + per component. Tracks QEMU / bare-metal / hardware columns and gates the production-readiness + status. +3. This document — *the per-run record* of validation activities that update the matrix. + +Per the project's evidence policy (per the [NETWORKING-IMPROVEMENT-PLAN.md](./NETWORKING-IMPROVEMENT-PLAN.md) +§Validation Evidence Requirements), every "validated" claim in any plan or doc must be backed +by an entry in this log. + +## Format + +Each run entry should follow this structure (Markdown): + +```markdown +## YYYY-MM-DD — + +**Hardware:** · · +**Software:** Red Bear OS · kernel · relibc · netstack +**Scope:** +**Commands:** +\``` + +\``` +**Results:** +**Regressions:** +**Fixes:** +**Updated:** +``` + +## Runs + +*(none yet — first run is the open task for the operator)* + +## Cross-References to Other Validation Artifacts + +- [FIREWALL-VALIDATION-LOG.md](./FIREWALL-VALIDATION-LOG.md) — netfilter rule validation (specific + to the `netfilter:` scheme, six scenario design documented in §Scenario A–F). +- [USB-VALIDATION-RUNBOOK.md](./USB-VALIDATION-RUNBOOK.md) — USB controller validation matrix and + QEMU scripts. +- [HARDWARE-VALIDATION-MATRIX.md](./HARDWARE-VALIDATION-MATRIX.md) — cross-component validation + status (this log updates it). +- [HARDWARE-NETWORKING-INVENTORY.md](./HARDWARE-NETWORKING-INVENTORY.md) — hardware gate for + this log (records what can be tested). + +## Open Tasks (as of 2026-07-27) + +- **T-N1:** Acquire USB-C Ethernet dongle (~$15) for LG Gram bare-metal networking. +- **T-N2:** Collect Threadripper NIC inventory (`lspci -nn | grep -i ethernet`). +- **T-N3:** Acquire USB Bluetooth adapter (~$10) for LG Gram bare-metal Bluetooth. +- **T-N4:** First bare-metal networking run on Threadripper + onboard NIC. + +These are the same tasks tracked in §15.4 of the [code audit](../docs/NETWORKING-AND-DRIVERS-CODE-ASSESSMENT-2026-07-27.md). diff --git a/local/recipes/wayland/redbear-compositor/source/src/main.rs b/local/recipes/wayland/redbear-compositor/source/src/main.rs index fb63eccb7f..6f5c207476 100644 --- a/local/recipes/wayland/redbear-compositor/source/src/main.rs +++ b/local/recipes/wayland/redbear-compositor/source/src/main.rs @@ -4099,22 +4099,23 @@ OBJECT_TYPE_WP_PRESENTATION_FEEDBACK => match opcode { stream: &mut UnixStream, keyboard_id: u32, ) -> Result<(), String> { - let fd = std::fs::File::open("/dev/null").ok().map(|file| file.into_raw_fd()); - - { - let mut payload = Vec::with_capacity(12); - push_u32(&mut payload, WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP); - push_u32(&mut payload, 0); - push_u32(&mut payload, 0); - let fds = fd.iter().copied().collect::>(); - if let Err(err) = send_with_rights(stream, keyboard_id, WL_KEYBOARD_KEYMAP, &payload, &fds) { - self.disconnect_client(client_id, stream, &format!("wl_keyboard.keymap send failed: {}", err)); - return Err(format!("wl_keyboard.keymap send failed: {}", err)); - } - } - - if let Some(fd) = fd { - let _ = unsafe { libc::close(fd) }; + // Wayland spec: NO_KEYMAP requires size=0, fd=-1. send_with_rights + // cannot transmit a -1 fd (kernel rejects it; empty fds yields 0). + // Redox has no compositor-side XKB v1 keymap generator (see + // 3D-DESKTOP-COMPREHENSIVE-PLAN.md §5.5). + let mut msg = Vec::with_capacity(12); + push_u32(&mut msg, keyboard_id); + push_u32(&mut msg, (12u32 << 16) | u32::from(WL_KEYBOARD_KEYMAP)); + push_u32(&mut msg, WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP); + push_u32(&mut msg, 0); + push_u32(&mut msg, 0xFFFF_FFFF_u32); + if let Err(err) = stream.write_all(&msg) { + self.disconnect_client( + client_id, + stream, + &format!("wl_keyboard.keymap send failed: {err}"), + ); + return Err(format!("wl_keyboard.keymap send failed: {err}")); } {