tools/testing/selftests/livepatch/test_modules/test_klp_shadow_vars.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/livepatch/test_modules/test_klp_shadow_vars.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/livepatch/test_modules/test_klp_shadow_vars.c- Extension
.c- Size
- 7794 bytes
- Lines
- 302
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/module.hlinux/kernel.hlinux/list.hlinux/livepatch.hlinux/slab.h
Detected Declarations
struct shadow_ptrstruct test_objectfunction free_ptr_listfunction list_for_each_entry_safefunction ptr_idfunction list_for_each_entryfunction ptr_idfunction shadow_freefunction shadow_free_allfunction shadow_ctorfunction shadow_free_allfunction test_klp_shadow_vars_initfunction test_klp_shadow_vars_exitmodule init test_klp_shadow_vars_init
Annotated Snippet
module_init(test_klp_shadow_vars_init);
module_exit(test_klp_shadow_vars_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Joe Lawrence <joe.lawrence@redhat.com>");
MODULE_DESCRIPTION("Livepatch test: shadow variables");
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/list.h`, `linux/livepatch.h`, `linux/slab.h`.
- Detected declarations: `struct shadow_ptr`, `struct test_object`, `function free_ptr_list`, `function list_for_each_entry_safe`, `function ptr_id`, `function list_for_each_entry`, `function ptr_id`, `function shadow_free`, `function shadow_free_all`, `function shadow_ctor`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: integration 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.