From: tarunsahu@google.com
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
joro@8bytes.org, Mike Rapoport <rppt@kernel.org>,
Pratyush Yadav <pratyush@kernel.org>,
maz@kernel.org, arnd@arndb.de,
David Matlack <dmatlack@google.com>,
jgg@nvidia.com, robin.murphy@arm.com, loganodell@google.com,
oupton@kernel.org, kevin.tian@intel.com, alex@shazbot.org,
dwmw2@infradead.org, pbonzini@redhat.com, seanjc@google.com,
will@kernel.org, Alexander Graf <graf@amazon.com>,
Bjorn Helgaas <bhelgaas@google.com>,
baolu.lu@linux.intel.com, linux-arm-kernel@lists.infradead.org,
linux-arch@vger.kernel.org, sagis@google.com,
linux-mm@kvack.org, kvmarm@lists.linux.dev,
iommu@lists.linux.dev, linux-pci@vger.kernel.org,
kexec@lists.infradead.org, skhawaja@google.com,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2 1/4] liveupdate: Rename handler compatible to name
Date: Wed, 21 Oct 2026 18:16:26 +0000 [thread overview]
Message-ID: <9huzik2u6hs5.fsf@tarunix.c.googlers.com> (raw)
In-Reply-To: <CA+CK2bC_wc4LxvHe0TREbBP7esYW3pcMNtkGK-kqvf6MyvOh2g@mail.gmail.com>
Pasha Tatashin <pasha.tatashin@soleen.com> writes:
> On Wed, Oct 21, 2026 at 11:25 AM Tarun Sahu <tarunsahu@google.com> wrote:
>>
>> File handler and File-Lifecycle-Bound (FLB) identifiers name the
>
> Please use FLB directly, no need to spell it out.
>
>> registered handler or FLB rather than a monolithic compatibility version.
>> Rename compatible to name across LUO headers, structures, and consumers:
>> - struct liveupdate_file_handler and struct luo_file_ser name field
>> - LIVEUPDATE_HNDL_NAME_LENGTH (in include/uapi/linux/liveupdate.h) and
>> MEMFD_LUO_FH_NAME
>> - struct liveupdate_flb name field, LIVEUPDATE_FLB_NAME_LENGTH,
>> PCI_LUO_FLB_NAME, and LIVEUPDATE_TEST_FLB_NAME
>>
>> Signed-off-by: Tarun Sahu <tarunsahu@google.com>
>> ---
>> drivers/pci/liveupdate.c | 10 ++++----
>> include/linux/kho/abi/luo.h | 26 +++++++++----------
>> include/linux/kho/abi/memfd.h | 4 +--
>> include/linux/kho/abi/pci.h | 2 +-
>> include/linux/liveupdate.h | 18 +++++--------
>> include/uapi/linux/liveupdate.h | 3 +++
>> kernel/liveupdate/luo_file.c | 45 +++++++++++++++++----------------
>> kernel/liveupdate/luo_flb.c | 16 ++++++------
>> lib/tests/liveupdate.c | 22 ++++++++--------
>> mm/memfd_luo.c | 2 +-
>> 10 files changed, 73 insertions(+), 75 deletions(-)
>>
>> diff --git a/drivers/pci/liveupdate.c b/drivers/pci/liveupdate.c
>> index 51695782ed42..3cf01d7d615c 100644
>> --- a/drivers/pci/liveupdate.c
>> +++ b/drivers/pci/liveupdate.c
>> @@ -424,7 +424,7 @@ static struct liveupdate_flb_ops pci_liveupdate_flb_ops = {
>>
>> static struct liveupdate_flb pci_liveupdate_flb = {
>> .ops = &pci_liveupdate_flb_ops,
>> - .compatible = PCI_LUO_FLB_COMPATIBLE,
>> + .name = PCI_LUO_FLB_NAME,
>> };
>>
>> static void pci_liveupdate_flb_put_outgoing(void)
>> @@ -667,13 +667,13 @@ static struct pci_flb_incoming *pci_liveupdate_flb_get_incoming(void)
>>
>> /*
>> * Live Update is enabled and there is incoming FLB data, but none of it
>> - * matches pci_liveupdate_flb.compatible.
>> + * matches pci_liveupdate_flb.name.
>> */
>> if (ret == -ENOENT)
>> return NULL;
>>
>> /*
>> - * There is incoming FLB data that matches pci_liveupdate_flb.compatible
>> + * There is incoming FLB data that matches pci_liveupdate_flb.name
>> * but retrieve failed (pci_flb_retrieve() returned an error or LUO
>> * failed to acquire a reference to pci_liveupdate_flb_ops.owner).
>> */
>> @@ -998,7 +998,7 @@ EXPORT_SYMBOL_GPL(pci_liveupdate_is_incoming);
>> */
>> int pci_liveupdate_register_flb(struct liveupdate_file_handler *fh)
>> {
>> - pr_debug("Registering file handler \"%s\"\n", fh->compatible);
>> + pr_debug("Registering file handler \"%s\"\n", fh->name);
>> return liveupdate_register_flb(fh, &pci_liveupdate_flb);
>> }
>> EXPORT_SYMBOL_GPL(pci_liveupdate_register_flb);
>> @@ -1009,7 +1009,7 @@ EXPORT_SYMBOL_GPL(pci_liveupdate_register_flb);
>> */
>> void pci_liveupdate_unregister_flb(struct liveupdate_file_handler *fh)
>> {
>> - pr_debug("Unregistering file handler \"%s\"\n", fh->compatible);
>> + pr_debug("Unregistering file handler \"%s\"\n", fh->name);
>> liveupdate_unregister_flb(fh, &pci_liveupdate_flb);
>> }
>> EXPORT_SYMBOL_GPL(pci_liveupdate_unregister_flb);
>> diff --git a/include/linux/kho/abi/luo.h b/include/linux/kho/abi/luo.h
>> index 288076de6d4a..5fb2f46425d7 100644
>> --- a/include/linux/kho/abi/luo.h
>> +++ b/include/linux/kho/abi/luo.h
>> @@ -39,9 +39,9 @@
>> * Multiple blocks are linked via the `next` field in the header.
>> *
>> * - struct luo_file_ser:
>> - * Metadata for a single preserved file. Contains the `compatible` string to
>> - * find the correct handler in the new kernel, a user-provided `token` for
>> - * identification, and an opaque `data` handle for the handler to use.
>> + * Metadata for a single preserved file. Contains the handler `name` string
>> + * to find the correct handler in the new kernel, a user-provided `token`
>> + * for identification, and an opaque `data` handle for the handler to use.
>> *
>> * - struct luo_flb_header_ser:
>> * Header for the FLB array. Contains the total page count of the
>> @@ -49,9 +49,9 @@
>> * that follow.
>> *
>> * - struct luo_flb_ser:
>> - * Metadata for a single preserved global object. Contains its `name`
>> - * (compatible string), an opaque `data` handle, and the `count`
>> - * number of files depending on it.
>> + * Metadata for a single preserved global object. Contains its FLB `name`
>> + * string, an opaque `data` handle, and the `count` number of files
>> + * depending on it.
>> */
>>
>> #ifndef _LINUX_KHO_ABI_LUO_H
>> @@ -84,18 +84,16 @@ struct luo_ser {
>> u64 flbs_pa;
>> } __packed;
>>
>> -#define LIVEUPDATE_HNDL_COMPAT_LENGTH 48
>> -
>> /**
>> * struct luo_file_ser - Represents the serialized preserves files.
>> - * @compatible: File handler compatible string.
>> + * @name: File handler name string.
>
> We are renaming from cpmaptible to name; I am not sure that is
> necessary. We can still use compatible for the same purpose as name.
> Unless it really bothers people, but for me 'compatible' works just
> the same.
Yes it is necessary, For example if we have two handler for a single
subsystem. We should refer it by handle this or handler that, not like
handler with compatible string this and handler with compatible string
that.
It ease the conversation and people will understand it quickly with
name.
~Tarun
>
>> * @data: Private data
>> * @token: User provided token for this file
>> *
>> * If this structure is modified, `LUO_ABI_COMPATIBLE` must be updated.
>> */
>> struct luo_file_ser {
>> - char compatible[LIVEUPDATE_HNDL_COMPAT_LENGTH];
>> + char name[LIVEUPDATE_HNDL_NAME_LENGTH];
>> u64 data;
>> u64 token;
>> } __packed;
>> @@ -134,7 +132,7 @@ struct luo_session_ser {
>> } __packed;
>
> Unreleated to this patch, but should be handled by this work, let's
> remove all the '__packed' attributes, the are not needed, we will
> explicitly fill in all the holes, with reserved fields.
>
>>
>> /* The max size is set so it can be reliably used during in serialization */
>> -#define LIVEUPDATE_FLB_COMPAT_LENGTH 48
>> +#define LIVEUPDATE_FLB_NAME_LENGTH 48
>>
>> /**
>> * struct luo_flb_header_ser - Header for the serialized FLB data block.
>> @@ -156,7 +154,7 @@ struct luo_flb_header_ser {
>>
>> /**
>> * struct luo_flb_ser - Represents the serialized state of a single FLB object.
>> - * @name: The unique compatibility string of the FLB object, used to find the
>> + * @name: The unique name string of the FLB object, used to find the
>> * corresponding &struct liveupdate_flb handler in the new kernel.
>> * @data: The opaque u64 handle returned by the FLB's .preserve() operation
>> * in the old kernel. This handle encapsulates the entire state needed
>> @@ -172,14 +170,14 @@ struct luo_flb_header_ser {
>> * If this structure is modified, `LUO_ABI_COMPATIBLE` must be updated.
>> */
>> struct luo_flb_ser {
>> - char name[LIVEUPDATE_FLB_COMPAT_LENGTH];
>> + char name[LIVEUPDATE_FLB_NAME_LENGTH];
>> u64 data;
>> u64 count;
>> } __packed;
>>
>> /* Kernel Live Update Test ABI */
>> #ifdef CONFIG_LIVEUPDATE_TEST
>> -#define LIVEUPDATE_TEST_FLB_COMPATIBLE(i) "liveupdate-test-flb-v" #i
>> +#define LIVEUPDATE_TEST_FLB_NAME(i) "liveupdate-test-flb-v" #i
>> #endif
>>
>> #endif /* _LINUX_KHO_ABI_LUO_H */
>> diff --git a/include/linux/kho/abi/memfd.h b/include/linux/kho/abi/memfd.h
>> index 08b10fea2afc..371ffd108a79 100644
>> --- a/include/linux/kho/abi/memfd.h
>> +++ b/include/linux/kho/abi/memfd.h
>> @@ -87,7 +87,7 @@ struct memfd_luo_ser {
>> struct kho_vmalloc folios;
>> } __packed;
>>
>> -/* The compatibility string for memfd file handler */
>> -#define MEMFD_LUO_FH_COMPATIBLE "memfd-v2"
>> +/* The name string for memfd file handler */
>> +#define MEMFD_LUO_FH_NAME "memfd-v2"
>>
>> #endif /* _LINUX_KHO_ABI_MEMFD_H */
>> diff --git a/include/linux/kho/abi/pci.h b/include/linux/kho/abi/pci.h
>> index 9485ed73c351..973ca5b26dbd 100644
>> --- a/include/linux/kho/abi/pci.h
>> +++ b/include/linux/kho/abi/pci.h
>> @@ -23,7 +23,7 @@
>> * incrementing the version number in the PCI_LUO_FLB_VERSION number.
>> */
>>
>> -#define PCI_LUO_FLB_COMPATIBLE "pci"
>> +#define PCI_LUO_FLB_NAME "pci"
>> #define PCI_LUO_FLB_VERSION 2
>>
>> /**
>> diff --git a/include/linux/liveupdate.h b/include/linux/liveupdate.h
>> index 6051abc0612c..475da5fc22ee 100644
>> --- a/include/linux/liveupdate.h
>> +++ b/include/linux/liveupdate.h
>> @@ -90,10 +90,8 @@ struct liveupdate_file_ops {
>> /**
>> * struct liveupdate_file_handler - Represents a handler for a live-updatable file type.
>> * @ops: Callback functions
>> - * @compatible: The compatibility string (e.g., "memfd-v1", "vfiofd-v1")
>> - * that uniquely identifies the file type this handler
>> - * supports. This is matched against the compatible string
>> - * associated with individual &struct file instances.
>> + * @name: Unique handler name string (e.g., "memfd-v2"), matched
>> + * against &struct luo_file_ser.name in the target kernel.
>> *
>> * Modules that want to support live update for specific file types should
>> * register an instance of this structure. LUO uses this registration to
>> @@ -102,7 +100,7 @@ struct liveupdate_file_ops {
>> */
>> struct liveupdate_file_handler {
>> const struct liveupdate_file_ops *ops;
>> - const char compatible[LIVEUPDATE_HNDL_COMPAT_LENGTH];
>> + const char name[LIVEUPDATE_HNDL_NAME_LENGTH];
>>
>> /* private: */
>>
>> @@ -209,11 +207,9 @@ struct luo_flb_private {
>> /**
>> * struct liveupdate_flb - A global definition for a shared data object.
>> * @ops: Callback functions
>> - * @compatible: The compatibility string (e.g., "iommu-core-v1"
>> - * that uniquely identifies the FLB type this handler
>> - * supports. This is matched against the compatible string
>> - * associated with individual &struct liveupdate_flb
>> - * instances.
>> + * @name: The FLB name string (e.g., "iommu-core-v1") that uniquely
>> + * identifies this FLB type. In the target kernel, it is
>> + * matched against the name stored in &struct luo_flb_ser.
>> *
>> * This struct is the "template" that a driver registers to define a shared,
>> * file-lifecycle-bound object. The actual runtime state (the live object,
>> @@ -221,7 +217,7 @@ struct luo_flb_private {
>> */
>> struct liveupdate_flb {
>> const struct liveupdate_flb_ops *ops;
>> - const char compatible[LIVEUPDATE_FLB_COMPAT_LENGTH];
>> + const char name[LIVEUPDATE_FLB_NAME_LENGTH];
>>
>> /* private: */
>> struct luo_flb_private __private private;
>> diff --git a/include/uapi/linux/liveupdate.h b/include/uapi/linux/liveupdate.h
>> index 4043d4038712..509c6236720d 100644
>> --- a/include/uapi/linux/liveupdate.h
>> +++ b/include/uapi/linux/liveupdate.h
>> @@ -46,6 +46,9 @@
>> /* The maximum length of session name including null termination */
>> #define LIVEUPDATE_SESSION_NAME_LENGTH 64
>>
>> +/* The maximum length of file handler name including null termination */
>> +#define LIVEUPDATE_HNDL_NAME_LENGTH 48
>> +
>> /* The /dev/liveupdate ioctl commands */
>> enum {
>> LIVEUPDATE_CMD_BASE = 0x00,
>> diff --git a/kernel/liveupdate/luo_file.c b/kernel/liveupdate/luo_file.c
>> index a39992da504f..fb81239bedf3 100644
>> --- a/kernel/liveupdate/luo_file.c
>> +++ b/kernel/liveupdate/luo_file.c
>> @@ -50,7 +50,7 @@
>> *
>> * 2. Freeze (Pre-Reboot): Just before the kexec, luo_file_freeze() is called.
>> * It iterates through all preserved files, calls their respective .freeze()
>> - * operation, and serializes their final metadata (compatible string, token,
>> + * operation, and serializes their final metadata (handler name, token,
>> * and data handle) into a contiguous memory block for KHO.
>> *
>> * 3. Deserialize: After kexec, luo_file_deserialize() runs when session gets
>> @@ -220,7 +220,7 @@ static bool luo_token_is_used(struct luo_file_set *file_set, u64 token)
>> * 1. Validates that the @token is not already in use within the file_set.
>> * 2. Ensures the file_set's memory for files serialization is allocated
>> * (allocates if needed).
>> - * 3. Iterates through registered handlers, calling can_preserve() to find one
>> + * 3. Iterates through registered handlers, calling .can_preserve() to find one
>> * compatible with the given @fd.
>> * 4. Calls the handler's .preserve() operation, which saves the file's state
>> * and returns an opaque private data handle.
>> @@ -238,7 +238,7 @@ static bool luo_token_is_used(struct luo_file_set *file_set, u64 token)
>> * -EBUSY if the file descriptor is already preserved by another session.
>> * -EBADF if the file descriptor is invalid.
>> * -ENOSPC if the file_set is full.
>> - * -ENOENT if no compatible handler is found.
>> + * -ENOENT if no compatible handler is found for the file type.
>> * -ENOMEM on memory allocation failure.
>> * Other erros might be returned by .preserve().
>> */
>> @@ -456,9 +456,10 @@ static void __luo_file_unfreeze(struct luo_file_set *file_set,
>> * private data handle during this step.
>> *
>> * 2. Serializes Metadata: After a successful freeze, it copies the final file
>> - * metadata—the handler's compatible string, the user token, and the final
>> - * private data handle—into the pre-allocated contiguous memory buffer
>> - * (file_set->files) that will be handed over to the next kernel via KHO.
>> + * metadata - the handler's name string, the user token, and the final
>> + * private data handle - into the pre-allocated contiguous memory buffer
>> + * (file_set->files) that will be handed over to the target kernel via
>> + * KHO.
>> *
>> * Error Handling (Rollback):
>> * This function is atomic. If any handler's .freeze() operation fails, the
>> @@ -495,13 +496,13 @@ int luo_file_freeze(struct luo_file_set *file_set,
>> err = luo_file_freeze_one(file_set, luo_file);
>> if (err < 0) {
>> pr_warn("Freeze failed for token[%#0llx] handler[%s] err[%pe]\n",
>> - luo_file->token, luo_file->fh->compatible,
>> + luo_file->token, luo_file->fh->name,
>> ERR_PTR(err));
>> goto err_unfreeze;
>> }
>>
>> - strscpy(file_ser->compatible, luo_file->fh->compatible,
>> - sizeof(file_ser->compatible));
>> + strscpy(file_ser->name, luo_file->fh->name,
>> + sizeof(file_ser->name));
>> file_ser->data = luo_file->serialized_data;
>> file_ser->token = luo_file->token;
>> }
>> @@ -747,7 +748,7 @@ static int luo_file_deserialize_one(struct luo_file_set *file_set,
>>
>> down_read(&luo_register_rwlock);
>> list_private_for_each_entry(fh, &luo_file_handler_list, list) {
>> - if (!strcmp(fh->compatible, ser->compatible)) {
>> + if (!strcmp(fh->name, ser->name)) {
>> if (try_module_get(fh->ops->owner))
>> handler_found = true;
>> break;
>> @@ -756,9 +757,9 @@ static int luo_file_deserialize_one(struct luo_file_set *file_set,
>> up_read(&luo_register_rwlock);
>>
>> if (!handler_found) {
>> - pr_warn("No registered handler for compatible '%.*s'\n",
>> - (int)sizeof(ser->compatible),
>> - ser->compatible);
>> + pr_warn("No registered handler for name '%.*s'\n",
>> + (int)sizeof(ser->name),
>> + ser->name);
>> return -ENOENT;
>> }
>>
>> @@ -789,9 +790,9 @@ static int luo_file_deserialize_one(struct luo_file_set *file_set,
>> * in-memory linked list of 'struct luo_file' instances.
>> *
>> * For each serialized entry, it performs the following steps:
>> - * 1. Reads the 'compatible' string.
>> + * 1. Reads the handler 'name' string.
>> * 2. Searches the global list of registered file handlers for one that
>> - * matches the compatible string.
>> + * matches the handler name.
>> * 3. Allocates a new 'struct luo_file'.
>> * 4. Populates the new structure with the deserialized data (token, private
>> * data handle) and links it to the found handler. The 'file' pointer is
>> @@ -884,9 +885,9 @@ void luo_file_set_destroy(struct luo_file_set *file_set)
>> /**
>> * liveupdate_register_file_handler - Register a file handler with LUO.
>> * @fh: Pointer to a caller-allocated &struct liveupdate_file_handler.
>> - * The caller must initialize this structure, including a unique
>> - * 'compatible' string and a valid 'fh' callbacks. This function adds the
>> - * handler to the global list of supported file handlers.
>> + * The caller must initialize this structure, including a unique 'name'
>> + * string and valid 'fh' callbacks. This function adds the handler to the
>> + * global list of supported file handlers.
>> *
>> * Context: Typically called during module initialization for file types that
>> * support live update preservation.
>> @@ -908,11 +909,11 @@ int liveupdate_register_file_handler(struct liveupdate_file_handler *fh)
>> }
>>
>> down_write(&luo_register_rwlock);
>> - /* Check for duplicate compatible strings */
>> + /* Check for duplicate handler names */
>> list_private_for_each_entry(fh_iter, &luo_file_handler_list, list) {
>> - if (!strcmp(fh_iter->compatible, fh->compatible)) {
>> - pr_err("File handler registration failed: Compatible string '%s' already registered.\n",
>> - fh->compatible);
>> + if (!strcmp(fh_iter->name, fh->name)) {
>> + pr_err("File handler registration failed: Handler name '%s' already registered.\n",
>> + fh->name);
>> err = -EEXIST;
>> goto err_unlock;
>> }
>> diff --git a/kernel/liveupdate/luo_flb.c b/kernel/liveupdate/luo_flb.c
>> index cd715a7c1d99..222c6d7f821e 100644
>> --- a/kernel/liveupdate/luo_flb.c
>> +++ b/kernel/liveupdate/luo_flb.c
>> @@ -178,7 +178,7 @@ static int luo_flb_retrieve_one(struct liveupdate_flb *flb)
>> return -ENODATA;
>>
>> for (int i = 0; i < fh->header_ser->count; i++) {
>> - if (!strcmp(fh->ser[i].name, flb->compatible)) {
>> + if (!strcmp(fh->ser[i].name, flb->name)) {
>> private->incoming.data = fh->ser[i].data;
>> refcount_set(&private->incoming.count, fh->ser[i].count);
>> found = true;
>> @@ -337,7 +337,7 @@ static void luo_flb_unregister_one(struct liveupdate_file_handler *fh,
>>
>> if (!found) {
>> pr_warn("Failed to unregister FLB '%s': not found in file handler '%s'\n",
>> - flb->compatible, fh->compatible);
>> + flb->name, fh->name);
>> return;
>> }
>>
>> @@ -442,9 +442,9 @@ int liveupdate_register_flb(struct liveupdate_file_handler *fh,
>> if (luo_flb_global.count == LUO_FLB_MAX)
>> return -ENOSPC;
>>
>> - /* Check that compatible string is unique in global list */
>> + /* Check that FLB name is unique in global list */
>> list_private_for_each_entry(gflb, &luo_flb_global.list, private.list) {
>> - if (!strcmp(gflb->compatible, flb->compatible))
>> + if (!strcmp(gflb->name, flb->name))
>> return -EEXIST;
>> }
>>
>> @@ -596,9 +596,9 @@ void __init luo_flb_setup_incoming(u64 flbs_pa)
>> * preserved (i.e., its reference count is greater than zero), it writes its
>> * metadata into the memory region designated for Kexec Handover.
>> *
>> - * The serialized data includes the FLB's compatibility string, its opaque
>> - * data handle, and the final reference count. This allows the new kernel to
>> - * find the appropriate handler and reconstruct the FLB's state.
>> + * The serialized data includes the FLB's name string, its opaque
>> + * data handle, and the final reference count. This allows the target
>> + * kernel to find the appropriate FLB and reconstruct its state.
>> *
>> * Context: Called from liveupdate_reboot() just before kho_finalize().
>> */
>> @@ -614,7 +614,7 @@ void luo_flb_serialize(void)
>> long count = refcount_read(&private->outgoing.count);
>>
>> if (count > 0) {
>> - strscpy(fh->ser[i].name, gflb->compatible,
>> + strscpy(fh->ser[i].name, gflb->name,
>> sizeof(fh->ser[i].name));
>> fh->ser[i].data = private->outgoing.data;
>> fh->ser[i].count = count;
>> diff --git a/lib/tests/liveupdate.c b/lib/tests/liveupdate.c
>> index 4c08a7c6fb78..e4df09eed1f3 100644
>> --- a/lib/tests/liveupdate.c
>> +++ b/lib/tests/liveupdate.c
>> @@ -17,7 +17,7 @@
>> static const struct liveupdate_flb_ops test_flb_ops;
>> #define DEFINE_TEST_FLB(i) { \
>> .ops = &test_flb_ops, \
>> - .compatible = LIVEUPDATE_TEST_FLB_COMPATIBLE(i), \
>> + .name = LIVEUPDATE_TEST_FLB_NAME(i), \
>> }
>>
>> /* Number of Test FLBs to register with every file handler */
>> @@ -34,7 +34,7 @@ static int test_flb_preserve(struct liveupdate_flb_op_args *argp)
>> {
>> ptrdiff_t index = argp->flb - test_flbs;
>>
>> - pr_info("%s: preserve was triggered\n", argp->flb->compatible);
>> + pr_info("%s: preserve was triggered\n", argp->flb->name);
>> argp->data = TEST_FLB_MAGIC_BASE + index;
>>
>> return 0;
>> @@ -42,7 +42,7 @@ static int test_flb_preserve(struct liveupdate_flb_op_args *argp)
>>
>> static void test_flb_unpreserve(struct liveupdate_flb_op_args *argp)
>> {
>> - pr_info("%s: unpreserve was triggered\n", argp->flb->compatible);
>> + pr_info("%s: unpreserve was triggered\n", argp->flb->name);
>> }
>>
>> static int test_flb_retrieve(struct liveupdate_flb_op_args *argp)
>> @@ -52,11 +52,11 @@ static int test_flb_retrieve(struct liveupdate_flb_op_args *argp)
>>
>> if (argp->data == expected_data) {
>> pr_info("%s: found flb data from the previous boot\n",
>> - argp->flb->compatible);
>> + argp->flb->name);
>> argp->obj = (void *)argp->data;
>> } else {
>> pr_err("%s: ERROR - incorrect data handle: %llx, expected %llx\n",
>> - argp->flb->compatible, argp->data, expected_data);
>> + argp->flb->name, argp->data, expected_data);
>> return -EINVAL;
>> }
>>
>> @@ -69,10 +69,10 @@ static void test_flb_finish(struct liveupdate_flb_op_args *argp)
>> void *expected_obj = (void *)(TEST_FLB_MAGIC_BASE + index);
>>
>> if (argp->obj == expected_obj) {
>> - pr_info("%s: finish was triggered\n", argp->flb->compatible);
>> + pr_info("%s: finish was triggered\n", argp->flb->name);
>> } else {
>> pr_err("%s: ERROR - finish called with invalid object\n",
>> - argp->flb->compatible);
>> + argp->flb->name);
>> }
>> }
>>
>> @@ -103,7 +103,7 @@ static void liveupdate_test_init(void)
>> err = liveupdate_flb_get_incoming(flb, &obj);
>> if (err && err != -ENODATA && err != -ENOENT) {
>> pr_err("liveupdate_flb_get_incoming for %s failed: %pe\n",
>> - flb->compatible, ERR_PTR(err));
>> + flb->name, ERR_PTR(err));
>> }
>>
>> if (!err)
>> @@ -124,18 +124,18 @@ void liveupdate_test_register(struct liveupdate_file_handler *fh)
>> err = liveupdate_register_flb(fh, flb);
>> if (err) {
>> pr_err("Failed to register %s %pe\n",
>> - flb->compatible, ERR_PTR(err));
>> + flb->name, ERR_PTR(err));
>> }
>> }
>>
>> err = liveupdate_register_flb(fh, &test_flbs[0]);
>> if (!err || err != -EEXIST) {
>> pr_err("Failed: %s should be already registered, but got err: %pe\n",
>> - test_flbs[0].compatible, ERR_PTR(err));
>> + test_flbs[0].name, ERR_PTR(err));
>> }
>>
>> pr_info("Registered %d FLBs with file handler: [%s]\n",
>> - TEST_NFLBS, fh->compatible);
>> + TEST_NFLBS, fh->name);
>> }
>>
>> MODULE_LICENSE("GPL");
>> diff --git a/mm/memfd_luo.c b/mm/memfd_luo.c
>> index 6b68220275eb..64f8b8cb75bd 100644
>> --- a/mm/memfd_luo.c
>> +++ b/mm/memfd_luo.c
>> @@ -602,7 +602,7 @@ static const struct liveupdate_file_ops memfd_luo_file_ops = {
>>
>> static struct liveupdate_file_handler memfd_luo_handler = {
>> .ops = &memfd_luo_file_ops,
>> - .compatible = MEMFD_LUO_FH_COMPATIBLE,
>> + .name = MEMFD_LUO_FH_NAME,
>> };
>>
>> static int __init memfd_luo_init(void)
>> --
>> 2.56.0.212.g129ede20d9-goog
>>
next prev parent reply other threads:[~2026-10-21 18:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 15:25 [RFC PATCH v2 0/4] liveupdate: Feature header ABI and named handler Tarun Sahu
2026-10-21 15:25 ` [RFC PATCH v2 1/4] liveupdate: Rename handler compatible to name Tarun Sahu
2026-10-21 17:11 ` Pasha Tatashin
2026-10-21 18:16 ` tarunsahu [this message]
2026-10-21 19:11 ` Pasha Tatashin
2026-10-21 19:35 ` tarunsahu
2026-10-21 15:25 ` [RFC PATCH v2 2/4] liveupdate: Select file handler by name in the preserve ioctl Tarun Sahu
2026-10-21 17:17 ` Pasha Tatashin
2026-10-21 23:02 ` David Matlack
2026-10-21 15:25 ` [RFC PATCH v2 3/4] liveupdate: Replace compatibility string with a 2-bit pair feature header Tarun Sahu
2026-10-21 17:27 ` Pasha Tatashin
2026-10-21 17:40 ` Jason Gunthorpe
2026-10-21 17:55 ` Pasha Tatashin
2026-10-21 18:40 ` tarunsahu
2026-10-21 18:46 ` David Matlack
2026-10-21 18:50 ` Pasha Tatashin
2026-10-21 15:25 ` [RFC PATCH v2 4/4] mm: memfd_luo: Add the " Tarun Sahu
2026-10-21 17:38 ` Pasha Tatashin
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=9huzik2u6hs5.fsf@tarunix.c.googlers.com \
--to=tarunsahu@google.com \
--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=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=kexec@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-pci@vger.kernel.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=sagis@google.com \
--cc=seanjc@google.com \
--cc=skhawaja@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®