include/linux/kho/abi/memfd.h
Source file repositories/reference/linux-study-clean/include/linux/kho/abi/memfd.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/kho/abi/memfd.h- Extension
.h- Size
- 2792 bytes
- Lines
- 94
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/kho/abi/kexec_handover.h
Detected Declarations
struct memfd_luo_folio_serstruct memfd_luo_ser
Annotated Snippet
struct memfd_luo_folio_ser {
u64 pfn:52;
u64 flags:12;
u64 index;
} __packed;
/*
* The set of seals this version supports preserving. If support for any new
* seals is needed, add it here and bump version.
*/
#define MEMFD_LUO_ALL_SEALS (F_SEAL_SEAL | \
F_SEAL_SHRINK | \
F_SEAL_GROW | \
F_SEAL_WRITE | \
F_SEAL_FUTURE_WRITE | \
F_SEAL_EXEC)
/**
* struct memfd_luo_ser - Main serialization structure for a memfd.
* @pos: The file's current position (f_pos).
* @size: The total size of the file in bytes (i_size).
* @seals: The seals present on the memfd. The seals are uABI so it is safe
* to directly use them in the ABI.
* @flags: Flags for the file. Unused flag bits must be set to 0.
* @nr_folios: Number of folios in the folios array.
* @folios: KHO vmalloc descriptor pointing to the array of
* struct memfd_luo_folio_ser.
*/
struct memfd_luo_ser {
u64 pos;
u64 size;
u32 seals;
u32 flags;
u64 nr_folios;
struct kho_vmalloc folios;
} __packed;
/* The compatibility string for memfd file handler */
#define MEMFD_LUO_FH_COMPATIBLE "memfd-v2"
#endif /* _LINUX_KHO_ABI_MEMFD_H */
Annotation
- Immediate include surface: `linux/types.h`, `linux/kho/abi/kexec_handover.h`.
- Detected declarations: `struct memfd_luo_folio_ser`, `struct memfd_luo_ser`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.