samples/kprobes/kretprobe_example.c
Source file repositories/reference/linux-study-clean/samples/kprobes/kretprobe_example.c
File Facts
- System
- Linux kernel
- Corpus path
samples/kprobes/kretprobe_example.c- Extension
.c- Size
- 3133 bytes
- Lines
- 109
- Domain
- Support Tooling And Documentation
- Bucket
- samples
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/kprobes.hlinux/ktime.hlinux/sched.h
Detected Declarations
struct my_datafunction entry_handlerfunction ret_handlerfunction kretprobe_initfunction kretprobe_exitmodule init kretprobe_init
Annotated Snippet
module_init(kretprobe_init)
module_exit(kretprobe_exit)
MODULE_DESCRIPTION("sample kernel module showing the use of return probes");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/kprobes.h`, `linux/ktime.h`, `linux/sched.h`.
- Detected declarations: `struct my_data`, `function entry_handler`, `function ret_handler`, `function kretprobe_init`, `function kretprobe_exit`, `module init kretprobe_init`.
- Atlas domain: Support Tooling And Documentation / samples.
- 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.