Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Add support for multiple versions to KHO
@ 2026-07-31 21:52 Logan Odell
  2026-07-31 21:52 ` [RFC PATCH 1/4] kho: Move subtree blob logic to separate function Logan Odell
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Logan Odell @ 2026-07-31 21:52 UTC (permalink / raw)
  To: graf, rppt, pasha.tatashin
  Cc: pratyush, akpm, kexec, linux-mm, linux-kernel, Logan Odell

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. 

We go from something like:

       / (Root Node)
       └── LUO (Legacy Parent Node)
           ├── preserved-data = <0xphys_luo>
           └── blob-size = <0xsize_luo>

To something like this:

       / (Root Node)
       └── LUO (Versioned Parent Node)
           ├── 1 (Version 1 Node)
           │   ├── preserved-data = <0xphys_luo_v1>
           │   └── blob-size = <0xsize_luo_v1>
           └── 2 (Version 2 Node)
               ├── preserved-data = <0xphys_luo_v2>
               └── blob-size = <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)
       └── LUO (Versioned Parent Node)
           ├── preserved-data = <0xphys_luo>
           ├── blob-size = <0xphys_luo>
           ├── 1 (Version 1 Node)
           │   ├── preserved-data = <0xphys_luo_v1>
           │   └── blob-size = <0xsize_luo_v1>
           └── 2 (Version 2 Node)
               ├── preserved-data = <0xphys_luo_v2>
               └── blob-size = <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(-)

-- 
2.55.0.508.g3f0d502094-goog



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-31 21:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31 21:52 [RFC PATCH 0/2] Add support for multiple versions to KHO Logan Odell
2026-07-31 21:52 ` [RFC PATCH 1/4] kho: Move subtree blob logic to separate function Logan Odell
2026-07-31 21:52 ` [RFC PATCH 2/4] kho: Add support for multiple versions in subtrees Logan Odell
2026-07-31 21:52 ` [RFC PATCH 3/4] kho: Add support for multiple versions to debugfs Logan Odell
2026-07-31 21:52 ` [RFC PATCH 4/4] kho: Add test cases for versioned subtrees Logan Odell
2026-07-31 21:56 ` [RFC PATCH 0/2] Add support for multiple versions to KHO Logan Odell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox