Skip to content

RFC liveupdate: Move to feature flags for LUO and memfd ABI compatibility

Logan Odell kexec kvm kvmarm linux-arch linux-arm-kernel linux-iommu linux-mm linux-pci lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3luo: Move to feature flags instead of compatibility stringsinclude/linux/kho/abi/luo.h kernel/liveupdate/luo_core.c+90 -282 replies
2/3luo: Export feature support to vmlinux sectioninclude/asm-generic/vmlinux.lds.h include/linux/kho/abi/luo.h include/linux/liveupdate.h +1 more+74 -01 reply
3/3luo: memfd: Move to feature flags instead of compatibility stringsinclude/linux/kho/abi/luo.h include/linux/kho/abi/memfd.h include/linux/liveupdate.h +4 more+87 -510 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] liveupdate: Move to feature flags for LUO and memfd ABI compatibility

We're including maintainers from all subsystems that currently is or will be expected to participate in live update to ensure alignment on the path forward for compatibility.

Currently, Live Update Orchestrator (LUO) and its file handlers rely on monolithic compatibility strings (such as "luo-v5" and "memfd-v1") to validate ABI compatibility across kexec live updates. Any modification to serialized structures requires bumping the version string, which strictly breaks compatibility between adjacent kernels even when changes are additive, backwards-compatible, or optional.

This RFC series transitions LUO and subsystem file handlers to use granular feature bitmasks instead of compatibility strings. We replace the compatibility string with a header structure that includes some reserved space to define the features that are included after the feature.

We include 3 bits of data for each feature: supported, active, and required. When the supported bit is set in the next kernel, the previous kernel can serialize the feature and pass it to the next kernel. When the active bit is set, it means the previous occurred and the data for that feature is valid. When the required bit is set, it means that the next kernel must have the associated supported bit in order to be compatible.

If a feature is required in that it cannot live update to a kernel that does not support the feature, it is expected that the feature not be active or required initially. This allows for an intermediate upgrade path.

Overview of Changes:
1. Define feature header and migrate luo_ser (Patch 1):
- Introudce the feature header with the supported, active, and required bits.
- Replace the luo compatibility string with this new header.
- Validate the preserved size is at least the size of the header. This breaks compatibility with the old way.

2. Export feature header information to vmlinux (Patch 2):
- Adds a .liveupdate_features section in vmlinux containing
- Adds helper macros to export feature information for a given subsystem
- Export luo's feature information

3. Memfd Handler Migration (Patch 3):
- Migrate memfd to use the feature header instead of compatibility strings

Logan Odell (3):
luo: Move to feature flags instead of compatibility strings
luo: Export feature support to vmlinux section
luo: memfd: Move to feature flags instead of compatibility strings

 include/asm-generic/vmlinux.lds.h |  12 ++++
 include/linux/kho/abi/luo.h       | 114 +++++++++++++++++++++++++-----
 include/linux/kho/abi/memfd.h     |  41 +++++++----
 include/linux/liveupdate.h        |  22 ++++--
 kernel/liveupdate/luo_core.c      |  60 ++++++++++++----
 kernel/liveupdate/luo_file.c      |  28 ++++----
 kernel/liveupdate/luo_flb.c       |   2 +-
 lib/tests/liveupdate.c            |   2 +-
 mm/memfd_luo.c                    |  40 ++++++++---
 9 files changed, 246 insertions(+), 75 deletions(-)
Signature · 1 line
2.55.0.979.g7e5102b832-goog