lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251020100306.2709352-1-jasonmiu@google.com>
Date: Mon, 20 Oct 2025 03:03:03 -0700
From: Jason Miu <jasonmiu@...gle.com>
To: Alexander Graf <graf@...zon.com>, Andrew Morton <akpm@...ux-foundation.org>, 
	Baoquan He <bhe@...hat.com>, Changyuan Lyu <changyuanl@...gle.com>, 
	David Matlack <dmatlack@...gle.com>, David Rientjes <rientjes@...gle.com>, 
	Jason Gunthorpe <jgg@...dia.com>, Jason Miu <jasonmiu@...gle.com>, Mike Rapoport <rppt@...nel.org>, 
	Pasha Tatashin <pasha.tatashin@...een.com>, Pratyush Yadav <pratyush@...nel.org>, 
	kexec@...ts.infradead.org, linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: [PATCH v2 0/3] Make KHO Stateless

This series transitions KHO from an xarray-based metadata tracking system
with serialization to using a radix tree data structure that can be
passed directly to the next kernel.

The key motivations for this change are to:
- Eliminate the need for data serialization before kexec.
- Remove the former KHO state machine by deprecating the finalize
  and abort states.
- Pass preservation metadata more directly to the next kernel via the FDT.

The new approach uses a radix tree to mark preserved pages. A page's
physical address and its order are encoded into a single value. The tree
is composed of multiple levels of page-sized tables, with leaf nodes
being bitmap tables where each set bit represents a preserved page. The
physical address of the radix tree's root is passed in the FDT, allowing
the next kernel to reconstruct the preserved memory map.

The series includes the following changes:

1.  kho: Adopt KHO radix tree data structures: Replaces the xarray-based
    tracker with the new radix tree implementation and removes the
    serialization/finalization code, thereby eliminating the KHO finalize
    and abort states.
2.  memblock: Remove KHO notifier usage: Decouples the memblock subsystem
    from the KHO notifier system, switching it to use direct KHO API calls
    and adjusting KHO FDT completion timing. KHO selftest is also updated
    along with the APIs change.
3.  kho: Remove notifier system infrastructure: Removes the now-unused
    notifier infrastructure from the KHO core.

---
Changes in v2:
- The radix tree now uses 0-based level numbering (previously 1-based).
- Added a new public API: `kho_remove_subtree()` for clients to remove an FDT subtree.
- The output FDT is now protected by a mutex.
- FDT properties have been moved to a new header: `include/linux/live_update/abi/kexec_handover.h`.
- The KHO selftest has been updated.

---
Jason Miu (3):
  kho: Adopt KHO radix tree data structures
  memblock: kho: Remove KHO notifier usage
  kho: Remove notifier system infrastructure

 include/linux/kexec_handover.h                |  42 +-
 .../linux/live_update/abi/kexec_handover.h    |  10 +
 kernel/kexec_handover.c                       | 869 +++++++++---------
 lib/test_kho.c                                |  28 +-
 mm/memblock.c                                 |  45 +-
 tools/testing/selftests/kho/init.c            |  19 -
 6 files changed, 464 insertions(+), 549 deletions(-)
 create mode 100644 include/linux/live_update/abi/kexec_handover.h

-- 
2.51.0.858.gf9c4a03a3a-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ