Repository navigation
Highlights
This release adds kerf exec, which runs a command inside a running instance the way docker exec does, served by kerf-init over the multikernel vsock transport. Booting an instance moves to kerf start. It also adds kerf sign for hosts that enforce kexec signatures, reworks how kerf update grows and shrinks memory to match what the kernel actually does, and ships kerf as deb and rpm packages.
Breaking changes
kerf execno longer boots an instance; usekerf start, as withdocker startkerf createandkerf updatedrop--memory-base. The kernel always placed the memory itself, so the base was never usedkerf loadnow passesconsole=mktty0by default. Pass--console=ttynull(needsCONFIG_NULL_TTYin the spawn kernel) or aconsole=in--cmdlineto choose otherwise
kerf exec
- Run a command inside an instance with
-i,-t,-e,-wand-u, and its exit status passed through -unames are resolved against the instance rootfs on the host, so kerf-init never parses passwd or group files- kerf-init serves exec on vsock port 1023, one session process per connection, and accepts only host root from a reserved port
- Stdin is flow controlled, so a command that does not read its stdin cannot hold up signals, resizes or disconnect
- The terminal is restored on SIGTERM and SIGHUP, and a closed stdout exits 141 like SIGPIPE instead of printing a traceback
- PID 1 never blocks in accept
kerf sign
- Append a module-format PKCS#7 signature to a spawn kernel's ELF vmlinux, extracting it from a bzImage when needed, with an RSA or ECDSA key
kerf loadwarns when it loads an unsigned bzImage on a host that enforces signatures, and explains signature errors fromkexec_file_load(), including EPERM from lockdown
kerf update
- Shrink an instance by removing its newest whole regions, as the kernel requires, instead of cutting one range from its base
- Grow an instance wherever a pool chunk has room, naming the highest free range so it stays clear of boot memory and a spawn kernel's padding
- Align growth to the memory granule the kernel publishes in its device tree, and refuse a size that is not a multiple of it before asking the kernel
- Any region with nothing allocated in it can leave an instance, not only those added after creation
kerf load
- Default the console to
mktty0, sokerf start --consoleworks without extra flags
Parser
- Read each PCI bus of a tree as a root bus of its own, following the kernel's flatter host bridge layout; trees from older kernels with bridges still parse
Build and packaging
- kerf-init is rebuilt from source whenever the package is built, so no wheel or install carries a stale binary. Building from source now needs
musl-gcc - The PyPI wheel is tagged
py3-nonefor manylinux and musllinux, since the static kerf-init is its only native code - Releases now include deb and rpm packages that install under
/usr/lib/kerfand use the distro's Python
Full Changelog: v0.3.0...v0.4.0