kernel/liveupdate/luo_core.c
Source file repositories/reference/linux-study-clean/kernel/liveupdate/luo_core.c
File Facts
- System
- Linux kernel
- Corpus path
kernel/liveupdate/luo_core.c- Extension
.c- Size
- 11256 bytes
- Lines
- 443
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/atomic.hlinux/errno.hlinux/file.hlinux/fs.hlinux/init.hlinux/io.hlinux/kernel.hlinux/kexec_handover.hlinux/kho/abi/luo.hlinux/kobject.hlinux/liveupdate.hlinux/miscdevice.hlinux/mm.hlinux/rwsem.hlinux/sizes.hlinux/string.hkexec_handover_internal.hluo_internal.h
Detected Declarations
struct luo_device_statestruct luo_ioctl_opfunction early_liveupdate_paramfunction luo_early_startupfunction liveupdate_early_initfunction luo_state_setupfunction luo_late_startupfunction liveupdate_rebootfunction liveupdate_enabledfunction luo_ioctl_create_sessionfunction luo_ioctl_retrieve_sessionfunction luo_openfunction luo_releasefunction luo_ioctlfunction liveupdate_ioctl_init
Annotated Snippet
static const struct file_operations luo_fops = {
.owner = THIS_MODULE,
.open = luo_open,
.release = luo_release,
.unlocked_ioctl = luo_ioctl,
};
static struct luo_device_state luo_dev = {
.miscdev = {
.minor = MISC_DYNAMIC_MINOR,
.name = "liveupdate",
.fops = &luo_fops,
},
.in_use = ATOMIC_INIT(0),
};
static int __init liveupdate_ioctl_init(void)
{
if (!liveupdate_enabled())
return 0;
return misc_register(&luo_dev.miscdev);
}
late_initcall(liveupdate_ioctl_init);
Annotation
- Immediate include surface: `linux/atomic.h`, `linux/errno.h`, `linux/file.h`, `linux/fs.h`, `linux/init.h`, `linux/io.h`, `linux/kernel.h`, `linux/kexec_handover.h`.
- Detected declarations: `struct luo_device_state`, `struct luo_ioctl_op`, `function early_liveupdate_param`, `function luo_early_startup`, `function liveupdate_early_init`, `function luo_state_setup`, `function luo_late_startup`, `function liveupdate_reboot`, `function liveupdate_enabled`, `function luo_ioctl_create_session`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.