v1 2026-10-19

只读Kexec交接模式 · v1

引入 kho_ro= 启动参数,使检查/固件内核可读取 KHO FDT、radix tree 与元数据,但不接管或修改保留内存和 struct page。

原始补丁链接

子 Patch(8)

1/8
kho: expose physical address of outgoing FDT
Expose the physical address of the outgoing KHO FDT via /sys/kernel/debug/kho/out/fdt_phys (analogous to bootmem_phys) so that userspace tooling can locate the root KHO FDT in physical memory. Also a
2/8
kho: move radix tree, vmalloc, and FDT helpers to internal header
Move the shared KHO radix tree key encoding and indexing helpers, vmalloc flag conversion helpers, and FDT validation and lookup helpers from kexec_handover.c into kexec_handover_internal.h as static
3/8
kho: validate preservation metadata in kho_restore_vmalloc()
kho_restore_vmalloc() currently dereferences preservation before checking for NULL, does not reject unknown KHO vmalloc flags in kho_flags_to_vmalloc(), and does not validate preservation->first.phys,
4/8
kho: do not modify incoming serialized blocks
When restoring an incoming block set via kho_block_set_restore(), the physical chain of blocks is already linked and bs->head_pa is already set. However, kho_block_add() unconditionally rewrites last-
5/8
kho: add read-only Kexec Handover mode
[kho: add read-only Kexec Handover mode] [patchwork series v1] submitter=Pasha Tatashin patches (8): [v1,1/8] kho: expose physical address of outgoing FDT [v1,2/8] kho: move radix tree, vmalloc, a
6/8
kho: support read-only KHO mode in kho_block
In read-only KHO mode, incoming serialized kho_block chains lie outside the kernel’s direct map and must not be modified or freed back into the page allocator. Map incoming serialized blocks read-onl
7/8
kho: test: support read-only KHO mode in test_kho
Allow CONFIG_TEST_KEXEC_HANDOVER to be enabled with CONFIG_KEXEC_HANDOVER_READONLY and update test_kho to verify preserved state when booted in read-only KHO mode. In read-only mode, test_kho retriev
8/8
selftests: kho: add read-only KHO test to vmtest.sh
Extend tools/testing/selftests/kho/vmtest.sh and init.c to run a second QEMU test verifying read-only KHO (‘kho_ro=<fdt_phys>’) after the standard KHO test on both x86_64 and aarch64: - Build a secon