tools/testing/selftests/bpf/test_kmods/bpf_testmod_kfunc.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/test_kmods/bpf_testmod_kfunc.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/test_kmods/bpf_testmod_kfunc.h- Extension
.h- Size
- 7079 bytes
- Lines
- 212
- 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
vmlinux.hbpf/bpf_helpers.h
Detected Declarations
struct prog_test_member1struct prog_test_memberstruct prog_test_ref_kfuncstruct bpf_iter_testmod_seqstruct prog_test_pass1struct prog_test_pass2struct prog_test_big_argstruct prog_test_fail1struct prog_test_fail2struct prog_test_fail3struct init_sock_argsstruct addr_argsstruct sendmsg_argsstruct bpf_testmod_ctxstruct st_ops_args
Annotated Snippet
struct prog_test_member1 {
int a;
};
struct prog_test_member {
struct prog_test_member1 m;
int c;
};
struct prog_test_ref_kfunc {
int a;
int b;
struct prog_test_member memb;
struct prog_test_ref_kfunc *next;
refcount_t cnt;
};
#endif
struct bpf_iter_testmod_seq;
struct prog_test_pass1 {
int x0;
struct {
int x1;
struct {
int x2;
struct {
int x3;
};
};
};
};
struct prog_test_pass2 {
int len;
short arr1[4];
struct {
char arr2[4];
unsigned long arr3[8];
} x;
};
struct prog_test_big_arg {
__u64 a;
__u64 b;
};
struct prog_test_fail1 {
void *p;
int x;
};
struct prog_test_fail2 {
int x8;
struct prog_test_pass1 x;
};
struct prog_test_fail3 {
int len;
char arr1[2];
char arr2[];
};
struct init_sock_args {
int af;
int type;
};
struct addr_args {
char addr[sizeof(struct __kernel_sockaddr_storage)];
int addrlen;
};
struct sendmsg_args {
struct addr_args addr;
char msg[10];
int msglen;
};
struct bpf_testmod_ctx {
struct callback_head rcu;
refcount_t usage;
};
struct prog_test_ref_kfunc *
bpf_kfunc_call_test_acquire(unsigned long *scalar_ptr) __ksym;
void bpf_kfunc_call_test_release(struct prog_test_ref_kfunc *p) __ksym;
void bpf_kfunc_call_test_ref(struct prog_test_ref_kfunc *p) __ksym;
void bpf_kfunc_call_test_mem_len_pass1(void *mem, int len) __ksym;
Annotation
- Immediate include surface: `vmlinux.h`, `bpf/bpf_helpers.h`.
- Detected declarations: `struct prog_test_member1`, `struct prog_test_member`, `struct prog_test_ref_kfunc`, `struct bpf_iter_testmod_seq`, `struct prog_test_pass1`, `struct prog_test_pass2`, `struct prog_test_big_arg`, `struct prog_test_fail1`, `struct prog_test_fail2`, `struct prog_test_fail3`.
- 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.