From: Pratyush Yadav <pratyush@kernel.org>
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: linux-kselftest@vger.kernel.org, rppt@kernel.org,
shuah@kernel.org, akpm@linux-foundation.org,
linux-mm@kvack.org, skhan@linuxfoundation.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
corbet@lwn.net, dmatlack@google.com, kexec@lists.infradead.org,
pratyush@kernel.org, skhawaja@google.com, graf@amazon.com
Subject: Re: [PATCH v2 01/10] liveupdate: centralize state management into struct luo_ser
Date: Mon, 25 May 2026 18:24:19 +0200 [thread overview]
Message-ID: <2vxz7bor78zw.fsf@kernel.org> (raw)
In-Reply-To: <20260514222628.931312-2-pasha.tatashin@soleen.com> (Pasha Tatashin's message of "Thu, 14 May 2026 22:26:19 +0000")
On Thu, May 14 2026, Pasha Tatashin wrote:
> Transition the LUO to ABI v2, which centralizes state management into a
> single struct luo_ser header.
>
> Previously, LUO state was spread across multiple FDT properties and
> subnodes. ABI v2 simplifies this by placing all core state, including
> the liveupdate number and physical addresses for sessions and FLB
> headers into a centralized struct luo_ser.
Makes a lot of sense I think.
But nit: this brings about a semantic difference: now sessions and FLB
serialization format is no longer independent of LUO. I think that makes
sense but can you please spell that out in the commit message.
>
> Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
> ---
> include/linux/kho/abi/luo.h | 91 +++++++++++---------------------
> kernel/liveupdate/luo_core.c | 59 ++++++++++++++-------
> kernel/liveupdate/luo_flb.c | 65 ++++-------------------
> kernel/liveupdate/luo_internal.h | 8 +--
> kernel/liveupdate/luo_session.c | 57 +++-----------------
> 5 files changed, 93 insertions(+), 187 deletions(-)
>
> diff --git a/include/linux/kho/abi/luo.h b/include/linux/kho/abi/luo.h
> index 46750a0ddf88..1b2f865a771a 100644
> --- a/include/linux/kho/abi/luo.h
> +++ b/include/linux/kho/abi/luo.h
> @@ -30,52 +30,25 @@
> * .. code-block:: none
> *
> * / {
> - * compatible = "luo-v1";
> - * liveupdate-number = <...>;
> - *
> - * luo-session {
> - * compatible = "luo-session-v1";
> - * luo-session-header = <phys_addr_of_session_header_ser>;
> - * };
> - *
> - * luo-flb {
> - * compatible = "luo-flb-v1";
> - * luo-flb-header = <phys_addr_of_flb_header_ser>;
> - * };
> + * compatible = "luo-v2";
> + * luo-abi-header = <phys_addr_of_luo_ser>;
While you are at it, perhaps also get rid of the LUO FDT entirely? With
this change it only holds the compatible and a pointer to a blob. Might
as well move the compatible string to the blob and use it directly. Do
you see any benefits of sticking with the FDT here? We have already
removed it from memfd for example (and AFAIK the upcoming PCI and VFIO
patches also do not use it).
> * };
> *
> * Main LUO Node (/):
> *
> - * - compatible: "luo-v1"
> + * - compatible: "luo-v2"
> * Identifies the overall LUO ABI version.
> - * - liveupdate-number: u64
> - * A counter tracking the number of successful live updates performed.
> @@ -109,13 +82,26 @@
>
> /*
> * The LUO FDT hooks all LUO state for sessions, fds, etc.
> - * In the root it also carries "liveupdate-number" 64-bit property that
> - * corresponds to the number of live-updates performed on this machine.
> */
> #define LUO_FDT_SIZE PAGE_SIZE
> #define LUO_FDT_KHO_ENTRY_NAME "LUO"
> -#define LUO_FDT_COMPATIBLE "luo-v1"
> -#define LUO_FDT_LIVEUPDATE_NUM "liveupdate-number"
> +#define LUO_FDT_COMPATIBLE "luo-v2"
> +#define LUO_FDT_ABI_HEADER "luo-abi-header"
Nit: If we do go with FDT, I suppose "luo-ser-pa" (or "luo-ser"?) would
be more descriptive?
> +
> +/**
> + * struct luo_ser - Centralized LUO ABI header.
> diff --git a/kernel/liveupdate/luo_flb.c b/kernel/liveupdate/luo_flb.c
> index 8f5c5dd01cd0..7ccc59981297 100644
> --- a/kernel/liveupdate/luo_flb.c
> +++ b/kernel/liveupdate/luo_flb.c
> @@ -159,8 +159,8 @@ static void luo_flb_file_unpreserve_one(struct liveupdate_flb *flb)
>
> static int luo_flb_retrieve_one(struct liveupdate_flb *flb)
> {
> - struct luo_flb_private *private = luo_flb_get_private(flb);
> struct luo_flb_header *fh = &luo_flb_global.incoming;
> + struct luo_flb_private *private = luo_flb_get_private(flb);
Nit: this doesn't seem to do anything. Is this a stray change?
> struct liveupdate_flb_op_args args = {0};
> bool found = false;
> int err;
> -int __init luo_flb_setup_incoming(void *fdt_in)
> +void __init luo_flb_setup_incoming(u64 flbs_pa)
> {
> struct luo_flb_header_ser *header_ser;
> - int err, header_size, offset;
> - const void *ptr;
> - u64 header_ser_pa;
> -
> - offset = fdt_subnode_offset(fdt_in, 0, LUO_FDT_FLB_NODE_NAME);
> - if (offset < 0) {
> - pr_err("Unable to get FLB node [%s]\n", LUO_FDT_FLB_NODE_NAME);
>
> - return -ENOENT;
> + if (flbs_pa) {
> + header_ser = phys_to_virt(flbs_pa);
> + luo_flb_global.incoming.header_ser = header_ser;
> + luo_flb_global.incoming.ser = (void *)(header_ser + 1);
> + luo_flb_global.incoming.active = true;
Nit: Not getting FLB data resulted in a error print. I suppose we should
keep that here as well.
> }
> -
> - err = fdt_node_check_compatible(fdt_in, offset,
> - LUO_FDT_FLB_COMPATIBLE);
> - if (err) {
> - pr_err("FLB node is incompatible with '%s' [%d]\n",
> - LUO_FDT_FLB_COMPATIBLE, err);
> -
> - return -EINVAL;
> - }
> -
> - header_size = 0;
> - ptr = fdt_getprop(fdt_in, offset, LUO_FDT_FLB_HEADER, &header_size);
> - if (!ptr || header_size != sizeof(u64)) {
> - pr_err("Unable to get FLB header property '%s' [%d]\n",
> - LUO_FDT_FLB_HEADER, header_size);
> -
> - return -EINVAL;
> - }
> -
> - header_ser_pa = get_unaligned((u64 *)ptr);
> - header_ser = phys_to_virt(header_ser_pa);
> -
> - luo_flb_global.incoming.header_ser = header_ser;
> - luo_flb_global.incoming.ser = (void *)(header_ser + 1);
> - luo_flb_global.incoming.active = true;
> -
> - return 0;
> }
>
> /**
> -int __init luo_session_setup_incoming(void *fdt_in)
> +int __init luo_session_setup_incoming(u64 sessions_pa)
> {
> struct luo_session_header_ser *header_ser;
> - int err, header_size, offset;
> - u64 header_ser_pa;
> - const void *ptr;
> -
> - offset = fdt_subnode_offset(fdt_in, 0, LUO_FDT_SESSION_NODE_NAME);
> - if (offset < 0) {
> - pr_err("Unable to get session node: [%s]\n",
> - LUO_FDT_SESSION_NODE_NAME);
> - return -EINVAL;
> - }
>
> - err = fdt_node_check_compatible(fdt_in, offset,
> - LUO_FDT_SESSION_COMPATIBLE);
> - if (err) {
> - pr_err("Session node incompatible [%s]\n",
> - LUO_FDT_SESSION_COMPATIBLE);
> - return -EINVAL;
> - }
> -
> - header_size = 0;
> - ptr = fdt_getprop(fdt_in, offset, LUO_FDT_SESSION_HEADER, &header_size);
> - if (!ptr || header_size != sizeof(u64)) {
> - pr_err("Unable to get session header '%s' [%d]\n",
> - LUO_FDT_SESSION_HEADER, header_size);
> - return -EINVAL;
> + if (sessions_pa) {
Nit: same thing about the error print here.
> + header_ser = phys_to_virt(sessions_pa);
> + luo_session_global.incoming.header_ser = header_ser;
> + luo_session_global.incoming.ser = (void *)(header_ser + 1);
> + luo_session_global.incoming.active = true;
> }
>
> - header_ser_pa = get_unaligned((u64 *)ptr);
> - header_ser = phys_to_virt(header_ser_pa);
> -
> - luo_session_global.incoming.header_ser = header_ser;
> - luo_session_global.incoming.ser = (void *)(header_ser + 1);
> - luo_session_global.incoming.active = true;
> -
> return 0;
> }
--
Regards,
Pratyush Yadav
next prev parent reply other threads:[~2026-05-25 16:24 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 22:26 [PATCH v2 00/10] liveupdate: Remove limits on the number of files and sessions Pasha Tatashin
2026-05-14 22:26 ` [PATCH v2 01/10] liveupdate: centralize state management into struct luo_ser Pasha Tatashin
2026-05-17 17:20 ` Mike Rapoport
2026-05-17 18:36 ` Pasha Tatashin
2026-05-25 16:24 ` Pratyush Yadav [this message]
2026-05-14 22:26 ` [PATCH v2 02/10] liveupdate: Extract luo_file_deserialize_one helper Pasha Tatashin
2026-05-17 17:24 ` Mike Rapoport
2026-05-17 18:37 ` Pasha Tatashin
2026-05-25 16:26 ` Pratyush Yadav
2026-05-14 22:26 ` [PATCH v2 03/10] liveupdate: Extract luo_session_deserialize_one helper Pasha Tatashin
2026-05-17 17:25 ` Mike Rapoport
2026-05-25 16:27 ` Pratyush Yadav
2026-05-14 22:26 ` [PATCH v2 04/10] liveupdate: add support for linked-block serialization Pasha Tatashin
2026-05-17 17:26 ` Mike Rapoport
2026-05-17 18:40 ` Pasha Tatashin
2026-05-14 22:26 ` [PATCH v2 05/10] liveupdate: defer session block allocation and PA setting Pasha Tatashin
2026-05-17 17:31 ` Mike Rapoport
2026-05-17 18:52 ` Pasha Tatashin
2026-05-14 22:26 ` [PATCH v2 06/10] liveupdate: Remove limit on the number of sessions Pasha Tatashin
2026-05-17 17:33 ` Mike Rapoport
2026-05-14 22:26 ` [PATCH v2 07/10] liveupdate: Remove limit on the number of files per session Pasha Tatashin
2026-05-17 17:33 ` Mike Rapoport
2026-05-14 22:26 ` [PATCH v2 08/10] selftests/liveupdate: Test session and file limit removal Pasha Tatashin
2026-05-17 17:35 ` Mike Rapoport
2026-05-14 22:26 ` [PATCH v2 09/10] selftests/liveupdate: Add stress-sessions kexec test Pasha Tatashin
2026-05-17 17:37 ` Mike Rapoport
2026-05-14 22:26 ` [PATCH v2 10/10] selftests/liveupdate: Add stress-files " Pasha Tatashin
2026-05-17 17:38 ` Mike Rapoport
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2vxz7bor78zw.fsf@kernel.org \
--to=pratyush@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=dmatlack@google.com \
--cc=graf@amazon.com \
--cc=kexec@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=skhawaja@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox