[RFC PATCH 0/2] Add support for multiple versions to KHO
Logan Odell <[email protected]> Fri, 31 Jul 2026 14:52:20 -0700
| Newsgroups | org.infradead.lists.kexec,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
The format of the preserved-data blob that LUO saves to KHO is expected
to change as new features are added, bugs are fixed, etc. Currently,
LUO handles this by embedding a compatibility string into struct luo_ser
which can be used to compare two kernels. This works if the changes
between kernels are fundamentally incompatible. In a case where a new
feature is added, we may want to support both versions in the new
kernel to retain compatibility.
This series adds a KHO interface to embed multiple versions under a
single node in a subtree.=20
We go from something like:
/ (Root Node)
=E2=94=94=E2=94=80=E2=94=80 LUO (Legacy Parent Node)
=E2=94=9C=E2=94=80=E2=94=80 preserved-data =3D <0xphys_luo>
=E2=94=94=E2=94=80=E2=94=80 blob-size =3D <0xsize_luo>
To something like this:
/ (Root Node)
=E2=94=94=E2=94=80=E2=94=80 LUO (Versioned Parent Node)
=E2=94=9C=E2=94=80=E2=94=80 1 (Version 1 Node)
=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 preserved-data =3D <0xph=
ys_luo_v1>
=E2=94=82 =E2=94=94=E2=94=80=E2=94=80 blob-size =3D <0xsize_lu=
o_v1>
=E2=94=94=E2=94=80=E2=94=80 2 (Version 2 Node)
=E2=94=9C=E2=94=80=E2=94=80 preserved-data =3D <0xphys_luo_v=
2>
=E2=94=94=E2=94=80=E2=94=80 blob-size =3D <0xsize_luo_v2>
We can also support mixed mode, allowing backwards compatibility in case
of a roll-back to a pre-multi version kernel:
/ (Root Node)
=E2=94=94=E2=94=80=E2=94=80 LUO (Versioned Parent Node)
=E2=94=9C=E2=94=80=E2=94=80 preserved-data =3D <0xphys_luo>
=E2=94=9C=E2=94=80=E2=94=80 blob-size =3D <0xphys_luo>
=E2=94=9C=E2=94=80=E2=94=80 1 (Version 1 Node)
=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 preserved-data =3D <0xph=
ys_luo_v1>
=E2=94=82 =E2=94=94=E2=94=80=E2=94=80 blob-size =3D <0xsize_lu=
o_v1>
=E2=94=94=E2=94=80=E2=94=80 2 (Version 2 Node)
=E2=94=9C=E2=94=80=E2=94=80 preserved-data =3D <0xphys_luo_v=
2>
=E2=94=94=E2=94=80=E2=94=80 blob-size =3D <0xsize_luo_v2>
The first patch moves some common functionality for preserving a node
into a separate function. The second patch adds our new APIs. The third
patch adds support for multiple versions to the debugfs entries. The
forth patch adds new test cases to test_kho.
Logan Odell (4):
kho: Move subtree blob logic to separate function
kho: Add support for multiple versions in subtrees
kho: Add support for multiple versions to debugfs
kho: Add test cases for versioned subtrees
include/linux/kexec_handover.h | 14 ++
include/linux/kho/abi/kexec_handover.h | 16 ++
kernel/liveupdate/kexec_handover.c | 234 +++++++++++++++++-
kernel/liveupdate/kexec_handover_debugfs.c | 57 ++++-
lib/test_kho.c | 266 +++++++++++++++++++--
5 files changed, 540 insertions(+), 47 deletions(-)
--=20
2.55.0.508.g3f0d502094-goog