kernel/bpf/preload/iterators/iterators.lskel-little-endian.h
Source file repositories/reference/linux-study-clean/kernel/bpf/preload/iterators/iterators.lskel-little-endian.h
File Facts
- System
- Linux kernel
- Corpus path
kernel/bpf/preload/iterators/iterators.lskel-little-endian.h- Extension
.h- Size
- 26951 bytes
- Lines
- 436
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- Inferred role
- Core OS: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
bpf/skel_internal.h
Detected Declarations
struct iterators_bpffunction iterators_bpf__dump_bpf_map__attachfunction iterators_bpf__dump_bpf_prog__attachfunction iterators_bpf__attachfunction iterators_bpf__detachfunction iterators_bpf__destroyfunction iterators_bpf__openfunction iterators_bpf__loadfunction iterators_bpf__open_and_load
Annotated Snippet
struct iterators_bpf {
struct bpf_loader_ctx ctx;
struct {
struct bpf_map_desc rodata;
} maps;
struct {
struct bpf_prog_desc dump_bpf_map;
struct bpf_prog_desc dump_bpf_prog;
} progs;
struct {
int dump_bpf_map_fd;
int dump_bpf_prog_fd;
} links;
};
static inline int
iterators_bpf__dump_bpf_map__attach(struct iterators_bpf *skel)
{
int prog_fd = skel->progs.dump_bpf_map.prog_fd;
int fd = skel_link_create(prog_fd, 0, BPF_TRACE_ITER);
if (fd > 0)
skel->links.dump_bpf_map_fd = fd;
return fd;
}
static inline int
iterators_bpf__dump_bpf_prog__attach(struct iterators_bpf *skel)
{
int prog_fd = skel->progs.dump_bpf_prog.prog_fd;
int fd = skel_link_create(prog_fd, 0, BPF_TRACE_ITER);
if (fd > 0)
skel->links.dump_bpf_prog_fd = fd;
return fd;
}
static inline int
iterators_bpf__attach(struct iterators_bpf *skel)
{
int ret = 0;
ret = ret < 0 ? ret : iterators_bpf__dump_bpf_map__attach(skel);
ret = ret < 0 ? ret : iterators_bpf__dump_bpf_prog__attach(skel);
return ret < 0 ? ret : 0;
}
static inline void
iterators_bpf__detach(struct iterators_bpf *skel)
{
skel_closenz(skel->links.dump_bpf_map_fd);
skel_closenz(skel->links.dump_bpf_prog_fd);
}
static void
iterators_bpf__destroy(struct iterators_bpf *skel)
{
if (!skel)
return;
iterators_bpf__detach(skel);
skel_closenz(skel->progs.dump_bpf_map.prog_fd);
skel_closenz(skel->progs.dump_bpf_prog.prog_fd);
skel_closenz(skel->maps.rodata.map_fd);
skel_free(skel);
}
static inline struct iterators_bpf *
iterators_bpf__open(void)
{
struct iterators_bpf *skel;
skel = skel_alloc(sizeof(*skel));
if (!skel)
goto cleanup;
skel->ctx.sz = (void *)&skel->links - (void *)skel;
return skel;
cleanup:
iterators_bpf__destroy(skel);
return NULL;
}
static inline int
iterators_bpf__load(struct iterators_bpf *skel)
{
struct bpf_load_and_run_opts opts = {};
int err;
opts.ctx = (struct bpf_loader_ctx *)skel;
opts.data_sz = 6208;
opts.data = (void *)"\
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
Annotation
- Immediate include surface: `bpf/skel_internal.h`.
- Detected declarations: `struct iterators_bpf`, `function iterators_bpf__dump_bpf_map__attach`, `function iterators_bpf__dump_bpf_prog__attach`, `function iterators_bpf__attach`, `function iterators_bpf__detach`, `function iterators_bpf__destroy`, `function iterators_bpf__open`, `function iterators_bpf__load`, `function iterators_bpf__open_and_load`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- 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.