From e86ccb44ca247c754eb8d44b16d533e3e17395f0 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Thu, 19 Nov 2026 12:14:39 +0900 Subject: [PATCH 1/2] 0.2.0: the kernel's refusal of a start for its size is kal_err_no_space (openkal 0.26) - E2BIG from fexecve is kal_err_no_space, where it was kal_err_io (clause 7.6); no bound of this implementation's own existed upon an argument vector or an environment - observable units remain unclaimed and kal_process_job_create answers kal_err_not_supported (clause 7.18) - openkal ^0.26.0 --- CHANGELOG.md | 8 ++++++++ README.md | 19 ++++++++++++++++++- mcpp.toml | 4 ++-- src/common.h | 3 +++ src/sys.h | 1 + 5 files changed, 32 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ee1904..6067278 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.2.0 + +- A start the kernel refuses for the size of its arguments and environment (`E2BIG`) is + `kal_err_no_space`, where it was `kal_err_io` (openkal 0.26, clause 7.6). No bound of this + implementation's own existed upon either vector. +- The specification is declared as `^0.26.0`. Observable units remain unclaimed, and + `kal_process_job_create` answers `kal_err_not_supported` (clause 7.18). + ## 0.1.2 - `tools/vm-runner` runs the program by dirun with the image's profile (beside the image, as diff --git a/README.md b/README.md index b4ad771..d888086 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,26 @@ written on the kernel's own system-call interface. ```toml [target.'cfg(os = "freebsd")'.dependencies] -openkal-freebsd = "0.1.2" +openkal-freebsd = "0.2.0" ``` +## What 0.2 changes (openkal 0.26) + +**A start is bounded by the kernel alone** (clause 7.6). This implementation +kept no bound of its own: both vectors of a start are allocated at their +measured size, and a started program reads the vectors the kernel gave it where +they lie. What changes is the report of the kernel's refusal. A start whose +arguments and environment exceed what the kernel admits (`ARG_MAX`, +`kern.argmax`) is answered `E2BIG` by `fexecve`, and that is now +`kal_err_no_space`, where it was `kal_err_io`. + +**Observable units are not claimed, as before** (clause 7.18). +`kal_process_props` does not state `KAL_PROCESS_PROP_JOB_OBSERVE`, and +`kal_process_job_create` answers `kal_err_not_supported`; openkal 0.26 requires +the two to agree, and they did. + +The manifest declares `openkal = "^0.26.0"`. + ## What 0.1.2 changes **The runner is dirun.** `tools/vm-runner` boots the machine by dirun, the one diff --git a/mcpp.toml b/mcpp.toml index f7cebb8..986af45 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -1,7 +1,7 @@ [package] namespace = "mcpplibs" name = "openkal-freebsd" -version = "0.1.2" +version = "0.2.0" description = "An implementation of openkal for FreeBSD, written on the kernel's own system-call interface." license = "Apache-2.0" authors = ["mcpplibs"] @@ -37,7 +37,7 @@ provides-interfaces = [ [dependencies] # Every patch release of the specification's minor version (openkal clause 8). -openkal = "^0.25.0" +openkal = "^0.26.0" [build] sources = ["src/*.cpp"] diff --git a/src/common.h b/src/common.h index 83f0038..e9368f3 100644 --- a/src/common.h +++ b/src/common.h @@ -18,6 +18,9 @@ inline int translate(word e) { case 0: return kal_ok; case EAGAIN: return kal_err_again; case ENOMEM: return kal_err_no_memory; + // E2BIG: a start whose arguments and environment exceed what the + // kernel admits, ARG_MAX (openkal 0.26, clause 7.6). + case E2BIG: case ENOSPC: case EDQUOT: return kal_err_no_space; case EACCES: diff --git a/src/sys.h b/src/sys.h index f7da8b4..c50c397 100644 --- a/src/sys.h +++ b/src/sys.h @@ -32,6 +32,7 @@ constexpr int AT_SYMLINK_NOFOLLOW = 512; constexpr int CLOCK_MONOTONIC = 4; constexpr int CLOCK_REALTIME = 0; constexpr int CTL_KERN = 1; +constexpr int E2BIG = 7; constexpr int EACCES = 13; constexpr int EAGAIN = 35; constexpr int EBADF = 9; From e11c930e4d0bfd37ad4c3900fa6b59cc0713358b Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Thu, 19 Nov 2026 12:26:39 +0900 Subject: [PATCH 2/2] README: what the suite of openkal 0.26 reports on FreeBSD 15.1 in CI --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d888086..8eb11e9 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,12 @@ measured size, and a started program reads the vectors the kernel gave it where they lie. What changes is the report of the kernel's refusal. A start whose arguments and environment exceed what the kernel admits (`ARG_MAX`, `kern.argmax`) is answered `E2BIG` by `fexecve`, and that is now -`kal_err_no_space`, where it was `kal_err_io`. +`kal_err_no_space`, where it was `kal_err_io`. The specification's suite starts +a copy with 2,000 arguments, with 2,000 variables and with one argument of +1 MiB, and holds where each reaches the copy or is refused with +`kal_err_no_space`. Measured in CI on FreeBSD 15.1 (amd64 and arm64, hosted): +the three hold, and the suite reports 326 observations held, none failed, and +13 not observed. **Observable units are not claimed, as before** (clause 7.18). `kal_process_props` does not state `KAL_PROCESS_PROP_JOB_OBSERVE`, and