Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ jobs:
ci-gate:
name: CI Gate
runs-on: ubuntu-22.04
needs: [test, default-config, build-arm, static-analysis]
needs: [test, windows-test, default-config, build-arm, static-analysis]
if: always()
steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

## [Unreleased]

### Changed
- **`eos_task_delete(0)` and `eos_task_suspend(0)` return `EOS_KERN_INVALID`.** Handle 0 is the idle task and it is permanent: it is the task the scheduler falls back to when nothing else is runnable. This restores the scheduler contract #131 established and #130's replay rolled back -- `kernel/src/task.c` on master was #130's copy, in which the idle task could be deleted or suspended, `eos_task_create()` published a TCB to the scheduler before its stack existed, and `eos_schedule()` left `g_current_sp` pointing at the outgoing task. The file is #131's again, plus #130's `wake_armed` hunk.

### Fixed
- **Master did not compile after the 09-08 batch merge.** Nine PRs were merged within minutes, each on the base it was written against. #119 and #132 each added an `#else` to the same `#ifndef _WIN32` in `eos_busybox_install_to_rootfs()`, so `linux_security.c` read "#else after #else" and every C job, CodeQL and the simulation's ARM64 kernel failed to compile -- before the Python guards that would have named the rest could run. The duplicate arm is removed. Behind it: `test_linux_security_paths` (#119) and `test_pkg_fetch` (#115), whose `add_executable()` blocks later replays had overwritten, are registered again (41 to 43 suites); four `test_kernel` tests from #130 and #131 that were defined but never called are wired into `main()`; `windows-test` (#132) is in the CI gate's `needs`, so the gate cannot be green with the MSVC leg red; and `eosim-sanity.yml` and `simulation-test.yml` (#129), whose `pull_request` trigger is path-filtered and so cannot be a required check, are classified in `test_ci_gate.py`'s `NOT_REQUIRED`.
- **`eos_busybox_install_to_rootfs()` refuses `NULL`:** it read `bb->source_dir` to hand it to `is_path_safe()`, so a `NULL` `bb` was a crash rather than a -1. Both arguments are now refused before either is dereferenced.
- **`linux_security` shell commands:** `is_path_safe()` was a denylist of shell metacharacters that missed the backtick and the newline, was applied at 2 of the 9 call sites that build a command, and returned "safe" for `NULL`. A path of the form `/tmp/<backtick>id<backtick>` reached `system()` and ran `id`. The predicate now rejects control characters, backslash, backtick and newline, refuses `NULL`, and guards every shell-building entry point. `eos_busybox_configure()` validated `source_dir` *before* filling in its default, so the default path -- the one a caller gets by not setting the field -- validated the empty string and handed `.eos/build/src/busybox-<version>` to the shell unchecked; the fill now happens first, and `eos_busybox_set_version()` refuses a version that is not one shell word.
- **One shell word is an allowlist.** `defconfig` and `cross_compile` are interpolated unquoted. The predicate guarding them was a second denylist (space, tab, `*`, `?`, `~`) that missed `[`/`]` and `{`/`}`, and accepted a leading `-`. It is now `isalnum()` plus `._/+=:-` and nothing else.
- **Security steps no longer report success without having run.** `eos_ima_sign_file()`, `eos_selinux_install_to_rootfs()`, `eos_selinux_label_rootfs()`, `eos_ima_install_to_rootfs()` and `eos_busybox_install_to_rootfs()` ended their commands with `|| true` or `|| echo …` and discarded `system()`'s result, so a missing `evmctl` or `setfiles`, a failed policy or key copy, and a `make install` that never ran all returned 0. Each now distinguishes a step that completed from one that could not, logs through `EOS_ERROR` and returns -1. **Contract change:** these five functions previously always returned 0; no caller in this tree relies on that.
Expand Down
6 changes: 4 additions & 2 deletions docs/hardware-alignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Legacy/Niche:

**Result: 25/25 boards aligned.** Every eboot board has a matching eos board definition, and every eos board has a matching eboot port.

> Superseded: measured 2026-09-14, the full inventories are 84 eos board YAMLs against 83 eBoot board directories, and only 7 names match across them; the 25 rows above are the subset the original audit chose, not the whole. Both halves of the sentence above are false for the full inventories. See `docs/three-way-alignment.md` for the measured status table.

---

## Detailed Board Inventory
Expand Down Expand Up @@ -96,7 +98,7 @@ Legacy/Niche:
| `imx8m/` | ARM64 | `EOS_PLATFORM_ARM_CA53` | Cortex-A53 | eMMC | 2 GB |
| `am64x/` | ARM | `EOS_PLATFORM_ARM_CA53` | A53+R5F | 64 MB | 2 GB |
| `stm32mp1/` | ARM | `EOS_PLATFORM_ARM_CA72` | A7+M4 | eMMC | 512 MB |
| `qemu-arm64/` | ARM64 | `EOS_PLATFORM_ARM_CA53` | Cortex-A57 | virtio | 512 MB |
| `qemu_arm64/` | ARM64 | `EOS_PLATFORM_ARM_CA53` | Cortex-A57 | virtio | 512 MB |
| `riscv64_virt/` | RISC-V | `EOS_PLATFORM_RISCV64` | RV64GC | virtio | 256 MB |
| `sifive_u/` | RISC-V | `EOS_PLATFORM_RISCV64` | U74 | SPI | 8 GB |
| `esp32/` | Xtensa | `EOS_PLATFORM_XTENSA` | LX6 | 4 MB | 520 KB |
Expand All @@ -123,7 +125,7 @@ Legacy/Niche:
| Architecture | eos Toolchain | eos Boards | eboot Boards | Platform Enum |
|-------------|--------------|-----------|-------------|---------------|
| **ARM Cortex-M** | `arm-none-eabi` | nRF52840, STM32F4, STM32H7, SAMD51 | nrf52, stm32f4, stm32h7, samd51 | `ARM_CM0`..`ARM_CM33` |
| **ARM Cortex-A** | `aarch64-linux-gnu` | RPi4, i.MX8M, AM64x, STM32MP1, QEMU | rpi4, imx8m, am64x, stm32mp1, qemu-arm64 | `ARM_CA53`, `ARM_CA72` |
| **ARM Cortex-A** | `aarch64-linux-gnu` | RPi4, i.MX8M, AM64x, STM32MP1, QEMU | rpi4, imx8m, am64x, stm32mp1, qemu_arm64 (eos: `qemu-arm64.yaml` — names differ) | `ARM_CA53`, `ARM_CA72` |
| **RISC-V 64** | `riscv64-linux-gnu` | generic-riscv64, SiFive U | riscv64_virt, sifive_u | `RISCV64` |
| **Xtensa** | (vendor SDK) | ESP32 | esp32 | `XTENSA` |
| **x86 / x86_64** | `x86_64-linux-gnu` | generic-x86, generic-x86_64 | x86, x86_64_efi | `X86`, `X86_64` |
Expand Down
Loading
Loading