Thread (2 messages) flat view 2 messages, 2 authors, 2025-10-06

Re: [PATCH v4 02/30] kho: make debugfs interface optional

From: Pasha Tatashin <pasha.tatashin@soleen.com>
Date: 2025-10-06 18:03:31
Also in: linux-doc, linux-fsdevel, linux-mm, lkml

On Mon, Oct 6, 2025 at 12:31 PM Pratyush Yadav [off-list ref] wrote:
On Mon, Sep 29 2025, Pasha Tatashin wrote:
quoted
Currently, KHO is controlled via debugfs interface, but once LUO is
introduced, it can control KHO, and the debug interface becomes
optional.

Add a separate config CONFIG_KEXEC_HANDOVER_DEBUG that enables
the debugfs interface, and allows to inspect the tree.

Move all debugfs related code to a new file to keep the .c files
clear of ifdefs.

Co-developed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
---
 MAINTAINERS                      |   3 +-
 kernel/Kconfig.kexec             |  10 ++
 kernel/Makefile                  |   1 +
 kernel/kexec_handover.c          | 255 +++++--------------------------
 kernel/kexec_handover_debug.c    | 218 ++++++++++++++++++++++++++
 kernel/kexec_handover_internal.h |  44 ++++++
 6 files changed, 311 insertions(+), 220 deletions(-)
 create mode 100644 kernel/kexec_handover_debug.c
 create mode 100644 kernel/kexec_handover_internal.h
[...]
quoted
--- a/kernel/Kconfig.kexec
+++ b/kernel/Kconfig.kexec
@@ -109,6 +109,16 @@ config KEXEC_HANDOVER
        to keep data or state alive across the kexec. For this to work,
        both source and target kernels need to have this option enabled.

+config KEXEC_HANDOVER_DEBUG
Nit: can we call it KEXEC_HANDOVER_DEBUGFS instead? I think we would
like to add a KEXEC_HANDOVER_DEBUG at some point to control debug
asserts for KHO, and the naming would get confusing. And renaming config
symbols is kind of a pain.
Done.
quoted
+     bool "kexec handover debug interface"
+     depends on KEXEC_HANDOVER
+     depends on DEBUG_FS
+     help
+       Allow to control kexec handover device tree via debugfs
+       interface, i.e. finalize the state or aborting the finalization.
+       Also, enables inspecting the KHO fdt trees with the debugfs binary
+       blobs.
+
[...]

--
Regards,
Pratyush Yadav
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help