[PATCH v2 2/9] kho: move radix tree and FDT helpers to common file

sashiko-bot at kernel.org sashiko-bot at kernel.org
Sun Oct 25 10:56:56 PDT 2026


> Read-only KHO mode needs to traverse preserved KHO radix trees and FDT
> subtrees without duplicating the parsing and key-encoding implementation
> in kexec_handover.c.
> 
> Move the shared KHO radix tree key encoding and indexing helpers, FDT
> validation and lookup helpers, and kho_retrieve_subtree() from
> kexec_handover.c into a shared compilation unit
> kernel/liveupdate/kexec_handover_common.c with prototypes in
> kexec_handover_internal.h, and factor kho_radix_find_leaf() for use by
> kho_radix_del_key() and the upcoming read-only KHO backend.
> 
> While factoring kho_check_fdt() from kho_populate(), drop the "setup: "
> prefix from the FDT validation warnings and verify that
> fdt_totalsize(fdt) does not exceed PAGE_SIZE, which is safe for
> kho_populate() as both the x86 and device-tree kexec paths allocate and
> pass a single-page FDT. Also use get_unaligned() in
> kho_retrieve_subtree() when reading 64-bit FDT properties, matching
> kho_get_mem_map_phys(), since FDT property values are 4-byte aligned.
> 
> Signed-off-by: Pasha Tatashin <pasha.tatashin at soleen.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261025174017.3870481-1-pasha.tatashin@soleen.com?part=2




More information about the kexec mailing list