Skip to content
Open
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,31 @@ 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`. 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
`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
Expand Down
4 changes: 2 additions & 2 deletions mcpp.toml
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down Expand Up @@ -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"]
Expand Down
3 changes: 3 additions & 0 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions src/sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading