MEMFD PRESERVATION VIA LUO(9)
π Memfd Preservation via LUO π
okay so welcome to Memfd Preservation via LUO(9), bestie β this is the Kernel API Manual page and it's all about keeping your memfd vibes alive across a kexec. Let's get into it π
β¨
β¨ Overview β¨
Memory file descriptors (memfd) can be preserved over a kexec using the Live Update Orchestrator (LUO) file preservation. This allows userspace to transfer its memory contents to the next kernel after a kexec. π«Άπ₯
The preservation is not intended to be transparent. Only select properties of the file are preserved. All others are reset to default. The preserved properties are described below. π
NOTE: The LUO API is not stabilized yet, so the preserved properties of a memfd are also not stable and are subject to backwards incompatible changes. ππ
NOTE: Currently a memfd backed by Hugetlb is not supported. Memfds created with MFD_HUGETLB will be rejected. π«
π Preserved Properties π
The following properties of the memfd are preserved across kexec:
- File Contents β all data stored in the file is preserved. π
- File Size β the size of the file is preserved. Holes in the file are filled by allocating pages for them during preservation. π³οΈβ‘οΈπ
- File Position β the current file position is preserved, allowing applications to continue reading/writing from their last position. πβ¨
- File Status Flags β memfds are always opened with
O_RDWRandO_LARGEFILE. This property is maintained. π - Seals β file seals set on the memfd are preserved and re-applied on restore. Only seals known to this LUO version (see
MEMFD_LUO_ALL_SEALS) may be present; preservation fails with-EOPNOTSUPPotherwise. π
π Non-Preserved Properties π
All properties which are not preserved must be assumed to be reset to default. This section describes some of those properties which may be more of note. π
FD_CLOEXECflag β a memfd can be created with theMFD_CLOEXECflag that sets theFD_CLOEXECon the file. This flag is not preserved and must be set again after restore viafcntl. π«
π SEE ALSO π
- Kernel file:
./mm/memfd_luo.cπ
okay bestie that's the whole page, periodt π β source/version ./mm, dated October 2026, and the manual is Memfd Preservation via LUO(9). slay π«Άπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms