Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

liveupdate: separate memfd support into LIVEUPDATE_MEMFD

Decouple memfd preservation support from the core Live Update Orchestrator
configuration.

Previously, enabling CONFIG_LIVEUPDATE forced a dependency on CONFIG_SHMEM
and unconditionally compiled memfd_luo.o. However, Live Update may be
used for purposes that do not require memfd-backed memory preservation.

Introduce CONFIG_LIVEUPDATE_MEMFD to gate memfd_luo.o. This moves the
SHMEM and MEMFD_CREATE dependencies to the specific feature that needs
them, allowing the base LIVEUPDATE option to be selected independently of
shared memory support.

Link: https://lkml.kernel.org/r/20251230161402.1542099-1-pasha.tatashin@soleen.com
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Pasha Tatashin and committed by
Andrew Morton
998be0a4 1921044e

+17 -2
+16 -1
kernel/liveupdate/Kconfig
··· 54 54 config LIVEUPDATE 55 55 bool "Live Update Orchestrator" 56 56 depends on KEXEC_HANDOVER 57 - depends on SHMEM 58 57 help 59 58 Enable the Live Update Orchestrator. Live Update is a mechanism, 60 59 typically based on kexec, that allows the kernel to be updated ··· 69 70 This feature primarily targets virtual machine hosts to quickly update 70 71 the kernel hypervisor with minimal disruption to the running virtual 71 72 machines. 73 + 74 + If unsure, say N. 75 + 76 + config LIVEUPDATE_MEMFD 77 + bool "Live update support for memfd" 78 + depends on LIVEUPDATE 79 + depends on MEMFD_CREATE 80 + depends on SHMEM 81 + default LIVEUPDATE 82 + help 83 + Enable live update support for memfd regions. This allows preserving 84 + memfd-backed memory across kernel live updates. 85 + 86 + This can be used to back VM memory with memfds, allowing the guest 87 + memory to persist, or for other user workloads needing to preserve 88 + pages. 72 89 73 90 If unsure, say N. 74 91
+1 -1
mm/Makefile
··· 100 100 obj-$(CONFIG_DEVICE_MIGRATION) += migrate_device.o 101 101 obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += huge_memory.o khugepaged.o 102 102 obj-$(CONFIG_PAGE_COUNTER) += page_counter.o 103 - obj-$(CONFIG_LIVEUPDATE) += memfd_luo.o 103 + obj-$(CONFIG_LIVEUPDATE_MEMFD) += memfd_luo.o 104 104 obj-$(CONFIG_MEMCG_V1) += memcontrol-v1.o 105 105 obj-$(CONFIG_MEMCG) += memcontrol.o vmpressure.o 106 106 ifdef CONFIG_SWAP