From: sashiko-bot@kernel.org
To: "Tarun Sahu" <tarunsahu@google.com>,
loganodell@google.com, alex@shazbot.org, dwmw2@infradead.org,
seanjc@google.com, "Mike Rapoport" <rppt@kernel.org>,
will@kernel.org, pbonzini@redhat.com, jgg@nvidia.com,
"Pasha Tatashin" <pasha.tatashin@soleen.com>,
arnd@arndb.de, "Andrew Morton" <akpm@linux-foundation.org>,
oupton@kernel.org, baolu.lu@linux.intel.com,
"David Matlack" <dmatlack@google.com>,
robin.murphy@arm.com, maz@kernel.org,
"Alexander Graf" <graf@amazon.com>,
joro@8bytes.org, "Bjorn Helgaas" <bhelgaas@google.com>,
kevin.tian@intel.com, "Pratyush Yadav" <pratyush@kernel.org>
Cc: kexec@lists.infradead.org
Subject: Re: [RFC PATCH v3 3/4] mm: memfd_luo: Add the feature header
Date: Mon, 26 Oct 2026 17:53:54 +0000 [thread overview]
Message-ID: <sashiko-outbox-185600@kernel.org> (raw)
In-Reply-To: <20261026174217.603114-4-tarunsahu@google.com>
> Precede struct memfd_luo_ser with the 8-byte struct luo_ser_hdr for
> memfd preservation. The source kernel writes the state through struct
> memfd_luo_ser_wrap, declared with DECLARE_LUO_SER_WRAP():
>
> DECLARE_LUO_SER_WRAP(memfd_luo_ser, 64, MEMFD_LUO_FEAT_MAX);
>
> This consists of hdr + memfd_luo_ser (payload).
>
> The existing struct memfd_luo_ser fields (pos, size, seals, flags,
> nr_folios, folios, and MEMFD_LUO_ALL_SEALS) form MEMFD_LUO_FEAT_CORE
> (index 0 of enum memfd_luo_feature). The source kernel marks it as
> LUO_FEAT_REQUIRED when preserving state, and the target kernel marks it
> as supported (true) in its memfd_luo_supported_feats table passed to
> luo_ser_hdr_validate(). Future changes append any new fields to the end
> of struct memfd_luo_ser under a new feature index so existing field
> offsets never shift.
>
> memfd_luo_retrieve() and memfd_luo_finish() validate the incoming header
> against memfd_luo_supported_feats with luo_ser_hdr_validate() before
> accessing any payload field; finish warns and skips discarding the folios
> when the header is invalid.
>
> Prepending the header shifts every field of the serialized memfd state,
> so bump MEMFD_LUO_FH_COMPATIBLE from memfd-v2 to memfd-v3.
>
> Signed-off-by: Logan Odell <loganodell@google.com>
> Signed-off-by: Tarun Sahu <tarunsahu@google.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261026174217.603114-1-tarunsahu@google.com?part=3
next prev parent reply other threads:[~2026-10-26 17:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 17:42 [RFC PATCH v3 0/4] liveupdate: Add feature header for fine-grained ABI compatibility Tarun Sahu
2026-10-26 17:42 ` [RFC PATCH v3 1/4] liveupdate: Remove __packed from LUO and memfd ABI structures Tarun Sahu
2026-10-26 17:53 ` sashiko-bot
2026-10-26 17:42 ` [RFC PATCH v3 2/4] liveupdate: Add feature header for fine-grained ABI compatibility Tarun Sahu
2026-10-26 17:53 ` sashiko-bot
2026-10-26 17:42 ` [RFC PATCH v3 3/4] mm: memfd_luo: Add the feature header Tarun Sahu
2026-10-26 17:53 ` sashiko-bot [this message]
2026-10-26 17:42 ` [RFC PATCH v3 4/4] liveupdate: Add KUnit test for the feature header helpers Tarun Sahu
2026-10-26 17:53 ` sashiko-bot
2026-10-26 18:58 ` [RFC PATCH v3 0/4] liveupdate: Add feature header for fine-grained ABI compatibility tarunsahu
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=sashiko-outbox-185600@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alex@shazbot.org \
--cc=arnd@arndb.de \
--cc=baolu.lu@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=dmatlack@google.com \
--cc=dwmw2@infradead.org \
--cc=graf@amazon.com \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=kexec@lists.infradead.org \
--cc=loganodell@google.com \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=pasha.tatashin@soleen.com \
--cc=pbonzini@redhat.com \
--cc=pratyush@kernel.org \
--cc=robin.murphy@arm.com \
--cc=rppt@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=seanjc@google.com \
--cc=tarunsahu@google.com \
--cc=will@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.