From: Logan Odell <loganodell@google.com>
To: graf@amazon.com, rppt@kernel.org, pasha.tatashin@soleen.com
Cc: pratyush@kernel.org, akpm@linux-foundation.org,
kexec@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Logan Odell <loganodell@google.com>
Subject: [RFC PATCH 0/2] Add support for multiple versions to KHO
Date: Fri, 31 Jul 2026 14:52:20 -0700 [thread overview]
Message-ID: <20260731215224.831696-1-loganodell@google.com> (raw)
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
next reply other threads:[~2026-07-31 21:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 21:52 Logan Odell [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260731215224.831696-1-loganodell@google.com \
--to=loganodell@google.com \
--cc=akpm@linux-foundation.org \
--cc=graf@amazon.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=pratyush@kernel.org \
--cc=rppt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox