[PATCH 0/2] kho: expose incoming sub-blob metadata instead of contents

Long Wei longwei27 at huawei.com
Tue Nov 17 01:29:49 PST 2026


Incoming sub-blob pages under kho/in/sub_fdts are owned by their consumers
and have independent lifetimes.  Consumers restore and free them at their own
initcall level, which is always earlier than kho_init() (fs_initcall) where
the debugfs view is built.  LUO, for example, frees its state in
early_initcall, so in/sub_fdts/LUO ends up pointing at a page that has
already been returned to the page allocator.  Reading the file then triggers
a KASAN use-after-free in _copy_to_user(), with the backing page already
marked page_type: f0(buddy).

KHO does not own these pages, so it cannot safely expose their contents at
any point.  Instead of trying to track which blobs are still alive, replace
the raw blob nodes with a read-only in/blobs file that reports the name,
physical address and size of every sub-blob referenced by the incoming FDT.
The FDT itself is reserved by KHO and remains available as in/fdt.

The first patch does the change, the second updates the documentation.

Long Wei (2):
  kho: expose incoming sub-blob metadata instead of contents
  docs: kho: describe the in/blobs debugfs file

 Documentation/admin-guide/mm/kho.rst       |  6 +--
 kernel/liveupdate/kexec_handover_debugfs.c | 83 +++++++++++++++---------------
 2 files changed, 45 insertions(+), 44 deletions(-)

-- 
2.43.0




More information about the kexec mailing list