tools/testing/selftests/bpf/urandom_read.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/urandom_read.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/urandom_read.c- Extension
.c- Size
- 2244 bytes
- Lines
- 100
- 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.
Dependency Surface
stdbool.hstdio.hunistd.herrno.hsys/types.hsys/stat.hfcntl.hstdlib.hsignal.hsdt.hbpf/libbpf_internal.h
Detected Declarations
function urandom_readfunction handle_sigpipefunction main
Annotated Snippet
while (!parent_ready) {
fprintf(stdout, "%d\n", getpid());
fflush(stdout);
}
/* at this point stdout is closed, parent process knows our
* PID and is ready to trace us
*/
}
urandom_read(fd, count);
urandlib_api();
urandlib_api_old();
urandlib_api_sameoffset();
close(fd);
return 0;
}
Annotation
- Immediate include surface: `stdbool.h`, `stdio.h`, `unistd.h`, `errno.h`, `sys/types.h`, `sys/stat.h`, `fcntl.h`, `stdlib.h`.
- Detected declarations: `function urandom_read`, `function handle_sigpipe`, `function main`.
- 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.