tools/testing/selftests/bpf/progs/core_reloc_types.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/progs/core_reloc_types.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/progs/core_reloc_types.h- Extension
.h- Size
- 27717 bytes
- Lines
- 1364
- 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
stdint.hstdbool.h
Detected Declarations
struct core_reloc_kernel_outputstruct core_reloc_module_outputstruct core_reloc_flavorsstruct core_reloc_flavors__err_wrong_namestruct core_reloc_nesting_substructstruct core_reloc_nestingstruct core_reloc_nesting___anon_embedstruct core_reloc_nesting___struct_union_mixupstruct core_reloc_nesting___extra_nestingstruct core_reloc_nesting___dup_compat_typesstruct core_reloc_nesting___dup_compat_types__2struct core_reloc_nesting___dup_compat_types__3struct core_reloc_nesting___err_missing_fieldstruct core_reloc_nesting___err_array_fieldstruct core_reloc_nesting___err_missing_containerstruct core_reloc_nesting___err_nonstruct_containerstruct core_reloc_nesting___err_array_containerstruct core_reloc_nesting___err_dup_incompat_types__1struct core_reloc_nesting___err_dup_incompat_types__2struct core_reloc_nesting___err_partial_match_dups__astruct core_reloc_nesting___err_partial_match_dups__bstruct core_reloc_nesting___err_too_deepstruct core_reloc_arrays_outputstruct core_reloc_arrays_substructstruct core_reloc_arraysstruct core_reloc_arrays___diff_arr_dimstruct core_reloc_arrays___diff_arr_val_szstruct core_reloc_arrays___equiv_zero_sz_arrstruct core_reloc_arrays___fixed_arrstruct core_reloc_arrays___err_too_smallstruct core_reloc_arrays___err_too_shallowstruct core_reloc_arrays___err_non_arraystruct core_reloc_arrays___err_wrong_val_typestruct core_reloc_arrays___err_bad_zero_sz_arrstruct core_reloc_arrays___err_bad_signed_arr_elem_szstruct core_reloc_primitivesstruct core_reloc_primitives___diff_enum_defstruct core_reloc_primitives___diff_func_protostruct core_reloc_primitives___diff_ptr_typestruct core_reloc_primitives___err_non_enumstruct core_reloc_primitives___err_non_intstruct core_reloc_primitives___err_non_ptrstruct core_reloc_mods_outputstruct core_reloc_mods_substructstruct core_reloc_modsstruct core_reloc_mods___mod_swapstruct core_reloc_mods___typedefsstruct core_reloc_ptr_as_arr
Annotated Snippet
struct core_reloc_kernel_output {
int valid[10];
char comm[sizeof("test_progs")];
int comm_len;
bool local_task_struct_matches;
};
/*
* MODULE
*/
struct core_reloc_module_output {
long long len;
long long off;
int read_ctx_sz;
bool read_ctx_exists;
bool buf_exists;
bool len_exists;
bool off_exists;
/* we have test_progs[-flavor], so cut flavor part */
char comm[sizeof("test_progs")];
int comm_len;
};
/*
* FLAVORS
*/
struct core_reloc_flavors {
int a;
int b;
int c;
};
/* this is not a flavor, as it doesn't have triple underscore */
struct core_reloc_flavors__err_wrong_name {
int a;
int b;
int c;
};
/*
* NESTING
*/
/* original set up, used to record relocations in BPF program */
struct core_reloc_nesting_substruct {
int a;
};
union core_reloc_nesting_subunion {
int b;
};
struct core_reloc_nesting {
union {
struct core_reloc_nesting_substruct a;
} a;
struct {
union core_reloc_nesting_subunion b;
} b;
};
/* inlined anonymous struct/union instead of named structs in original */
struct core_reloc_nesting___anon_embed {
int __just_for_padding;
union {
struct {
int a;
} a;
} a;
struct {
union {
int b;
} b;
} b;
};
/* different mix of nested structs/unions than in original */
struct core_reloc_nesting___struct_union_mixup {
int __a;
struct {
int __a;
union {
char __a;
int a;
} a;
} a;
int __b;
union {
int __b;
union {
Annotation
- Immediate include surface: `stdint.h`, `stdbool.h`.
- Detected declarations: `struct core_reloc_kernel_output`, `struct core_reloc_module_output`, `struct core_reloc_flavors`, `struct core_reloc_flavors__err_wrong_name`, `struct core_reloc_nesting_substruct`, `struct core_reloc_nesting`, `struct core_reloc_nesting___anon_embed`, `struct core_reloc_nesting___struct_union_mixup`, `struct core_reloc_nesting___extra_nesting`, `struct core_reloc_nesting___dup_compat_types`.
- 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.