Skip to content

kho: expose incoming sub-blob metadata instead of contents

Long Wei kexec linux-doc linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2kho: expose incoming sub-blob metadata instead of contentskernel/liveupdate/kexec_handover_debugfs.c+42 -411 reply
2/2docs: kho: describe the in/blobs debugfs fileDocumentation/admin-guide/mm/kho.rst+3 -30 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPasha Tatashin
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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(-)
Signature · 1 line
2.43.0