/* dynamically sized list of type IDs and its associated struct btf */ struct bpf_core_cand_list { struct bpf_core_cand *cands; int len;
};
#define BPF_CORE_SPEC_MAX_LEN 64
/* represents BPF CO-RE field or array element accessor */ struct bpf_core_accessor {
__u32 type_id; /* struct/union type or array element type */
__u32 idx; /* field index or array index */ constchar *name; /* field name or NULL for array accessor */
};
struct bpf_core_spec { conststruct btf *btf; /* high-level spec: named fields and array indices only */ struct bpf_core_accessor spec[BPF_CORE_SPEC_MAX_LEN]; /* original unresolved (no skip_mods_or_typedefs) root type ID */
__u32 root_type_id; /* CO-RE relocation kind */ enum bpf_core_relo_kind relo_kind; /* high-level spec length */ int len; /* raw, low-level spec: 1-to-1 with accessor spec string */ int raw_spec[BPF_CORE_SPEC_MAX_LEN]; /* raw spec length */ int raw_len; /* field bit offset represented by spec */
__u32 bit_offset;
};
struct bpf_core_relo_res { /* expected value in the instruction, unless validate == false */
__u64 orig_val; /* new value that needs to be patched up to */
__u64 new_val; /* relocation unsuccessful, poison instruction, but don't fail load */ bool poison; /* some relocations can't be validated against orig_val */ bool validate; /* for field byte offset relocations or the forms: * *(T *)(rX + <off>) = rY * rX = *(T *)(rY + <off>), * we remember original and resolved field size to adjust direct * memory loads of pointers and integers; this is necessary for 32-bit * host kernel architectures, but also allows to automatically * relocate fields that were resized from, e.g., u32 to u64, etc.
*/ bool fail_memsz_adjust;
__u32 orig_sz;
__u32 orig_type_id;
__u32 new_sz;
__u32 new_type_id;
};
int __bpf_core_types_are_compat(conststruct btf *local_btf, __u32 local_id, conststruct btf *targ_btf, __u32 targ_id, int level); int bpf_core_types_are_compat(conststruct btf *local_btf, __u32 local_id, conststruct btf *targ_btf, __u32 targ_id); int __bpf_core_types_match(conststruct btf *local_btf, __u32 local_id, conststruct btf *targ_btf,
__u32 targ_id, bool behind_ptr, int level); int bpf_core_types_match(conststruct btf *local_btf, __u32 local_id, conststruct btf *targ_btf,
__u32 targ_id);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.