kernel/kexec_core.c
Source file repositories/reference/linux-study-clean/kernel/kexec_core.c
File Facts
- System
- Linux kernel
- Corpus path
kernel/kexec_core.c- Extension
.c- Size
- 34662 bytes
- Lines
- 1378
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- Inferred role
- Core OS: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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.
- 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/btf.hlinux/capability.hlinux/mm.hlinux/file.hlinux/slab.hlinux/fs.hlinux/kexec.hlinux/mutex.hlinux/list.hlinux/liveupdate.hlinux/highmem.hlinux/syscalls.hlinux/reboot.hlinux/ioport.hlinux/hardirq.hlinux/elf.hlinux/elfcore.hlinux/utsname.hlinux/numa.hlinux/suspend.hlinux/device.hlinux/freezer.hlinux/panic_notifier.hlinux/pm.hlinux/cpu.hlinux/uaccess.hlinux/io.hlinux/console.hlinux/vmalloc.hlinux/swap.hlinux/syscore_ops.hlinux/compiler.h
Detected Declarations
struct kexec_load_limitstruct kexec_link_entryfunction sanity_check_segment_listfunction kimage_is_destination_rangefunction kimage_free_pagesfunction kimage_free_page_listfunction list_for_each_entry_safefunction kimage_add_entryfunction kimage_set_destinationfunction kimage_add_pagefunction kimage_free_extra_pagesfunction kimage_terminatefunction boot_phys_to_virtfunction kimage_free_cmafunction kimage_freefunction for_each_kimage_entryfunction kimage_load_cma_segmentfunction kimage_load_normal_segmentfunction kimage_load_crash_segmentfunction kimage_load_segmentfunction kimage_unmap_segmentfunction kexec_limit_handlerfunction kexec_core_sysctl_initfunction kexec_load_permittedfunction kernel_kexecfunction loaded_showfunction crash_loaded_showfunction crash_cma_ranges_showfunction crash_size_showfunction crash_size_storefunction crash_elfcorehdr_size_showfunction init_kexec_sysctlmodule init init_kexec_sysctl
Annotated Snippet
subsys_initcall(init_kexec_sysctl);
Annotation
- Immediate include surface: `linux/btf.h`, `linux/capability.h`, `linux/mm.h`, `linux/file.h`, `linux/slab.h`, `linux/fs.h`, `linux/kexec.h`, `linux/mutex.h`.
- Detected declarations: `struct kexec_load_limit`, `struct kexec_link_entry`, `function sanity_check_segment_list`, `function kimage_is_destination_range`, `function kimage_free_pages`, `function kimage_free_page_list`, `function list_for_each_entry_safe`, `function kimage_add_entry`, `function kimage_set_destination`, `function kimage_add_page`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- Implementation status: integration 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.