Linux Documentation
 help / color / mirror / Atom feed
* [RFC v1 0/9] kho: granular compatibility and header decoupling
@ 2026-06-05  3:32 Pasha Tatashin
  2026-06-05  3:32 ` [RFC v1 1/9] kho: split out radix tree tracker into kho_radix.c Pasha Tatashin
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Pasha Tatashin @ 2026-06-05  3:32 UTC (permalink / raw)
  To: linux-kselftest, rppt, shuah, akpm, linux-mm, skhan, linux-doc,
	jasonmiu, linux-kernel, corbet, ran.xiaokai, pasha.tatashin,
	kexec, pratyush, graf

This series decouples the compatibility tracking and code organization
of individual KHO subsystems (radix tree, vmalloc, and block device).

The diff here is a bit larger than I'd like, but most of it is just
refactoring and moving code around to modularize the subsystems rather
than functional changes.

Specifically, this series separates KHO data structures from KHO
core functionality:
- KHO data structures are those that have ABI checks between kernel
  versions (e.g., vmalloc, radix trees, and block devices).
- KHO core is the functionality that involves passing the memory
  from one kernel to another.

KHO core depends on some of these data structures, but other users
of KHO also depend on them. The number of data structures keeps
growing: first we introduced vmalloc, then radix trees, then
linked blocks, and next we are planning to add an xarray-like
data structure. Keeping all of this within the same `kexec_handover.c`
file, and also under the same global version, is no longer sustainable.

To address this, this series:
1. Refactors and reorganizes the code by splitting out radix tree
   and vmalloc into separate files.
2. Moves and organizes internal and ABI headers into structured
   directories under include/linux/kho/ and include/linux/kho/abi/.
   Instead of cluttering include/linux/ with prefix-styled headers like
   kho_block.h or kho_radix_tree.h, we use the already existing
   include/linux/kho/ directory (e.g., kho/block.h and
   kho/radix_tree.h).
3. Introduces a standard set of compatibility helpers in
   kho/abi/compat.h.
4. Decouples the compatibility strings of individual KHO subsystems
   (radix tree, vmalloc, and block) from the global KHO version.
   This enables independent, granular compatibility versioning.
5. Adds a KUnit test suite to verify that the composite compatibility
   strings of different subsystems remain unique and sorted in
   alphabetical order, guaranteeing a consistent and predictable
   representation across configurations.

This series is to gather feedback on the overall design and layout
of the granular compatibility mechanism.

Pasha Tatashin (9):
  kho: split out radix tree tracker into kho_radix.c
  kho: split radix tree headers out of kexec_handover.h
  kho: split out vmalloc preservation into kho_vmalloc.c
  kho: split vmalloc headers out of kexec_handover.h
  kho: move kho_block.h to kho/block.h
  kho: introduce compatibility helpers and decouple block version
  kho: decouple radix tree compatibility from global KHO version
  kho: decouple vmalloc compatibility from global KHO version and update
    memfd
  liveupdate: add KUnit test to verify alphabetical order of
    compatibility strings

 Documentation/core-api/kho/abi.rst            |  11 +-
 Documentation/core-api/kho/index.rst          |  10 +-
 MAINTAINERS                                   |   1 -
 include/linux/kexec_handover.h                |  18 -
 include/linux/kho/abi/block.h                 |   4 +-
 include/linux/kho/abi/compat.h                |  33 ++
 include/linux/kho/abi/kexec_handover.h        | 203 +------
 include/linux/kho/abi/luo.h                   |   8 +-
 include/linux/kho/abi/memfd.h                 |  12 +-
 include/linux/kho/abi/radix_tree.h            | 133 +++++
 include/linux/kho/abi/vmalloc.h               | 101 ++++
 include/linux/{kho_block.h => kho/block.h}    |   2 +-
 .../{kho_radix_tree.h => kho/radix_tree.h}    |   5 +-
 include/linux/kho/vmalloc.h                   |  34 ++
 kernel/liveupdate/Kconfig                     |  15 +
 kernel/liveupdate/Makefile                    |   9 +-
 kernel/liveupdate/kexec_handover.c            | 531 +-----------------
 kernel/liveupdate/kho_block.c                 |   2 +-
 kernel/liveupdate/kho_radix.c                 | 290 ++++++++++
 kernel/liveupdate/kho_vmalloc.c               | 274 +++++++++
 kernel/liveupdate/liveupdate_test.c           |  56 ++
 kernel/liveupdate/luo_internal.h              |   2 +-
 kernel/liveupdate/luo_session.c               |   2 +-
 lib/test_kho.c                                |   1 +
 mm/memfd_luo.c                                |   1 +
 tools/testing/selftests/liveupdate/config     |   1 +
 26 files changed, 997 insertions(+), 762 deletions(-)
 create mode 100644 include/linux/kho/abi/compat.h
 create mode 100644 include/linux/kho/abi/radix_tree.h
 create mode 100644 include/linux/kho/abi/vmalloc.h
 rename include/linux/{kho_block.h => kho/block.h} (100%)
 rename include/linux/{kho_radix_tree.h => kho/radix_tree.h} (96%)
 create mode 100644 include/linux/kho/vmalloc.h
 create mode 100644 kernel/liveupdate/kho_radix.c
 create mode 100644 kernel/liveupdate/kho_vmalloc.c
 create mode 100644 kernel/liveupdate/liveupdate_test.c


base-commit: 5fb813ae0009d97fc414f08ad73286f562e9a123
-- 
2.53.0


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

end of thread, other threads:[~2026-06-07 17:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-05  3:32 [RFC v1 0/9] kho: granular compatibility and header decoupling Pasha Tatashin
2026-06-05  3:32 ` [RFC v1 1/9] kho: split out radix tree tracker into kho_radix.c Pasha Tatashin
2026-06-07 11:58   ` Mike Rapoport
2026-06-07 16:20     ` Pasha Tatashin
2026-06-07 17:59       ` Mike Rapoport
2026-06-05  3:32 ` [RFC v1 2/9] kho: split radix tree headers out of kexec_handover.h Pasha Tatashin
2026-06-05  3:32 ` [RFC v1 3/9] kho: split out vmalloc preservation into kho_vmalloc.c Pasha Tatashin
2026-06-05  3:32 ` [RFC v1 4/9] kho: split vmalloc headers out of kexec_handover.h Pasha Tatashin
2026-06-05  3:32 ` [RFC v1 5/9] kho: move kho_block.h to kho/block.h Pasha Tatashin
2026-06-05  3:32 ` [RFC v1 6/9] kho: introduce compatibility helpers and decouple block version Pasha Tatashin
2026-06-05  3:32 ` [RFC v1 7/9] kho: decouple radix tree compatibility from global KHO version Pasha Tatashin
2026-06-05  3:32 ` [RFC v1 8/9] kho: decouple vmalloc compatibility from global KHO version and update memfd Pasha Tatashin
2026-06-05  3:32 ` [RFC v1 9/9] liveupdate: add KUnit test to verify alphabetical order of compatibility strings Pasha Tatashin
2026-06-07 11:58 ` [RFC v1 0/9] kho: granular compatibility and header decoupling Mike Rapoport
2026-06-07 13:43   ` Pasha Tatashin

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