Skip to content

0.18.0 --- the atoms of openkal 0.17, the stop word given back, and a start without execveat - #38

Merged
Sunrisepeak merged 8 commits into
mainfrom
openkal-0.17.0
Oct 26, 2026
Merged

Sunrisepeak merged 8 commits into
mainfrom
openkal-0.17.0

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Implements openkal 0.17 (mcpplibs/openkal#52, branch openkal-0.17.0) and fixes four defects.

openkal 0.17

  • kal_fs_rename_flags: renameat2(RENAME_NOREPLACE). Volume properties follow each format's support.
  • kal_env_image: /proc/self/exe, falling back to AT_EXECFN. kal_env_system: linux.
  • kal_net_listen_at / kal_net_connect_at: AF_UNIX at /proc/self/fd/<dir>/<name>.
  • kal_process_end_as_requested: restores the request's default disposition and sends it again.
  • kal_process_self, kal_process_open_id (pidfd_open), and kal_process_info. kal_process_info reports the start time from /proc/<pid>/stat, CPU time from the process CPU clock, and whether the process has ended (waitid WNOWAIT for a child, the pidfd's readiness otherwise).
  • KAL_TERM_SEQUENCES is reported as set.
  • kal_exec_publish_part and kal_exec_granularity. The page size now comes from AT_PAGESZ instead of a hard-coded 4 KiB.
  • An environment entry without = is refused.

Defects

  • K1. The sigreturn trampoline is placed in .text. Under GCC -O0 it had been emitted into .bss, and the program died with SIGSEGV after SIGTERM.
  • K2. A request that the starter ignored stays ignored when the stop word is armed.
  • K11. termux's PRoot rejects execveat with a directory descriptor (ENOSYS). The start now falls back to execve with an absolute name; under PRoot it uses execve from the first start. Argument registers are also declared as in/out operands, because PRoot's seccomp mode rewrites rsi. This upstreams mcppls's vendored 0.15.1 copy.

Tests

  • tests/stop_word_take_over.cpp covers K1, K2 and G4.
  • tests/spawn_without_execveat.cpp uses a seccomp filter that answers ENOSYS to execveat.
  • Conformance with full,optional: 234 held, 0 did not hold.

Sunrisepeak and others added 8 commits October 26, 2026 19:09
… start without execveat

openkal 0.17 (branch openkal-0.17.0):
- kal_fs_rename_flags (renameat2 RENAME_NOREPLACE), per volume
- kal_env_image (/proc/self/exe, AT_EXECFN), kal_env_system
- kal_net_listen_at / kal_net_connect_at (AF_UNIX at /proc/self/fd/<dir>/<name>)
- kal_process_end_as_requested; kal_process_self, kal_process_open_id (pidfd), kal_process_info
- KAL_TERM_SEQUENCES reported set
- kal_exec_publish_part, kal_exec_granularity (AT_PAGESZ, not 4 KiB)
- an environment entry without = is refused

Defects:
- K1: the sigreturn trampoline is placed in .text (GCC -O0 put it in .bss)
- K2: a request the starter ignored stays ignored when the word is armed
- K11: where execveat answers ENOSYS (termux's PRoot), execve with an absolute name;
  under PRoot from the first start; argument registers are in/out operands
  (PRoot rewrites rsi in seccomp mode). Upstreams mcppls's vendored 0.15.1.

Co-authored-by: speak-agent <[email protected]>
…rted program begins with the disposition this one was started with

Co-authored-by: speak-agent <[email protected]>
…OP_REMOVE_OPEN (openkal 0.17, clause 7.14)

Co-authored-by: speak-agent <[email protected]>
…/proc names it, and one the kernel gives no descriptor for is observed through its entry

Co-authored-by: speak-agent <[email protected]>
…, and from the registers only where it does not: a static program over musl passed the check with what its registers held

Co-authored-by: speak-agent <[email protected]>
Co-authored-by: speak-agent <[email protected]>
@Sunrisepeak
Sunrisepeak merged commit 9780ac8 into main Oct 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant