ci: test on linux 6.1 and 6.12 and on arm64

Merged
KI
25d ago
+241-42

Problem

CI boots Linux 6.6.162 and 7.3.3 and the runners' own 7.0 kernel, all on x86_64. Nothing tests a kernel below fsgate's Landlock floor (ABI v3, Linux 6.2), where a strict lock() and a confined worker must fail closed. Nothing tests 6.12, the first kernel with signal and abstract socket scopes, and nothing runs on arm64. This is M10's "More kernels and an architecture" task.

Change

  • The kernels job boots Linux 6.1.192 (Landlock ABI v2) and 6.12.117 (ABI v6) as well. 6.12 runs the full suite and the boot without Landlock, as 6.6 and 7.3 do.
  • 6.1 runs a new below-floor mode: the ignored below_landlock_v3 tests, with an exact count, as the boot without Landlock does for its tests.
    • lock.rs::kernel::below_landlock_v3::strict_lock_fails_closed: LockUnsupported, and nothing is applied. A raw read outside the grants still works, and the gate is still granting.
    • lock.rs::kernel::below_landlock_v3::best_effort_lock_enforces_only_the_abi_v2_rules: PartiallyEnforced. The kernel refuses a read and a create outside the grants, but a raw truncate(2) empties a file beneath a read-only grant, because truncation needs ABI v3.
    • broker_confined.rs::the_broker_refuses_to_start_a_worker_below_landlock_v3: the worker does not start and the error names --unconfined. The --unconfined control does start it.
    • Each test first checks that the kernel's Landlock is v2, so on any other kernel it fails.
  • A new arm64 job runs clippy and cargo test --locked on ubuntu-26.04-arm. Formatting, the packaged crate, and the fuzz crate stay in check on x86_64, and so does experimental-intercept, whose launcher is x86_64 only.
  • .github/actionlint.yaml declares the ubuntu-26.04-arm label, which actionlint 1.7.12 (the newest on PyPI) does not know yet.
  • guest-tests.sh counts only each test executable's last summary and stops if it is missing.

Root cause of the guest script fix

The first run passed on 6.1 without checking its count. The lock tests start the test executable again as a child, and each child prints its own test result line into the output the script counts. The multi-line count broke the arithmetic, and bash then skipped the rest of the case and wrote <mode>.passed anyway. The existing without_landlock mode was not affected, because none of its tests start a child, but it had the same weakness.

Safety and compatibility

Tests and CI only; no library or broker code changes. The truncate test calls libc::truncate from a test-only #[allow(unsafe_code)] module with a safety contract, because neither std nor rustix wraps a truncate by path.

Verification

  • CI on 6f7cb0f: all 10 checks passed.
    • 6.1.192: the three below_landlock_v3 tests passed, and the count of three was checked.
    • 6.12.117: the full suite (no failures) and the boot without Landlock.
    • arm64: clippy and the full test run, including the confined-worker tests.
  • CI on 4141869, after merging main with #74, #75, and #76: all 11 checks passed. RFC 0009's two tests passed on arm64, so the worker's seccomp filter now runs on aarch64 in CI, and on 6.12.
  • The first run on 4d01816: the 6.1 job passed despite the arithmetic error above.
  • Control on ee4e90f: with the count set to four, the 6.1 job failed with "expected 4 passing *below_landlock_v3* tests, got 3". Reverted in the next commit.
  • Locally on macOS:
    • cargo fmt --all --check: clean.
    • cargo clippy --all-targets -- -D warnings: clean on macOS, x86_64-unknown-linux-gnu, and aarch64-unknown-linux-gnu, and with -p fsgate --features experimental-intercept on x86_64 Linux.
    • cargo test --locked: passed; the new tests are Linux only.
    • actionlint 1.7.12.25, shellcheck, and zizmor 1.32.0 --offline: clean.

Not verified:

  • The kernels job on arm64.
  • The full suite on 6.1, where strict locks fail by design.
  • The kernel tarball checksums come from kernel.org's sha256sums.asc over HTTPS; its signature was not checked.
  • The arm64 runner's kernel version comes from the runner image's notes, not from the job.
  • Not independently reviewed.

Documentation and release

  • The threat model names the 6.1 tests in its rows for a strict lock, a best-effort lock, and a confined worker below Landlock ABI v3. It also lists the new kernels and arm64, and adds 6.12.117 to the experimental launcher's tested kernels.
  • docs/security-review.md lists the kernels.
  • ROADMAP ticks the task with this evidence, and RFC 0009's evidence now points to the arm64 run.
  • No changelog entry, since nothing user-facing changes.