kho: housekeeping
Subsystems (5)
Pratyush Yadav
maintainercover kho: housekeeping
From: "Pratyush Yadav (Google)" <[email protected]>
Hi,
This series is a collection of miscellaneous cleanups for KHO. The patches are all independent of each other for the most part. They are kept in a series mainly to keep things easier to track and manage.
Patch 1 is lifted from [0]. All others are new.
[0] https://lore.kernel.org/kexec/[email protected]/
Regards,
Pratyush Yadav
Pratyush Yadav (Google) (6):
kho: build KHO objects into a single kho.o
kho: use acronym for KHO .c files
kho: move kho_{block,radix_tree}.h into include/linux/kho/
kho: use unsigned long for kho_preserve_pages() and co when KHO=n
kho: fix kernel-doc return for kho_alloc_preserve()
kho: don't reference subtree blobs as FDTs
Documentation/core-api/kho/index.rst | 6 +--
MAINTAINERS | 3 +-
drivers/pci/liveupdate.c | 2 +-
include/linux/kexec_handover.h | 6 +--
include/linux/{kho_block.h => kho/block.h} | 0
.../{kho_radix_tree.h => kho/radix_tree.h} | 0
kernel/liveupdate/Makefile | 12 +++--
kernel/liveupdate/kho_block.c | 2 +-
.../{kexec_handover.c => kho_core.c} | 8 +--
...kexec_handover_debugfs.c => kho_debugfs.c} | 54 +++++++++----------
...xec_handover_internal.h => kho_internal.h} | 10 ++--
kernel/liveupdate/luo_core.c | 2 +-
kernel/liveupdate/luo_internal.h | 2 +-
kernel/liveupdate/luo_session.c | 2 +-
14 files changed, 56 insertions(+), 53 deletions(-)
rename include/linux/{kho_block.h => kho/block.h} (100%)
rename include/linux/{kho_radix_tree.h => kho/radix_tree.h} (100%)
rename kernel/liveupdate/{kexec_handover.c => kho_core.c} (99%)
rename kernel/liveupdate/{kexec_handover_debugfs.c => kho_debugfs.c} (75%)
rename kernel/liveupdate/{kexec_handover_internal.h => kho_internal.h} (87%)base-commit: fcddbfa7a3693f1225a4d32b28401543b3bbedaf
Signature · 1 line
2.56.1.839.g22a8290db9-goog
Pratyush Yadav
maintainerPATCH 1/6 kho: build KHO objects into a single kho.o
From: "Pratyush Yadav (Google)" <[email protected]>
kho_block.o is part of the KHO infrastructure, but is currently built as part of luo.o, which ties it to CONFIG_LIVEUPDATE.
Group all KHO objects into a composite kho.o, built for CONFIG_KEXEC_HANDOVER, the same way the LUO objects are grouped into luo.o. This also gives a single place to add new KHO objects.
--- kernel/liveupdate/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
kernel/liveupdate/Makefile +8 -4
@@ -1,13 +1,17 @@ # SPDX-License-Identifier: GPL-2.0 +kho-y := \ + kexec_handover.o \ + kho_block.o + +kho-$(CONFIG_KEXEC_HANDOVER_DEBUGFS) += kexec_handover_debugfs.o + +obj-$(CONFIG_KEXEC_HANDOVER) += kho.o + luo-y := \ - kho_block.o \ luo_core.o \ luo_file.o \ luo_flb.o \ luo_session.o -obj-$(CONFIG_KEXEC_HANDOVER) += kexec_handover.o -obj-$(CONFIG_KEXEC_HANDOVER_DEBUGFS) += kexec_handover_debugfs.o - obj-$(CONFIG_LIVEUPDATE) += luo.o
Signature · 1 line
2.56.1.839.g22a8290db9-goog
Pratyush Yadav
maintainerPATCH 2/6 kho: use acronym for KHO .c files
In reply to Pratyush YadavFrom: "Pratyush Yadav (Google)" <[email protected]>
KHO started its life in kernel/. At the time, its name matched the pattern of other kexec files like kexec_core.c or kexec_file.c.
Commit 48a1b2321d76 ("liveupdate: kho: move to kernel/liveupdate") moved into liveupdate/. Files in liveupdate/ use acronyms like luo_core.c, mainly because the wider context is already available in the directory name.
Save some keystrokes and rename the kexec_handover_* files to kho_*.
---
Documentation/core-api/kho/index.rst | 2 +-
MAINTAINERS | 2 +-
kernel/liveupdate/Makefile | 4 ++--
kernel/liveupdate/{kexec_handover.c => kho_core.c} | 4 ++--
.../liveupdate/{kexec_handover_debugfs.c => kho_debugfs.c} | 4 ++--
.../{kexec_handover_internal.h => kho_internal.h} | 6 +++---
kernel/liveupdate/luo_core.c | 2 +-
7 files changed, 12 insertions(+), 12 deletions(-)
rename kernel/liveupdate/{kexec_handover.c => kho_core.c} (99%)
rename kernel/liveupdate/{kexec_handover_debugfs.c => kho_debugfs.c} (97%)
rename kernel/liveupdate/{kexec_handover_internal.h => kho_internal.h} (91%)Documentation/core-api/kho/index.rst +1 -1
@@ -89,7 +89,7 @@ Kexec Handover Radix Tree Public API ========== -.. kernel-doc:: kernel/liveupdate/kexec_handover.c +.. kernel-doc:: kernel/liveupdate/kho_core.c :export: KHO Serialization Blocks API
MAINTAINERS +1 -1
@@ -14785,7 +14785,7 @@ F: include/asm-generic/kexec_handover.h F: include/linux/kexec_handover.h F: include/linux/kho/ F: include/linux/kho_block.h -F: kernel/liveupdate/kexec_handover* +F: kernel/liveupdate/kho_* F: lib/test_kho.c F: tools/testing/selftests/kho/
kernel/liveupdate/Makefile +2 -2
@@ -1,10 +1,10 @@ # SPDX-License-Identifier: GPL-2.0 kho-y := \ - kexec_handover.o \ + kho_core.o \ kho_block.o -kho-$(CONFIG_KEXEC_HANDOVER_DEBUGFS) += kexec_handover_debugfs.o +kho-$(CONFIG_KEXEC_HANDOVER_DEBUGFS) += kho_debugfs.o obj-$(CONFIG_KEXEC_HANDOVER) += kho.o
kernel/liveupdate/kho_core.c renamed from kernel/liveupdate/kexec_handover.c +2 -2
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* kexec_handover.c - kexec handover metadata processing +* kho_core.c - kexec handover metadata processing * Copyright (C) 2023 Alexander Graf <[email protected]> * Copyright (C) 2025 Microsoft Corporation, Mike Rapoport <[email protected]> * Copyright (C) 2025 Google LLC, Changyuan Lyu <[email protected]>
@@ -39,7 +39,7 @@#include "../../mm/mm_init.h" #include "../../mm/vmalloc.h" #include "../kexec_internal.h" -#include "kexec_handover_internal.h" +#include "kho_internal.h" /* * This is the minimal alignment required by deferred struct page init.
kernel/liveupdate/kho_debugfs.c renamed from kernel/liveupdate/kexec_handover_debugfs.c +2 -2
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* kexec_handover_debugfs.c - kexec handover debugfs interfaces +* kho_debugfs.c - kexec handover debugfs interfaces * Copyright (C) 2023 Alexander Graf <[email protected]> * Copyright (C) 2025 Microsoft Corporation, Mike Rapoport <[email protected]> * Copyright (C) 2025 Google LLC, Changyuan Lyu <[email protected]>
@@ -13,7 +13,7 @@#include <linux/libfdt.h> #include <linux/mm.h> #include <linux/kho/abi/kexec_handover.h> -#include "kexec_handover_internal.h" +#include "kho_internal.h" static struct dentry *debugfs_root;
kernel/liveupdate/kho_internal.h renamed from kernel/liveupdate/kexec_handover_internal.h +3 -3
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef LINUX_KEXEC_HANDOVER_INTERNAL_H -#define LINUX_KEXEC_HANDOVER_INTERNAL_H +#ifndef LINUX_KHO_INTERNAL_H +#define LINUX_KHO_INTERNAL_H #include <linux/kexec_handover.h> #include <linux/list.h>
@@ -41,4 +41,4 @@ static inline void kho_debugfs_blob_remove(struct kho_debugfs *dbg, void *blob) { }#endif /* CONFIG_KEXEC_HANDOVER_DEBUGFS */ -#endif /* LINUX_KEXEC_HANDOVER_INTERNAL_H */ +#endif /* LINUX_KHO_INTERNAL_H */
kernel/liveupdate/luo_core.c +1 -1
@@ -61,7 +61,7 @@#include <linux/sizes.h> #include <linux/string.h> -#include "kexec_handover_internal.h" +#include "kho_internal.h" #include "luo_internal.h" static struct {
Signature · 1 line
2.56.1.839.g22a8290db9-goog
Pratyush Yadav
maintainerPATCH 3/6 kho: move kho_{block,radix_tree}.h into include/linux/kho/
In reply to Pratyush YadavFrom: "Pratyush Yadav (Google)" <[email protected]>
Hierarchical file systems have been around for a while now. Let's use them.
---
Documentation/core-api/kho/index.rst | 4 ++--
MAINTAINERS | 1 -
drivers/pci/liveupdate.c | 2 +-
include/linux/{kho_block.h => kho/block.h} | 0
include/linux/{kho_radix_tree.h => kho/radix_tree.h} | 0
kernel/liveupdate/kho_block.c | 2 +-
kernel/liveupdate/kho_core.c | 2 +-
kernel/liveupdate/luo_internal.h | 2 +-
kernel/liveupdate/luo_session.c | 2 +-
9 files changed, 7 insertions(+), 8 deletions(-)
rename include/linux/{kho_block.h => kho/block.h} (100%)
rename include/linux/{kho_radix_tree.h => kho/radix_tree.h} (100%)Documentation/core-api/kho/index.rst +2 -2
@@ -83,7 +83,7 @@ the next KHO, because kexec can overwrite even the original kernel. Kexec Handover Radix Tree ========================= -.. kernel-doc:: include/linux/kho_radix_tree.h +.. kernel-doc:: include/linux/kho/radix_tree.h :doc: Kexec Handover Radix Tree Public API
@@ -98,7 +98,7 @@ KHO Serialization Blocks API .. kernel-doc:: kernel/liveupdate/kho_block.c :doc: KHO Serialization Blocks -.. kernel-doc:: include/linux/kho_block.h +.. kernel-doc:: include/linux/kho/block.h .. kernel-doc:: kernel/liveupdate/kho_block.c :internal:
MAINTAINERS +0 -1
@@ -14784,7 +14784,6 @@ F: Documentation/core-api/kho/* F: include/asm-generic/kexec_handover.h F: include/linux/kexec_handover.h F: include/linux/kho/ -F: include/linux/kho_block.h F: kernel/liveupdate/kho_* F: lib/test_kho.c F: tools/testing/selftests/kho/
drivers/pci/liveupdate.c +1 -1
@@ -207,7 +207,7 @@#include <linux/io.h> #include <linux/kexec_handover.h> #include <linux/kho/abi/pci.h> -#include <linux/kho_block.h> +#include <linux/kho/block.h> #include <linux/liveupdate.h> #include <linux/mm.h> #include <linux/mutex.h>
include/linux/kho/block.h renamed from include/linux/kho_block.h +0 -0
include/linux/kho/radix_tree.h renamed from include/linux/kho_radix_tree.h +0 -0
kernel/liveupdate/kho_block.c +1 -1
@@ -23,7 +23,7 @@#include <linux/io.h> #include <linux/kexec_handover.h> #include <linux/kho/abi/block.h> -#include <linux/kho_block.h> +#include <linux/kho/block.h> #include <linux/slab.h> /*
kernel/liveupdate/kho_core.c +1 -1
@@ -18,7 +18,7 @@#include <linux/kasan.h> #include <linux/kexec.h> #include <linux/kexec_handover.h> -#include <linux/kho_radix_tree.h> +#include <linux/kho/radix_tree.h> #include <linux/utsname.h> #include <linux/kho/abi/kexec_handover.h> #include <linux/kho/abi/kexec_metadata.h>
kernel/liveupdate/luo_internal.h +1 -1
@@ -10,7 +10,7 @@#include <linux/liveupdate.h> #include <linux/uaccess.h> -#include <linux/kho_block.h> +#include <linux/kho/block.h> struct luo_ucmd {void __user *ubuffer;
kernel/liveupdate/luo_session.c +1 -1
@@ -90,7 +90,7 @@#include <linux/fs.h> #include <linux/io.h> #include <linux/kexec_handover.h> -#include <linux/kho_block.h> +#include <linux/kho/block.h> #include <linux/kho/abi/luo.h> #include <linux/list.h> #include <linux/liveupdate.h>
Signature · 1 line
2.56.1.839.g22a8290db9-goog
Pratyush Yadav
maintainerPATCH 4/6 kho: use unsigned long for kho_preserve_pages() and co when KHO=n
In reply to Pratyush YadavFrom: "Pratyush Yadav (Google)" <[email protected]>
Commit 840fe43d371f ("kho: use unsigned long for nr_pages") changed nr_pages to unsigned long, but it forgot to update the KEXEC_HANDOVER=n stubs.
---
I don't think this is stable material since there is no problem in practice.
--- include/linux/kexec_handover.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/kexec_handover.h +3 -3
@@ -66,12 +66,12 @@ static inline int kho_preserve_folio(struct folio *folio)static inline void kho_unpreserve_folio (struct folio *folio) { } -static inline int kho_preserve_pages (struct page *page,unsigned int nr_pages) +static inline int kho_preserve_pages (struct page *page,unsigned long nr_pages) {return -EOPNOTSUPP ; } -static inline void kho_unpreserve_pages (struct page *page,unsigned int nr_pages) { } +static inline void kho_unpreserve_pages (struct page *page,unsigned long nr_pages) { }static inline int kho_preserve_vmalloc (void *ptr,struct kho_vmalloc *preservation)
@@ -95,7 +95,7 @@ static inline struct folio *kho_restore_folio(phys_addr_t phys) }static inline struct page *kho_restore_pages (phys_addr_t phys, -unsigned int nr_pages) +unsigned long nr_pages) {return NULL ; }
Signature · 1 line
2.56.1.839.g22a8290db9-goog
Pratyush Yadav
maintainerPATCH 5/6 kho: fix kernel-doc return for kho_alloc_preserve()
In reply to Pratyush YadavFrom: "Pratyush Yadav (Google)" <[email protected]>
kernel-doc complains:
No description found for return value of 'kho_alloc_preserve'
It does not recognize '@return'. Use 'Return' instead.
--- kernel/liveupdate/kho_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/liveupdate/kho_core.c +1 -1
@@ -1584,7 +1584,7 @@ EXPORT_SYMBOL_GPL(kho_restore_vmalloc);* Note: The actual allocated size will be rounded up to the nearest * power-of-two page boundary. * -* @return A virtual pointer to the allocated and preserved memory on success, +* Return: A virtual pointer to the allocated and preserved memory on success, * or an ERR_PTR() encoded error on failure. */ void *kho_alloc_preserve (size_t size)
Signature · 1 line
2.56.1.839.g22a8290db9-goog
Pratyush Yadav
maintainerPATCH 6/6 kho: don't reference subtree blobs as FDTs
In reply to Pratyush YadavFrom: "Pratyush Yadav (Google)" <[email protected]>
KHO started out with using FDT for all subtrees. This is why debugfs used "sub_fdts" as the directory name and in the code. Since then, KHO subtrees started also using raw C structs for serialization. Commit 4916ae386760 ("kho: rename fdt parameter to blob in kho_add/remove_subtree()") updated some of the code to match this reality.
Still, references to sub FDTs were left around. The data structure to track the blobs is still called fdt_debugfs, the list of blobs is called "fdt_list", and most importantly, the subdirectory holding them in debugfs is called "sub_fdts".
Update all this to use blob in the naming.
The only functional change is the rename of the debugfs subdirectory from "sub_fdts" to "sub_blobs". Everything else is a pure rename.
--- kernel/liveupdate/kho_debugfs.c | 50 ++++++++++++++++---------------- kernel/liveupdate/kho_internal.h | 4 +-- 2 files changed, 27 insertions(+), 27 deletions(-)
kernel/liveupdate/kho_debugfs.c +25 -25
@@ -17,7 +17,7 @@static struct dentry *debugfs_root; -struct fdt_debugfs { +struct kho_debugfs_blob {struct list_head list;struct debugfs_blob_wrapper wrapper;struct dentry *file;
@@ -27,24 +27,24 @@ static int __kho_debugfs_blob_add(struct list_head *list, struct dentry *dir, const char *name, const void *blob, size_t size) { - struct fdt_debugfs *f; + struct kho_debugfs_blob *b;struct dentry *file; - f =kmalloc_obj (*f); -if (!f) + b =kmalloc_obj (*b); +if (!b)return -ENOMEM ; - f->wrapper.data = (void *)blob; - f->wrapper.size = size; + b->wrapper.data = (void *)blob; + b->wrapper.size = size; - file =debugfs_create_blob (name,0400 , dir, &f->wrapper); + file =debugfs_create_blob (name,0400 , dir, &b->wrapper);if (IS_ERR (file)) { -kfree (f); +kfree (b);return PTR_ERR (file); } - f->file = file; -list_add (&f->list, list); + b->file = file; +list_add (&b->list, list);return 0 ; }
@@ -57,20 +57,20 @@ int kho_debugfs_blob_add(struct kho_debugfs *dbg, const char *name,if (root) dir = dbg->dir;else - dir = dbg->sub_fdt_dir; + dir = dbg->sub_blob_dir; -return __kho_debugfs_blob_add (&dbg->fdt_list, dir, name, blob, size); +return __kho_debugfs_blob_add (&dbg->blob_list, dir, name, blob, size); }void kho_debugfs_blob_remove (struct kho_debugfs *dbg,void *blob) { -struct fdt_debugfs *ff; +struct kho_debugfs_blob *b; -list_for_each_entry (ff, &dbg->fdt_list, list) { -if (ff->wrapper.data == blob) { -debugfs_remove (ff->file); -list_del (&ff->list); -kfree (ff); +list_for_each_entry (b, &dbg->blob_list, list) { +if (b->wrapper.data == blob) { +debugfs_remove (b->file); +list_del (&b->list); +kfree (b);break ; } }
@@ -99,7 +99,7 @@ __init void kho_in_debugfs_init(struct kho_debugfs *dbg, const void *fdt)struct dentry *dir;int err; -INIT_LIST_HEAD (&dbg->fdt_list); +INIT_LIST_HEAD (&dbg->blob_list); dir =debugfs_create_dir ("in" , debugfs_root);if (IS_ERR (dir)) {
@@ -107,7 +107,7 @@ __init void kho_in_debugfs_init(struct kho_debugfs *dbg, const void *fdt) goto err_out; } - err =__kho_debugfs_blob_add (&dbg->fdt_list, dir,"fdt" , fdt, + err =__kho_debugfs_blob_add (&dbg->blob_list, dir,"fdt" , fdt,fdt_totalsize (fdt));if (err) goto err_rmdir;
@@ -131,16 +131,16 @@ __init void kho_in_debugfs_init(struct kho_debugfs *dbg, const void *fdt)__init int kho_out_debugfs_init (struct kho_debugfs *dbg) { -struct dentry *dir, *f, *sub_fdt_dir; +struct dentry *dir, *f, *sub_blob_dir; -INIT_LIST_HEAD (&dbg->fdt_list); +INIT_LIST_HEAD (&dbg->blob_list); dir =debugfs_create_dir ("out" , debugfs_root);if (IS_ERR (dir))return -ENOMEM ; - sub_fdt_dir =debugfs_create_dir ("sub_fdts" , dir); -if (IS_ERR (sub_fdt_dir)) + sub_blob_dir =debugfs_create_dir ("sub_blobs" , dir); +if (IS_ERR (sub_blob_dir)) goto err_rmdir; f = debugfs_create_file("bootmem_phys", 0400, dir, NULL,
@@ -154,7 +154,7 @@ __init int kho_out_debugfs_init(struct kho_debugfs *dbg) goto err_rmdir; dbg->dir = dir; - dbg->sub_fdt_dir = sub_fdt_dir; + dbg->sub_blob_dir = sub_blob_dir;return 0 ; err_rmdir:
kernel/liveupdate/kho_internal.h +2 -2
@@ -11,8 +11,8 @@struct kho_debugfs {struct dentry *dir; -struct dentry *sub_fdt_dir; -struct list_head fdt_list; +struct dentry *sub_blob_dir; +struct list_head blob_list; };#else
Signature · 1 line
2.56.1.839.g22a8290db9-goog
Re: [PATCH 6/6] kho: don't reference subtree blobs as FDTs
Quoted 2 lines · Pratyush Yadav
The only functional change is the rename of the debugfs subdirectory from "
sub_fdts" to "sub_blobs". Everything else is a pure rename.
It looks like two places still refer to the old directory name:
Documentation/admin-guide/mm/kho.rst:110:``/sys/kernel/debug/kho/out/sub_fdts/`` kernel/liveupdate/kho_core.c:1099:``/sys/kernel/debug/kho/out/sub_fdts/@name`` when kernel is configured with
[email protected]
AI reviewRe: [PATCH 6/6] kho: don't reference subtree blobs as FDTs
In reply to Pratyush YadavThank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] kho: stale sub_fdts debugfs path in kho_add_subtree() kernel-doc and kho.rst --
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Low] kho: stale sub_fdts debugfs path in kho_add_subtree() kernel-doc and kho.rst
--
commit 4fb09c13a16f68cfb66608af6d8973645ca988e6
Author: Pratyush Yadav (Google) <[email protected]>
kho: don't reference subtree blobs as FDTs
This commit renames KHO debugfs subtree tracking structures, fields, and the debugfs directory from "sub_fdts" / "fdt" to "sub_blobs" / "blob".
Quoted 4 lines
kernel/liveupdate/kho_debugfs.c +0
-0
[ ... ]
Quoted 9 lines
kernel/liveupdate/kho_debugfs.c +2
-2@@ -131,16 +131,16 @@ __init void kho_in_debugfs_init(struct kho_debugfs *dbg, const void *fdt)__init int kho_out_debugfs_init (struct kho_debugfs *dbg) { -struct dentry *dir, *f, *sub_fdt_dir; +struct dentry *dir, *f, *sub_blob_dir; -INIT_LIST_HEAD (&dbg->fdt_list); +INIT_LIST_HEAD (&dbg->blob_list);
kernel/liveupdate/kho_debugfs.c __init void kho_in_debugfs_init(struct kho_debugfs *dbg, const void *fdt) · line 144
Quoted 10 lines
kernel/liveupdate/kho_debugfs.c +2
-2dir =debugfs_create_dir ("out" , debugfs_root);if (IS_ERR (dir))return -ENOMEM ; - sub_fdt_dir =debugfs_create_dir ("sub_fdts" , dir); -if (IS_ERR (sub_fdt_dir)) + sub_blob_dir =debugfs_create_dir ("sub_blobs" , dir); +if (IS_ERR (sub_blob_dir)) goto err_rmdir;
[Severity: Low]
Should the kernel-doc comment for kho_add_subtree() in kernel/liveupdate/kho_core.c and the debugfs path in Documentation/admin-guide/mm/kho.rst also be updated from /sys/kernel/debug/kho/out/sub_fdts/ to /sys/kernel/debug/kho/out/sub_blobs/?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
[email protected]
AI reviewSashiko has finished reviewing this 6-patch series:
Sashiko has finished reviewing this 6-patch series:
- Patches 1-5: no issues found.
- Patch 6 ("kho: don't reference subtree blobs as FDTs"): 1 potential issue (1 Low)
A detailed review has been sent as a separate reply to patch 6.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]
Mike Rapoport
maintainerRe: [PATCH 6/6] kho: don't reference subtree blobs as FDTs
In reply to Pratyush YadavQuoted 14 lines · Pratyush Yadav
From: "Pratyush Yadav (Google)" <[email protected]>
KHO started out with using FDT for all subtrees. This is why debugfs used "
sub_fdts" as the directory name and in the code. Since then, KHO subtrees started also using raw C structs for serialization. Commit4916ae386760("kho: rename fdt parameter to blob in kho_add/remove_subtree()") updated some of the code to match this reality.Still, references to sub FDTs were left around. The data structure to track the blobs is still called
fdt_debugfs, the list of blobs is called "fdt_list", and most importantly, the subdirectory holding them in debugfs is called "sub_fdts".
Quoted 4 lines
Update all this to use blob in the naming.
The only functional change is the rename of the debugfs subdirectory from "
sub_fdts" to "sub_blobs". Everything else is a pure rename.
Without FDT 'sub' does not really have a meaning. And I feel like 'blob' is to vague.
Maybe 'payloads'?
Quoted 5 lines
Signed-off-by Pratyush Yadav (Google) <[email protected]>--- kernel/liveupdate/kho_debugfs.c | 50 ++++++++++++++++---------------- kernel/liveupdate/kho_internal.h | 4 +-- 2 files changed, 27 insertions(+), 27 deletions(-)
Signature · 2 lines
Sincerely yours, Mike.
Mike Rapoport
maintainerRe: (subset) [PATCH 0/6] kho: housekeeping
In reply to Pratyush YadavFrom: Mike Rapoport (Microsoft) <[email protected]>
Quoted 9 lines · Pratyush Yadav
From: "Pratyush Yadav (Google)" <[email protected]>
Hi,
This series is a collection of miscellaneous cleanups for KHO. The patches are all independent of each other for the most part. They are kept in a series mainly to keep things easier to track and manage.
[...]
I applied the first 5 to liveupdate-7.5 branch of liveupdate/linux.git tree, thanks!
[1/6] kho: build KHO objects into a single kho.o
commit: 3c7a9caf484ed44c71101eb27b63147bb2d0fb74
[2/6] kho: use acronym for KHO .c files
commit: 50ae3858fa14e2e2f9886d77bd3bb9239e802043
[3/6] kho: move kho_{block,radix_tree}.h into include/linux/kho/
commit: 419644f1b6e4c660bf27c7afc6e166347ba73458
[4/6] kho: use unsigned long for kho_preserve_pages() and co when KHO=n
commit: a671e49e2b950ec9ba054ebe53fb9ec372ad3cfa
[5/6] kho: fix kernel-doc return for kho_alloc_preserve()
commit: 89b624f9d2f0344500bbea673ca15f3fc3d7ec61tree: https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
branch: liveupdate-7.5
--
Sincerely yours,
Mike.