Skip to content

Commit 6d14dff

Browse files
authored
0.13.0 --- openkal 0.13: whether a node may be started, and a start that is not a program (#27)
kal_fs_set_executable_at and the KAL_INFO_EXECUTABLE field of an enquiry. This kernel stores the property as three bits; a class that may read the node may start it, and clearing clears all three. The volume is asked through the same classification kal_fs_props already makes, and a format that stores no mode does not claim KAL_FS_PROP_EXECUTABLE. ENOEXEC maps to kal_err_not_program. The report pipe already carried the kernel's value to the caller; translate folded it into kal_err_io in its default arm, so posix_spawn above this implementation returned EIO for a file that is there and is not a program. tests/conformance_additions.cpp observes the value and was run red with the mapping removed. Comments carry no emoji.
1 parent 8672403 commit 6d14dff

17 files changed

Lines changed: 227 additions & 130 deletions

‎.github/workflows/ci.yml‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
# that exists on one machine: a consumer resolving from the index is handed
6565
# a manifest pointing at a directory that exists nowhere.
6666
#
67-
# ⚠️ THAT HAS HAPPENED IN THIS ECOSYSTEM, in openkal-musl, and the working
67+
# THAT HAS HAPPENED IN THIS ECOSYSTEM, in openkal-musl, and the working
6868
# tree here has carried the same rewrite more than once since. This step
6969
# runs first, so what it examines is what the commit contains.
7070
- name: The committed manifest names no local directory
@@ -100,7 +100,7 @@ jobs:
100100
- name: Install mcpp
101101
run: |
102102
xlings update
103-
# ⚠️ THE PIN MAY NAME THE RELEASE THIS RUN IS VALIDATING, which does
103+
# THE PIN MAY NAME THE RELEASE THIS RUN IS VALIDATING, which does
104104
# not exist yet — that is the whole point of MCPP_SOURCE_REF. Bootstrap
105105
# from whatever the index has; the step below replaces it with the
106106
# build under review, and the pin is what an ordinary run tests.
@@ -111,13 +111,13 @@ jobs:
111111
fi
112112
mcpp --version
113113
mcpp self config --mirror GLOBAL
114-
# ⭐⭐ CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE.
114+
# CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE.
115115
#
116116
# Empty in the ordinary run, so this job keeps testing the RELEASED
117117
# mcpp the pin above names. Set it — `workflow_dispatch` input, or the
118118
# repository variable — and the same job runs against that source.
119119
#
120-
# ⚠️ THIS EXISTS BECAUSE THE ORDER USED TO BE WRONG. Several mcpp
120+
# THIS EXISTS BECAUSE THE ORDER USED TO BE WRONG. Several mcpp
121121
# releases went out green and only then turned this ecosystem red: the
122122
# engine's own CI cannot see a defect that appears only in a real
123123
# dependency graph, and this repository could not see the engine until
@@ -130,7 +130,7 @@ jobs:
130130
[ -d "$src" ] || git clone --quiet --depth 1 \
131131
--branch "$MCPP_SOURCE_REF" \
132132
https://github.com/mcpp-community/mcpp.git "$src"
133-
# ⚠️ THE CLONE'S OWN WORKSPACE PIN MUST NOT DECIDE WHICH mcpp
133+
# THE CLONE'S OWN WORKSPACE PIN MUST NOT DECIDE WHICH mcpp
134134
# BUILDS IT. `.xlings.json` at mcpp's root pins the mcpp that
135135
# compiles mcpp, and that pin does not move when mcpp is released —
136136
# so a build inside the checkout obeys it and tries to install a
@@ -143,7 +143,7 @@ jobs:
143143
# above, which is exactly what removing the file leaves.
144144
rm -f "$src/.xlings.json"
145145
( cd "$src" && mcpp build --release )
146-
# ⚠️ BOTH SPELLINGS, AND NO `-perm`. The matrix reaches Windows and
146+
# BOTH SPELLINGS, AND NO `-perm`. The matrix reaches Windows and
147147
# macOS runners too: on Windows the artefact is `mcpp.exe`, and
148148
# `-perm -u+x` is not a question that filesystem answers the way this
149149
# expects. Measured: `Finished release [optimized] in 173.44s`
@@ -157,7 +157,7 @@ jobs:
157157
\( -name mcpp -o -name mcpp.exe \) | head -1)
158158
[ -n "$built" ] || { echo "::error::mcpp did not build from $MCPP_SOURCE_REF"; exit 1; }
159159
echo "$(cd "$(dirname "$built")" && pwd)" >> "$GITHUB_PATH"
160-
# ⚠️ Reported, because a PATH entry that does not win looks exactly
160+
# Reported, because a PATH entry that does not win looks exactly
161161
# like one that does until something built with the wrong engine.
162162
echo "under review: $("$built" --version) (from $MCPP_SOURCE_REF)"
163163
fi
@@ -178,7 +178,7 @@ jobs:
178178
179179
- name: Every interface, every kind of examination
180180
run: |
181-
# ⚠️⚠️ `optional` IS PART OF THE SET AND WAS NOT, WHICH MADE THE STEP'S
181+
# `optional` IS PART OF THE SET AND WAS NOT, WHICH MADE THE STEP'S
182182
# OWN NAME UNTRUE.
183183
#
184184
# `full` expands to `standard,abi,stability,cost`, and `standard` is
@@ -229,7 +229,7 @@ jobs:
229229
# fails to compile and the diagnostic names it.
230230
list="$(grep -vE '^[[:space:]]*(#|$)' .spec/SURFACE.txt | sort -u)"
231231
{
232-
# ⚠️ THE MODULE LIST IS DERIVED, NOT WRITTEN OUT.
232+
# THE MODULE LIST IS DERIVED, NOT WRITTEN OUT.
233233
#
234234
# It used to be written out, and it fell out of step the first time
235235
# the specification gained an interface: SURFACE.txt listed four
@@ -272,7 +272,7 @@ jobs:
272272
# by construction.
273273
permitted='^(memcpy|memmove|memset|memcmp|__libc_start_main|main|_GLOBAL_OFFSET_TABLE_|kal_[a-z_]+|__init_array_start|__init_array_end|__preinit_array_start|__preinit_array_end|_ZN3okl.*)$'
274274
275-
# ⭐⭐ ONE NAME IS PERMITTED ONLY IF IT IS WEAK, AND THE WEAKNESS IS
275+
# ONE NAME IS PERMITTED ONLY IF IT IS WEAK, AND THE WEAKNESS IS
276276
# THE WHOLE OF THE PERMISSION.
277277
#
278278
# `environ' is how src/env.cpp recovers the vectors the kernel placed

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Thumbs.db
2020

2121
# The specification tree tools/run-conformance.sh clones beside the sources.
2222
#
23-
# ⚠️ NO TRAILING SLASH. `.spec/' matches a directory and does not match a
23+
# NO TRAILING SLASH. `.spec/' matches a directory and does not match a
2424
# SYMBOLIC LINK to one, which is what a working checkout naturally has; the link
2525
# was consequently committed once, pointing at a path that exists on one
2626
# machine.

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ for Linux, written on the kernel's own system-call interface.
55

66
```toml
77
[dependencies]
8-
openkal = "0.9.0"
8+
openkal = "0.13.0"
99

1010
[target.'cfg(os = "linux")'.dependencies]
11-
openkal-linux = "0.9.0"
11+
openkal-linux = "0.13.0"
1212
```
1313

1414
## Why it does not use a C library

‎mcpp.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
namespace = "mcpplibs"
33
name = "openkal-linux"
4-
version = "0.12.0"
4+
version = "0.13.0"
55
description = "The reference implementation of openkal for Linux, written on the kernel's own system-call interface so that it can be placed beneath a C library as well as above one."
66
license = "Apache-2.0"
77

@@ -18,7 +18,7 @@ authors = ["mcpplibs"]
1818
repo = "https://github.com/mcpplibs/openkal-linux"
1919

2020
[dependencies]
21-
openkal = "0.12.0"
21+
openkal = "0.13.0"
2222

2323
# The package contributes definitions and no modules. The interface it
2424
# implements is declared by the specification package, which this package

‎src/env.cpp‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ okl_ulong auxval(okl_ulong key) {
3535

3636
namespace {
3737

38-
// ⚠️⚠️ ONE C LIBRARY PASSES THESE AND ANOTHER DOES NOT, AND THE ONE THAT DOES
38+
// ONE C LIBRARY PASSES THESE AND ANOTHER DOES NOT, AND THE ONE THAT DOES
3939
// NOT IS THE ONE THIS PACKAGE EXISTS TO SIT BENEATH.
4040
//
4141
// glibc calls every `.init_array' entry with (argc, argv, envp). musl calls
4242
// them with NO ARGUMENTS. A function declared to take three therefore receives
4343
// whatever the argument registers happened to hold, and this one recorded it.
4444
//
45-
// ⭐ MEASURED 2026-08-29, WITH THE CONTROL THAT SEPARATES THE TWO EXPLANATIONS.
45+
// MEASURED 2026-08-29, WITH THE CONTROL THAT SEPARATES THE TWO EXPLANATIONS.
4646
// It was found by running the tests for aarch64, where the first enquiry after
4747
// the count faulted --- which reads as an architecture defect. It is not:
4848
//
@@ -65,7 +65,7 @@ bool plausible(int argc, char* const* argv, char* const* envp) {
6565
return true;
6666
}
6767

68-
// ⚠️ WEAK, AND DATA RATHER THAN A CALL. The independence check in this package
68+
// WEAK, AND DATA RATHER THAN A CALL. The independence check in this package
6969
// forbids reaching for the C library's names, because a CALL into the runtime a
7070
// program supplied would resolve to the program's and could re-enter this
7171
// implementation without bound. A pointer cannot: it is read once, it executes
@@ -100,7 +100,7 @@ bool recover(char*** argv_out, int* argc_out, char*** envp_out) {
100100
return false;
101101
}
102102

103-
// ⚠️⚠️ A PROGRAM ABOVE openkal SHALL NOT BE ENDED BY SOMETHING openkal NEVER
103+
// A PROGRAM ABOVE openkal SHALL NOT BE ENDED BY SOMETHING openkal NEVER
104104
// TOLD IT ABOUT, AND WITHOUT THIS LINE ONE WAS.
105105
//
106106
// openkal defines no signals. `kal_stream_write' is required to REPORT that the
@@ -110,7 +110,7 @@ bool recover(char*** argv_out, int* argc_out, char*** envp_out) {
110110
// it stopped, with a status no operation here produced and no wording anywhere in
111111
// the specification.
112112
//
113-
// ⭐ MEASURED THROUGH A CONSUMER, AND THE SHAPE IS WHY IT TOOK SO LONG TO SEE. A
113+
// MEASURED THROUGH A CONSUMER, AND THE SHAPE IS WHY IT TOOK SO LONG TO SEE. A
114114
// C library above this one answers `signal(SIGPIPE, SIG_IGN)' --- openkal has no
115115
// signals, so the library has nothing to set and truthfully reports success. The
116116
// program is then killed anyway, four layers below the call it made to prevent
@@ -121,7 +121,7 @@ bool recover(char*** argv_out, int* argc_out, char*** envp_out) {
121121
// fails with EPIPE, which `kal_stream_write' translates and reports, which is
122122
// what the interface said would happen all along.
123123
//
124-
// ⚠️ NOT A POLICY CHOICE ABOUT SIGNALS IN GENERAL. This is the one signal an
124+
// NOT A POLICY CHOICE ABOUT SIGNALS IN GENERAL. This is the one signal an
125125
// ordinary openkal operation provokes; the rest are left exactly as this program
126126
// was started with.
127127
[[gnu::constructor(101)]] void quiet_the_signal_openkal_cannot_report() {

‎src/exec.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,29 +44,29 @@ int kal_exec_publish(void* p, kal_uintptr size) {
4444
okl::prot_read | okl::prot_exec);
4545
if (okl::failed(r)) return okl::translate(r);
4646

47-
// ⚠️⚠️ THE INSTRUCTION CACHE IS NOT INVALIDATED HERE, AND ONE OF THE THREE
47+
// THE INSTRUCTION CACHE IS NOT INVALIDATED HERE, AND ONE OF THE THREE
4848
// IMPLEMENTATIONS DOES INVALIDATE IT. THE ASYMMETRY HAS A RULE.
4949
//
5050
// A processor with separate caches for data and instructions has just had
5151
// bytes written through the data path that it is about to fetch through the
5252
// instruction path, and nothing in the protection call makes the second path
5353
// observe the first's writes.
5454
//
55-
// ⭐ THE SPECIFICATION PLACES THE MAINTENANCE UPON THE PROGRAM, and the
55+
// THE SPECIFICATION PLACES THE MAINTENANCE UPON THE PROGRAM, and the
5656
// conformance suite performs it itself and says why: the program is the
5757
// party that knows which bytes it wrote. So an implementation that performs
5858
// it is being helpful rather than conforming, and one that does not is not
5959
// deficient.
6060
//
61-
// ⚠️ AND THE ONLY MEANS AVAILABLE HERE IS ONE THIS IMPLEMENTATION MAY NOT
61+
// AND THE ONLY MEANS AVAILABLE HERE IS ONE THIS IMPLEMENTATION MAY NOT
6262
// USE. `__builtin___clear_cache' expands to nothing on x86_64 and becomes a
6363
// CALL into the compiler's support library on the other two architectures
6464
// --- `__riscv_flush_icache' on riscv64. This implementation is linked into
6565
// programs that carry no other runtime, so acquiring that dependency to
6666
// perform an operation the specification does not require of it is not a
6767
// trade worth making.
6868
//
69-
// ⭐⭐ MEASURED, AND NOT ON THIS SYSTEM. openkal-macos added the builtin on
69+
// MEASURED, AND NOT ON THIS SYSTEM. openkal-macos added the builtin on
7070
// the reading that aarch64 would expand it inline, and its own independence
7171
// check reported within the hour:
7272
//

0 commit comments

Comments
 (0)