lib/test_bpf.c
Source file repositories/reference/linux-study-clean/lib/test_bpf.c
File Facts
- System
- Linux kernel
- Corpus path
lib/test_bpf.c- Extension
.c- Size
- 376646 bytes
- Lines
- 15935
- Domain
- Kernel Services
- Bucket
- lib
- Inferred role
- Kernel Services: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/init.hlinux/module.hlinux/filter.hlinux/bpf.hlinux/skbuff.hlinux/netdevice.hlinux/if_vlan.hlinux/prandom.hlinux/highmem.hlinux/sched.h
Detected Declarations
struct bpf_teststruct skb_segment_teststruct tail_call_testfunction bpf_fill_maxinsns1function bpf_fill_maxinsns2function bpf_fill_maxinsns3function bpf_fill_maxinsns4function bpf_fill_maxinsns5function bpf_fill_maxinsns6function bpf_fill_maxinsns7function bpf_fill_maxinsns8function bpf_fill_maxinsns9function bpf_fill_maxinsns10function __bpf_fill_jafunction bpf_fill_maxinsns11function bpf_fill_maxinsns12function bpf_fill_maxinsns13function bpf_fill_jafunction bpf_fill_ld_abs_get_processor_idfunction __bpf_fill_stxdwfunction bpf_fill_stxwfunction bpf_fill_stxdwfunction __bpf_ld_imm64function __bpf_fill_max_jmpfunction bpf_fill_max_jmp_taken_32function bpf_fill_max_jmp_takenfunction bpf_fill_max_jmp_not_taken_32function bpf_fill_max_jmp_not_takenfunction bpf_fill_max_jmp_always_taken_32function bpf_fill_max_jmp_always_takenfunction bpf_fill_max_jmp_never_taken_32function bpf_fill_max_jmp_never_takenfunction __bpf_alu_resultfunction __bpf_fill_alu_shiftfunction bpf_fill_alu64_lsh_immfunction bpf_fill_alu64_rsh_immfunction bpf_fill_alu64_arsh_immfunction bpf_fill_alu64_lsh_regfunction bpf_fill_alu64_rsh_regfunction bpf_fill_alu64_arsh_regfunction bpf_fill_alu32_lsh_immfunction bpf_fill_alu32_rsh_immfunction bpf_fill_alu32_arsh_immfunction bpf_fill_alu32_lsh_regfunction bpf_fill_alu32_rsh_regfunction bpf_fill_alu32_arsh_regfunction __bpf_fill_alu_shift_same_regfunction bpf_fill_alu64_lsh_same_reg
Annotated Snippet
module_init(test_bpf_init);
module_exit(test_bpf_exit);
MODULE_DESCRIPTION("Testsuite for BPF interpreter and BPF JIT compiler");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/filter.h`, `linux/bpf.h`, `linux/skbuff.h`, `linux/netdevice.h`, `linux/if_vlan.h`, `linux/prandom.h`.
- Detected declarations: `struct bpf_test`, `struct skb_segment_test`, `struct tail_call_test`, `function bpf_fill_maxinsns1`, `function bpf_fill_maxinsns2`, `function bpf_fill_maxinsns3`, `function bpf_fill_maxinsns4`, `function bpf_fill_maxinsns5`, `function bpf_fill_maxinsns6`, `function bpf_fill_maxinsns7`.
- Atlas domain: Kernel Services / lib.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.