tools/testing/selftests/bpf/prog_tests/livepatch_trampoline.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/prog_tests/livepatch_trampoline.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/prog_tests/livepatch_trampoline.c- Extension
.c- Size
- 2856 bytes
- Lines
- 124
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
test_progs.htesting_helpers.hlivepatch_trampoline.skel.h
Detected Declarations
function load_livepatchfunction unload_livepatchfunction read_proc_cmdlinefunction __test_livepatch_trampolinefunction test_livepatch_trampoline
Annotated Snippet
if (err == -ENOENT) {
test__skip();
return;
}
if (retry_cnt) {
ASSERT_OK(1, "load_livepatch");
goto out;
}
/*
* Something else (previous run of the same test?) loaded
* the KLP module. Unload the KLP module and retry.
*/
unload_livepatch();
retry_cnt++;
goto retry;
}
if (test__start_subtest("fentry_first"))
__test_livepatch_trampoline(false);
if (test__start_subtest("fexit_first"))
__test_livepatch_trampoline(true);
out:
unload_livepatch();
}
Annotation
- Immediate include surface: `test_progs.h`, `testing_helpers.h`, `livepatch_trampoline.skel.h`.
- Detected declarations: `function load_livepatch`, `function unload_livepatch`, `function read_proc_cmdline`, `function __test_livepatch_trampoline`, `function test_livepatch_trampoline`.
- Atlas domain: Support Tooling And Documentation / tools.
- 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.