<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/liveupdate, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-11-27T22:24:42+00:00</updated>
<entry>
<title>selftests/liveupdate: add kexec test for multiple and empty sessions</title>
<updated>2025-11-27T22:24:42+00:00</updated>
<author>
<name>Pasha Tatashin</name>
<email>pasha.tatashin@soleen.com</email>
</author>
<published>2025-11-25T16:58:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=724bf8c5595a1219427f6e779563859d63948b5a'/>
<id>urn:sha1:724bf8c5595a1219427f6e779563859d63948b5a</id>
<content type='text'>
Introduce a new kexec-based selftest, luo_kexec_multi_session, to validate
the end-to-end lifecycle of a more complex LUO scenario.

While the existing luo_kexec_simple test covers the basic end-to-end
lifecycle, it is limited to a single session with one preserved file. 
This new test significantly expands coverage by verifying LUO's ability to
handle a mixed workload involving multiple sessions, some of which are
intentionally empty.  This ensures that the LUO core correctly preserves
and restores the state of all session types across a reboot.

The test validates the following sequence:

Stage 1 (Pre-kexec):

  - Creates two empty test sessions (multi-test-empty-1,
    multi-test-empty-2).
  - Creates a session with one preserved memfd (multi-test-files-1).
  - Creates another session with two preserved memfds
    (multi-test-files-2), each containing unique data.
  - Creates a state-tracking session to manage the transition to
    Stage 2.
  - Executes a kexec reboot via the helper script.

Stage 2 (Post-kexec):

  - Retrieves the state-tracking session to confirm it is in the
    post-reboot stage.
  - Retrieves all four test sessions (both the empty and non-empty
    ones).
  - For the non-empty sessions, restores the preserved memfds and
    verifies their contents match the original data patterns.
  - Finalizes all test sessions and the state session to ensure a clean
    teardown and that all associated kernel resources are correctly
    released.

This test provides greater confidence in the robustness of the LUO
framework by validating its behavior in a more realistic, multi-faceted
scenario.

Link: https://lkml.kernel.org/r/20251125165850.3389713-19-pasha.tatashin@soleen.com
Signed-off-by: Pasha Tatashin &lt;pasha.tatashin@soleen.com&gt;
Reviewed-by: Mike Rapoport (Microsoft) &lt;rppt@kernel.org&gt;
Tested-by: David Matlack &lt;dmatlack@google.com&gt;
Cc: Aleksander Lobakin &lt;aleksander.lobakin@intel.com&gt;
Cc: Alexander Graf &lt;graf@amazon.com&gt;
Cc: Alice Ryhl &lt;aliceryhl@google.com&gt;
Cc: Andriy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: anish kumar &lt;yesanishhere@gmail.com&gt;
Cc: Anna Schumaker &lt;anna.schumaker@oracle.com&gt;
Cc: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Borislav Betkov &lt;bp@alien8.de&gt;
Cc: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Cc: Chen Ridong &lt;chenridong@huawei.com&gt;
Cc: Chris Li &lt;chrisl@kernel.org&gt;
Cc: Christian Brauner &lt;brauner@kernel.org&gt;
Cc: Daniel Wagner &lt;wagi@kernel.org&gt;
Cc: Danilo Krummrich &lt;dakr@kernel.org&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: David Hildenbrand &lt;david@redhat.com&gt;
Cc: David Jeffery &lt;djeffery@redhat.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Guixin Liu &lt;kanie@linux.alibaba.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Ira Weiny &lt;ira.weiny@intel.com&gt;
Cc: Jann Horn &lt;jannh@google.com&gt;
Cc: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Joanthan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Joel Granados &lt;joel.granados@kernel.org&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Lennart Poettering &lt;lennart@poettering.net&gt;
Cc: Leon Romanovsky &lt;leon@kernel.org&gt;
Cc: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Cc: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: Marc Rutland &lt;mark.rutland@arm.com&gt;
Cc: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Cc: Matthew Maurer &lt;mmaurer@google.com&gt;
Cc: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Cc: Myugnjoo Ham &lt;myungjoo.ham@samsung.com&gt;
Cc: Parav Pandit &lt;parav@nvidia.com&gt;
Cc: Pratyush Yadav &lt;pratyush@kernel.org&gt;
Cc: Pratyush Yadav &lt;ptyadav@amazon.de&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Roman Gushchin &lt;roman.gushchin@linux.dev&gt;
Cc: Saeed Mahameed &lt;saeedm@nvidia.com&gt;
Cc: Samiullah Khawaja &lt;skhawaja@google.com&gt;
Cc: Song Liu &lt;song@kernel.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Stuart Hayes &lt;stuart.w.hayes@gmail.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Thomas Gleinxer &lt;tglx@linutronix.de&gt;
Cc: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Cc: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Cc: William Tu &lt;witu@nvidia.com&gt;
Cc: Yoann Congal &lt;yoann.congal@smile.fr&gt;
Cc: Zhu Yanjun &lt;yanjun.zhu@linux.dev&gt;
Cc: Zijun Hu &lt;quic_zijuhu@quicinc.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/liveupdate: add simple kexec-based selftest for LUO</title>
<updated>2025-11-27T22:24:41+00:00</updated>
<author>
<name>Pasha Tatashin</name>
<email>pasha.tatashin@soleen.com</email>
</author>
<published>2025-11-25T16:58:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a003bdb9ec4e12c869b9c8641dd9bebf90ac0389'/>
<id>urn:sha1:a003bdb9ec4e12c869b9c8641dd9bebf90ac0389</id>
<content type='text'>
Introduce a kexec-based selftest, luo_kexec_simple, to validate the
end-to-end lifecycle of a Live Update Orchestrator session across a
reboot.

While existing tests verify the uAPI in a pre-reboot context, this test
ensures that the core functionality—preserving state via Kexec Handover
and restoring it in a new kernel—works as expected.

The test operates in two stages, managing its state across the reboot by
preserving a dedicated "state session" containing a memfd.  This mechanism
dogfoods the LUO feature itself for state tracking, making the test
self-contained.

The test validates the following sequence:

Stage 1 (Pre-kexec):
 - Creates a test session (test-session).
 - Creates and preserves a memfd with a known data pattern into the test
   session.
 - Creates the state-tracking session to signal progression to Stage 2.
 - Executes a kexec reboot via a helper script.

Stage 2 (Post-kexec):
 - Retrieves the state-tracking session to confirm it is in the
   post-reboot stage.
 - Retrieves the preserved test session.
 - Restores the memfd from the test session and verifies its contents
   match the original data pattern written in Stage 1.
 - Finalizes both the test and state sessions to ensure a clean
   teardown.

The test relies on a helper script (do_kexec.sh) to perform the reboot and
a shared utility library (luo_test_utils.c) for common LUO operations,
keeping the main test logic clean and focused.

Link: https://lkml.kernel.org/r/20251125165850.3389713-18-pasha.tatashin@soleen.com
Signed-off-by: Pasha Tatashin &lt;pasha.tatashin@soleen.com&gt;
Reviewed-by: Zhu Yanjun &lt;yanjun.zhu@linux.dev&gt;
Reviewed-by: Mike Rapoport (Microsoft) &lt;rppt@kernel.org&gt;
Tested-by: David Matlack &lt;dmatlack@google.com&gt;
Cc: Aleksander Lobakin &lt;aleksander.lobakin@intel.com&gt;
Cc: Alexander Graf &lt;graf@amazon.com&gt;
Cc: Alice Ryhl &lt;aliceryhl@google.com&gt;
Cc: Andriy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: anish kumar &lt;yesanishhere@gmail.com&gt;
Cc: Anna Schumaker &lt;anna.schumaker@oracle.com&gt;
Cc: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Borislav Betkov &lt;bp@alien8.de&gt;
Cc: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Cc: Chen Ridong &lt;chenridong@huawei.com&gt;
Cc: Chris Li &lt;chrisl@kernel.org&gt;
Cc: Christian Brauner &lt;brauner@kernel.org&gt;
Cc: Daniel Wagner &lt;wagi@kernel.org&gt;
Cc: Danilo Krummrich &lt;dakr@kernel.org&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: David Hildenbrand &lt;david@redhat.com&gt;
Cc: David Jeffery &lt;djeffery@redhat.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Guixin Liu &lt;kanie@linux.alibaba.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Ira Weiny &lt;ira.weiny@intel.com&gt;
Cc: Jann Horn &lt;jannh@google.com&gt;
Cc: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Joanthan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Joel Granados &lt;joel.granados@kernel.org&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Lennart Poettering &lt;lennart@poettering.net&gt;
Cc: Leon Romanovsky &lt;leon@kernel.org&gt;
Cc: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Cc: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: Marc Rutland &lt;mark.rutland@arm.com&gt;
Cc: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Cc: Matthew Maurer &lt;mmaurer@google.com&gt;
Cc: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Cc: Myugnjoo Ham &lt;myungjoo.ham@samsung.com&gt;
Cc: Parav Pandit &lt;parav@nvidia.com&gt;
Cc: Pratyush Yadav &lt;pratyush@kernel.org&gt;
Cc: Pratyush Yadav &lt;ptyadav@amazon.de&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Roman Gushchin &lt;roman.gushchin@linux.dev&gt;
Cc: Saeed Mahameed &lt;saeedm@nvidia.com&gt;
Cc: Samiullah Khawaja &lt;skhawaja@google.com&gt;
Cc: Song Liu &lt;song@kernel.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Stuart Hayes &lt;stuart.w.hayes@gmail.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Thomas Gleinxer &lt;tglx@linutronix.de&gt;
Cc: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Cc: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Cc: William Tu &lt;witu@nvidia.com&gt;
Cc: Yoann Congal &lt;yoann.congal@smile.fr&gt;
Cc: Zijun Hu &lt;quic_zijuhu@quicinc.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/liveupdate: add userspace API selftests</title>
<updated>2025-11-27T22:24:41+00:00</updated>
<author>
<name>Pasha Tatashin</name>
<email>pasha.tatashin@soleen.com</email>
</author>
<published>2025-11-25T16:58:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=80bab43f6f235664fff2d3518b3901ba9c4ac5a3'/>
<id>urn:sha1:80bab43f6f235664fff2d3518b3901ba9c4ac5a3</id>
<content type='text'>
Introduce a selftest suite for LUO.  These tests validate the core
userspace-facing API provided by the /dev/liveupdate device and its
associated ioctls.

The suite covers fundamental device behavior, session management, and the
file preservation mechanism using memfd as a test case.  This provides
regression testing for the LUO uAPI.

The following functionality is verified:

Device Access:
    Basic open and close operations on /dev/liveupdate.
    Enforcement of exclusive device access (verifying EBUSY on a
    second open).

Session Management:
    Successful creation of sessions with unique names.
    Failure to create sessions with duplicate names.

File Preservation:
    Preserving a single memfd and verifying its content remains
    intact post-preservation.
    Preserving multiple memfds within a single session, each with
    unique data.
    A complex scenario involving multiple sessions, each containing
    a mix of empty and data-filled memfds.

Note: This test suite is limited to verifying the pre-kexec functionality
of LUO (e.g., session creation, file preservation).  The post-kexec
restoration of resources is not covered, as the kselftest framework does
not currently support orchestrating a reboot and continuing execution in
the new kernel.

Link: https://lkml.kernel.org/r/20251125165850.3389713-17-pasha.tatashin@soleen.com
Signed-off-by: Pasha Tatashin &lt;pasha.tatashin@soleen.com&gt;
Reviewed-by: Pratyush Yadav &lt;pratyush@kernel.org&gt;
Reviewed-by: Mike Rapoport (Microsoft) &lt;rppt@kernel.org&gt;
Tested-by: David Matlack &lt;dmatlack@google.com&gt;
Cc: Aleksander Lobakin &lt;aleksander.lobakin@intel.com&gt;
Cc: Alexander Graf &lt;graf@amazon.com&gt;
Cc: Alice Ryhl &lt;aliceryhl@google.com&gt;
Cc: Andriy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: anish kumar &lt;yesanishhere@gmail.com&gt;
Cc: Anna Schumaker &lt;anna.schumaker@oracle.com&gt;
Cc: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Borislav Betkov &lt;bp@alien8.de&gt;
Cc: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Cc: Chen Ridong &lt;chenridong@huawei.com&gt;
Cc: Chris Li &lt;chrisl@kernel.org&gt;
Cc: Christian Brauner &lt;brauner@kernel.org&gt;
Cc: Daniel Wagner &lt;wagi@kernel.org&gt;
Cc: Danilo Krummrich &lt;dakr@kernel.org&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: David Hildenbrand &lt;david@redhat.com&gt;
Cc: David Jeffery &lt;djeffery@redhat.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Guixin Liu &lt;kanie@linux.alibaba.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Ira Weiny &lt;ira.weiny@intel.com&gt;
Cc: Jann Horn &lt;jannh@google.com&gt;
Cc: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Joanthan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Joel Granados &lt;joel.granados@kernel.org&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Lennart Poettering &lt;lennart@poettering.net&gt;
Cc: Leon Romanovsky &lt;leon@kernel.org&gt;
Cc: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Cc: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: Marc Rutland &lt;mark.rutland@arm.com&gt;
Cc: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Cc: Matthew Maurer &lt;mmaurer@google.com&gt;
Cc: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Cc: Myugnjoo Ham &lt;myungjoo.ham@samsung.com&gt;
Cc: Parav Pandit &lt;parav@nvidia.com&gt;
Cc: Pratyush Yadav &lt;ptyadav@amazon.de&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Roman Gushchin &lt;roman.gushchin@linux.dev&gt;
Cc: Saeed Mahameed &lt;saeedm@nvidia.com&gt;
Cc: Samiullah Khawaja &lt;skhawaja@google.com&gt;
Cc: Song Liu &lt;song@kernel.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Stuart Hayes &lt;stuart.w.hayes@gmail.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Thomas Gleinxer &lt;tglx@linutronix.de&gt;
Cc: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Cc: Vincent Guittot &lt;vincent.guittot@linaro.org&gt;
Cc: William Tu &lt;witu@nvidia.com&gt;
Cc: Yoann Congal &lt;yoann.congal@smile.fr&gt;
Cc: Zhu Yanjun &lt;yanjun.zhu@linux.dev&gt;
Cc: Zijun Hu &lt;quic_zijuhu@quicinc.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
</feed>
