Re: [PATCH 01/18] liveupdate: Export symbols needed by modules

From: David Matlack

Date: Wed Dec 02 2026 - 12:22:14 EST


On Tue Dec 1, 2026 at 11:18 PM PST, Christoph Hellwig wrote:
> On Wed, Dec 02, 2026 at 12:39:38AM +0000, David Matlack wrote:
>> From: Vipin Sharma <vipinsh@xxxxxxxxxx>
>>
>> Export liveupdate_register_file_handler() and
>> liveupdate_unregister_file_handler() so that drivers built as modules
>> can register Live Update file handlers.
>
> I don't see any such driver in this series. And the diea of allowing
> reandom drivers to register this information feels wrong.

The user in this series is the test driver added in patch 10
(tools/testing/selftests/liveupdate/modules/luo_pci_test_driver.c),
which the selftests build as a module and load in the kernel. The other
user will be vfio-pci, from the VFIO Live Update series, which is where
this patch comes from:

https://lore.kernel.org/kvm/20260714151505.3466855-1-vipinsh@xxxxxxxxxx/

To address the concern about random drivers, I see two options:

A. Restrict these exports to the modules that need them, i.e.
EXPORT_SYMBOL_FOR_MODULES(..., "vfio-pci,luo_pci_test_driver").

B. Make the test driver built-in, behind a Kconfig option like the
existing CONFIG_LIVEUPDATE_TEST, and drop this patch from this
series. vfio-pci would still need exports though.

Can you say more about what your concern is? Is it mainly about which
modules can call these functions, or about drivers registering Live
Update file handlers at all? If it's the latter, I'd like to understand
it, since that's how drivers like vfio-pci are expected to preserve
their devices across a Live Update.