Skip to content

kerf 0.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 17 Nov 22:04

Highlights

This is the first release to support arm64 hosts. kerf names CPUs by their MPIDR there, keeps the host's boot CPU wherever it sits, and boots every arm64 spawn with pseudo-NMIs so the host can always stop it. Releases now ship an arm64 wheel, deb and rpm next to the x86_64 ones. Pooled devices are named by a label on their node instead of a device tree alias, so interface names such as enP1s1f1 survive verbatim.

Breaking changes

  • kerf now uses the kernel's new kexec_file_load() flag layout for multikernel, so it needs a multikernel kernel with that change; an older kernel rejects load and unload with EINVAL
  • Device aliases are gone. A pooled device is looked up by node name, label or PCI address, and kerf no longer reads or writes /aliases
  • kerf load refuses --nic, --gateway, --netmask and --hostname without --ip, instead of dropping them silently
  • A daxfs image now carries kerf-init at /.kerf-init, and init= names it there; the rootfs's own /init is left alone

arm64

  • Read each CPU's MPIDR from its device tree node, or from the MADT on a UEFI/ACPI host, since /proc/cpuinfo does not have it
  • Call a CPU's physical ID an MPIDR on arm64 and an APIC ID on x86 in errors, warnings and verbose output
  • Count CPUs instead of taking the highest ID plus one, so sparse MPIDRs no longer show a pool of over a million CPUs or fail range checks
  • kerf load appends irqchip.gicv3_pseudo_nmi=1 to every arm64 spawn's command line. The spawn kernel needs CONFIG_ARM64_PSEUDO_NMI

kerf init

  • Keep the host's boot CPU by its own physical ID, with a warning when the request names it, rather than assuming it is ID 0
  • Record the name a device is pooled by as its label, verbatim. A NIC outside PCI domain 0 no longer ends up unnamed in the pool and eth0 in the spawn

kerf load

  • Put the interface of --ip=dhcp --nic=X in the device field of ip=, where the spawn kernel reads it, and keep --hostname
  • Build the daxfs image without writing into the rootfs. A rootfs whose /init is a symlink or hardlink, as on Android, no longer has its real init overwritten
  • Keep load records in /run/kerf/instances/<id>.json, so a new instance cannot inherit the image and initrd of an old one with the same name

kerf show

  • List an instance's devices in a structured Devices section, with the IOMMU unit behind each where the tree names one
  • Trust a load record only when the kernel lists an image for that instance
  • Report memory usage as unknown when /proc/iomem hides its addresses, instead of 1 byte allocated and nothing free

kerf exec

  • Start the reserved port scan at a random port, so an exec cannot receive the late answer meant for an earlier one that gave up

Build and packaging

  • PyPI now has an aarch64 wheel, so an arm64 host installs without musl-gcc
  • Releases include arm64 deb and rpm packages, built and install-checked on a native arm64 runner
  • CI lints and tests on arm64 as well as x86_64

Full Changelog: v0.4.0...v0.5.0