[RFC PATCH 0/2] Add support for multiple versions to KHO

Logan Odell <[email protected]>
Newsgroups org.kvack.linux-mm,org.infradead.lists.kexec,org.kernel.vger.linux-kernel
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. 

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.