[PATCH v2 0/5] list private v2 & luo flb v9

Pasha Tatashin posted 5 patches 1 month, 3 weeks ago
Documentation/core-api/list.rst       |   9 +
Documentation/core-api/liveupdate.rst |  11 +
MAINTAINERS                           |   1 +
include/linux/kho/abi/luo.h           |  81 ++++
include/linux/list_private.h          | 256 ++++++++++
include/linux/liveupdate.h            | 147 ++++++
kernel/liveupdate/Makefile            |   1 +
kernel/liveupdate/luo_core.c          |   7 +-
kernel/liveupdate/luo_file.c          |  39 +-
kernel/liveupdate/luo_flb.c           | 654 ++++++++++++++++++++++++++
kernel/liveupdate/luo_internal.h      |  22 +-
lib/Kconfig.debug                     |  37 ++
lib/tests/Makefile                    |   2 +
lib/tests/list-private-test.c         |  76 +++
lib/tests/liveupdate.c                | 158 +++++++
15 files changed, 1487 insertions(+), 14 deletions(-)
create mode 100644 include/linux/list_private.h
create mode 100644 kernel/liveupdate/luo_flb.c
create mode 100644 lib/tests/list-private-test.c
create mode 100644 lib/tests/liveupdate.c
[PATCH v2 0/5] list private v2 & luo flb v9
Posted by Pasha Tatashin 1 month, 3 weeks ago
This series includes two separate workstreams. This is because FLB
should be applied on top of list_private, as it uses some of its
interfaces.

1. List private v2 (first 3 patches) Previous version:
https://lore.kernel.org/all/20251126185725.4164769-1-pasha.tatashin@soleen.com
For details, please read the cover letter from the previous submission.

v2 Changelog:
- Added a Reviewed-by from David Gow.

2. LUO FLB v9 (last 2 patches) Previous version:
https://lore.kernel.org/all/20251125225006.3722394-2-pasha.tatashin@soleen.com

v9 Changelog:
- Addressed suggestions from David Matlack and Pratyush Yadav: added
  booleans to track if an object was retrieved and/or finished.
- Modified the patches to use the list_private interfaces.

Pasha Tatashin (5):
  list: add primitives for private list manipulations
  list: add kunit test for private list primitives
  liveupdate: luo_file: Use private list
  liveupdate: luo_flb: Introduce File-Lifecycle-Bound global state
  tests/liveupdate: Add in-kernel liveupdate test

 Documentation/core-api/list.rst       |   9 +
 Documentation/core-api/liveupdate.rst |  11 +
 MAINTAINERS                           |   1 +
 include/linux/kho/abi/luo.h           |  81 ++++
 include/linux/list_private.h          | 256 ++++++++++
 include/linux/liveupdate.h            | 147 ++++++
 kernel/liveupdate/Makefile            |   1 +
 kernel/liveupdate/luo_core.c          |   7 +-
 kernel/liveupdate/luo_file.c          |  39 +-
 kernel/liveupdate/luo_flb.c           | 654 ++++++++++++++++++++++++++
 kernel/liveupdate/luo_internal.h      |  22 +-
 lib/Kconfig.debug                     |  37 ++
 lib/tests/Makefile                    |   2 +
 lib/tests/list-private-test.c         |  76 +++
 lib/tests/liveupdate.c                | 158 +++++++
 15 files changed, 1487 insertions(+), 14 deletions(-)
 create mode 100644 include/linux/list_private.h
 create mode 100644 kernel/liveupdate/luo_flb.c
 create mode 100644 lib/tests/list-private-test.c
 create mode 100644 lib/tests/liveupdate.c


base-commit: ea1013c1539270e372fc99854bc6e4d94eaeff66
-- 
2.52.0.313.g674ac2bdf7-goog
Re: [PATCH v2 0/5] list private v2 & luo flb v9
Posted by Andrew Morton 1 month, 3 weeks ago
On Thu, 18 Dec 2025 10:57:47 -0500 Pasha Tatashin <pasha.tatashin@soleen.com> wrote:

> This series includes two separate workstreams. This is because FLB
> should be applied on top of list_private, as it uses some of its
> interfaces.
> 
> 1. List private v2 (first 3 patches) Previous version:
> https://lore.kernel.org/all/20251126185725.4164769-1-pasha.tatashin@soleen.com
> For details, please read the cover letter from the previous submission.
> 
> v2 Changelog:
> - Added a Reviewed-by from David Gow.
> 
> 2. LUO FLB v9 (last 2 patches) Previous version:
> https://lore.kernel.org/all/20251125225006.3722394-2-pasha.tatashin@soleen.com

Please, no.

This patch series is intended for the Linux kernel.  Your grandchildren
will read the above wondering "what did granddad do".  It's just lazy
for us to expect readers to have to chase down links to earlier
versions and then to figure out what changed and why we changed it,
etc, etc.

Let's give our audience a nice, self-contained and complete description
of the proposed changes which doesn't refer them to the minute details
of the ongoing development process.  A process which is utterly
uninteresting three years from now.

IOW, can we please have a complete and standalone description of *this
patchset* which doesn't refer to earlier obsolete stuff?

Thanks.
Re: [PATCH v2 0/5] list private v2 & luo flb v9
Posted by Mike Rapoport 1 month, 3 weeks ago
On Thu, Dec 18, 2025 at 01:07:25PM -0800, Andrew Morton wrote:
> On Thu, 18 Dec 2025 10:57:47 -0500 Pasha Tatashin <pasha.tatashin@soleen.com> wrote:
> 
> > This series includes two separate workstreams. This is because FLB
> > should be applied on top of list_private, as it uses some of its
> > interfaces.
> > 
> > 1. List private v2 (first 3 patches) Previous version:
> > https://lore.kernel.org/all/20251126185725.4164769-1-pasha.tatashin@soleen.com
> > For details, please read the cover letter from the previous submission.
> > 
> > v2 Changelog:
> > - Added a Reviewed-by from David Gow.
> > 
> > 2. LUO FLB v9 (last 2 patches) Previous version:
> > https://lore.kernel.org/all/20251125225006.3722394-2-pasha.tatashin@soleen.com
> 
> Please, no.
> 
> This patch series is intended for the Linux kernel.  Your grandchildren
> will read the above wondering "what did granddad do".  It's just lazy
> for us to expect readers to have to chase down links to earlier
> versions and then to figure out what changed and why we changed it,
> etc, etc.
> 
> Let's give our audience a nice, self-contained and complete description
> of the proposed changes which doesn't refer them to the minute details
> of the ongoing development process.  A process which is utterly
> uninteresting three years from now.
> 
> IOW, can we please have a complete and standalone description of *this
> patchset* which doesn't refer to earlier obsolete stuff?

And I would even say this should be two patchsets, one with private list
and the other one with FLB.
 
> Thanks.

-- 
Sincerely yours,
Mike.
Re: [PATCH v2 0/5] list private v2 & luo flb v9
Posted by Pasha Tatashin 1 month, 3 weeks ago
On Fri, Dec 19, 2025 at 3:46 PM Mike Rapoport <rppt@kernel.org> wrote:
>
> On Thu, Dec 18, 2025 at 01:07:25PM -0800, Andrew Morton wrote:
> > On Thu, 18 Dec 2025 10:57:47 -0500 Pasha Tatashin <pasha.tatashin@soleen.com> wrote:
> >
> > > This series includes two separate workstreams. This is because FLB
> > > should be applied on top of list_private, as it uses some of its
> > > interfaces.
> > >
> > > 1. List private v2 (first 3 patches) Previous version:
> > > https://lore.kernel.org/all/20251126185725.4164769-1-pasha.tatashin@soleen.com
> > > For details, please read the cover letter from the previous submission.
> > >
> > > v2 Changelog:
> > > - Added a Reviewed-by from David Gow.
> > >
> > > 2. LUO FLB v9 (last 2 patches) Previous version:
> > > https://lore.kernel.org/all/20251125225006.3722394-2-pasha.tatashin@soleen.com
> >
> > Please, no.
> >
> > This patch series is intended for the Linux kernel.  Your grandchildren
> > will read the above wondering "what did granddad do".  It's just lazy
> > for us to expect readers to have to chase down links to earlier
> > versions and then to figure out what changed and why we changed it,
> > etc, etc.
> >
> > Let's give our audience a nice, self-contained and complete description
> > of the proposed changes which doesn't refer them to the minute details
> > of the ongoing development process.  A process which is utterly
> > uninteresting three years from now.
> >
> > IOW, can we please have a complete and standalone description of *this
> > patchset* which doesn't refer to earlier obsolete stuff?
>
> And I would even say this should be two patchsets, one with private list
> and the other one with FLB.

They are not bundled, I sent them together only because FLB was
already in Andrew's tree, but it should be placed after private list
(since private list patch series deletes the LUO private list iterator
macro), now they are properly placed, and the private list can be
merged before FLB.

Pasha

>
> > Thanks.
>
> --
> Sincerely yours,
> Mike.
Re: [PATCH v2 0/5] list private v2 & luo flb v9
Posted by Pasha Tatashin 1 month, 3 weeks ago
On Thu, Dec 18, 2025 at 4:07 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Thu, 18 Dec 2025 10:57:47 -0500 Pasha Tatashin <pasha.tatashin@soleen.com> wrote:
>
> > This series includes two separate workstreams. This is because FLB
> > should be applied on top of list_private, as it uses some of its
> > interfaces.
> >
> > 1. List private v2 (first 3 patches) Previous version:
> > https://lore.kernel.org/all/20251126185725.4164769-1-pasha.tatashin@soleen.com
> > For details, please read the cover letter from the previous submission.
> >
> > v2 Changelog:
> > - Added a Reviewed-by from David Gow.
> >
> > 2. LUO FLB v9 (last 2 patches) Previous version:
> > https://lore.kernel.org/all/20251125225006.3722394-2-pasha.tatashin@soleen.com
>
> Please, no.
>
> This patch series is intended for the Linux kernel.  Your grandchildren
> will read the above wondering "what did granddad do".  It's just lazy
> for us to expect readers to have to chase down links to earlier
> versions and then to figure out what changed and why we changed it,
> etc, etc.
>
> Let's give our audience a nice, self-contained and complete description
> of the proposed changes which doesn't refer them to the minute details
> of the ongoing development process.  A process which is utterly
> uninteresting three years from now.
>
> IOW, can we please have a complete and standalone description of *this
> patchset* which doesn't refer to earlier obsolete stuff?

Hi Andrew,

Point taken. You are right; the cover letter should be self-contained
and stand on its own for future readers. Here is the standalone
description of this patch series:

This series introduces two connected infrastructure improvements: a
new API for handling private linked lists, and the
"File-Lifecycle-Bound" (FLB) mechanism for the Live Update
Orchestrator.

1. Private List Primitives (patches 1-3)
Recently, Linux introduced the ability to mark structure members as
__private and access them via ACCESS_PRIVATE(). This enforces better
encapsulation by ensuring internal details are only accessible by the
owning subsystem.

However, struct list_head is frequently used as an internal linkage
mechanism within these private sections. The standard macros in
<linux/list.h> do not support ACCESS_PRIVATE() natively. Consequently,
subsystems using private lists are forced to implement ad-hoc
workarounds or local iterator macros.

This series adds <linux/list_private.h>, providing a set of primitives
identical to those in <linux/list.h> but designed for private list
heads. It also includes a KUnit test suite to verify that the macros
correctly handle pointer offsets and qualifiers.

2. This series adds FLB (patches 4-5) support to Live Update that also
internally uses private lists.

FLB allows global kernel state (such as IOMMU domains or HugeTLB
state) to be preserved once, shared across multiple file descriptors,
and restored when needed. This is necessary for subsystems where
multiple preserved file descriptors depend on a single, shared
underlying resource. Preserving this state for each individual file
would be redundant and incorrect.

FLB uses reference counting tied to the lifecycle of preserved files.
The state is preserved when the first file depending on it is
preserved, and restored or cleaned up only when the last file is
handled.

Changelog:
List-Private v2:
- Added a Reviewed-by from David Gow.
FLB v9:
- Addressed suggestions from David Matlack and Pratyush Yadav: added
  booleans to track if an object was retrieved and/or finished.
- Modified the patches to use the list_private interfaces.

Previous submissions:
List-Private:
v1 https://lore.kernel.org/all/20251126185725.4164769-1-pasha.tatashin@soleen.com

FLB:
v8 https://lore.kernel.org/all/20251125225006.3722394-2-pasha.tatashin@soleen.com

Thank you,
Pasha
Re: [PATCH v2 0/5] list private v2 & luo flb v9
Posted by Andrew Morton 1 month, 3 weeks ago
On Thu, 18 Dec 2025 17:30:45 -0500 Pasha Tatashin <pasha.tatashin@soleen.com> wrote:

> Point taken. You are right; the cover letter should be self-contained
> and stand on its own for future readers. Here is the standalone
> description of this patch series:
> 
> ...
>

Cool, thanks, pasted.