selftests: kho: test with deferred struct page initEnable DEFERRED_STRUCT_PAGE_INIT which depends on SMP.Also enable additional debugging options.Signed-off-by: Michal Clapinski <mclapinski@goog
selftests: kho: test with deferred struct page initEnable DEFERRED_STRUCT_PAGE_INIT which depends on SMP.Also enable additional debugging options.Signed-off-by: Michal Clapinski <mclapinski@google.com>Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>Acked-by: Pasha Tatashin <pasha.tatashin@soleen.com>Reviewed-by: Pratyush Yadav (Google) <pratyush@kernel.org>Link: https://patch.msgid.link/20260423122538.140993-4-mclapinski@google.comSigned-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
show more ...
kho: remove finalize state and clientsEliminate the `kho_finalize()` function and its associated state from theKHO subsystem. The transition to a radix tree for memory tracking makesthe explicit
kho: remove finalize state and clientsEliminate the `kho_finalize()` function and its associated state from theKHO subsystem. The transition to a radix tree for memory tracking makesthe explicit "finalize" state and its serialization step obsolete.Remove the `kho_finalize()` and `kho_finalized()` APIs and their stubimplementations. Update KHO client code and the debugfs interface to nolonger call or depend on the `kho_finalize()` mechanism.Complete the move towards a stateless KHO, simplifying the overall designby removing unnecessary state management.Link: https://lkml.kernel.org/r/20260206021428.3386442-3-jasonmiu@google.comSigned-off-by: Jason Miu <jasonmiu@google.com>Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>Cc: Alexander Graf <graf@amazon.com>Cc: Baoquan He <bhe@redhat.com>Cc: Changyuan Lyu <changyuanl@google.com>Cc: David Matlack <dmatlack@google.com>Cc: David Rientjes <rientjes@google.com>Cc: Jason Gunthorpe <jgg@nvidia.com>Cc: Pratyush Yadav <pratyush@kernel.org>Cc: Ran Xiaokai <ran.xiaokai@zte.com.cn>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kho: make debugfs interface optionalPatch series "liveupdate: Rework KHO for in-kernel users", v9.This series refactors the KHO framework to better support in-kernel userslike the upcoming LUO.
kho: make debugfs interface optionalPatch series "liveupdate: Rework KHO for in-kernel users", v9.This series refactors the KHO framework to better support in-kernel userslike the upcoming LUO. The current design, which relies on a notifierchain and debugfs for control, is too restrictive for direct programmaticuse.The core of this rework is the removal of the notifier chain in favor of adirect registration API. This decouples clients from the shutdown-timefinalization sequence, allowing them to manage their preserved state moreflexibly and at any time.In support of this new model, this series also: - Makes the debugfs interface optional. - Introduces APIs to unpreserve memory and fixes a bug in the abort path where client state was being incorrectly discarded. Note that this is an interim step, as a more comprehensive fix is planned as part of the stateless KHO work [1]. - Moves all KHO code into a new kernel/liveupdate/ directory to consolidate live update components.This patch (of 9):Currently, KHO is controlled via debugfs interface, but once LUO isintroduced, it can control KHO, and the debug interface becomes optional.Add a separate config CONFIG_KEXEC_HANDOVER_DEBUGFS that enables thedebugfs interface, and allows to inspect the tree.Move all debugfs related code to a new file to keep the .c files clear ofifdefs.Link: https://lkml.kernel.org/r/20251101142325.1326536-1-pasha.tatashin@soleen.comLink: https://lkml.kernel.org/r/20251101142325.1326536-2-pasha.tatashin@soleen.comLink: https://lore.kernel.org/all/20251020100306.2709352-1-jasonmiu@google.com [1]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>Reviewed-by: Pratyush Yadav <pratyush@kernel.org>Cc: Alexander Graf <graf@amazon.com>Cc: Christian Brauner <brauner@kernel.org>Cc: Jason Gunthorpe <jgg@ziepe.ca>Cc: Jonathan Corbet <corbet@lwn.net>Cc: Masahiro Yamada <masahiroy@kernel.org>Cc: Miguel Ojeda <ojeda@kernel.org>Cc: Randy Dunlap <rdunlap@infradead.org>Cc: Tejun Heo <tj@kernel.org>Cc: Changyuan Lyu <changyuanl@google.com>Cc: Jason Gunthorpe <jgg@nvidia.com>Cc: Simon Horman <horms@kernel.org>Cc: Zhu Yanjun <yanjun.zhu@linux.dev>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
selftest/kho: update generation of initrdUse nolibc include directory rather than include a cumulative nolibc.h onthe compiler command line and replace use of 'sudo cpio' withusr/gen_init_cpio.
selftest/kho: update generation of initrdUse nolibc include directory rather than include a cumulative nolibc.h onthe compiler command line and replace use of 'sudo cpio' withusr/gen_init_cpio.While on it fix spelling of KHO_FINALIZELink: https://lkml.kernel.org/r/20250811082510.4154080-4-rppt@kernel.orgSigned-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>Suggested-by: Thomas Weißschuh <linux@weissschuh.net>Cc: Alexander Graf <graf@amazon.com>Cc: Baoquan He <bhe@redhat.com>Cc: Changyuan Lyu <changyuanl@google.com>Cc: Pasha Tatashin <pasha.tatashin@soleen.com>Cc: Pratyush Yadav <pratyush@kernel.org>Cc: Shuah Khan <shuah@kernel.org>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kho: add test for kexec handoverTesting kexec handover requires a kernel driver that will generate somedata and preserve it with KHO on the first boot and then restore that dataand verify it was
kho: add test for kexec handoverTesting kexec handover requires a kernel driver that will generate somedata and preserve it with KHO on the first boot and then restore that dataand verify it was preserved properly after kexec.To facilitate such test, along with the kernel driver responsible for datageneration, preservation and restoration add a script that runs a kernelin a VM with a minimal /init. The /init enables KHO, loads a kernel imagefor kexec and runs kexec reboot. After the boot of the kexeced kernel,the driver verifies that the data was properly preserved.[rppt@kernel.org: fix section mismatch] Link: https://lkml.kernel.org/r/aIiRC8fXiOXKbPM_@kernel.orgLink: https://lkml.kernel.org/r/20250727083733.2590139-1-rppt@kernel.orgSigned-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>Cc: Alexander Graf <graf@amazon.com>Cc: Changyuan Lyu <changyuanl@google.com>Cc: Pasha Tatashin <pasha.tatashin@soleen.com>Cc: Pratyush Yadav <pratyush@kernel.org>Cc: Shuah Khan <shuah@kernel.org>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>