Lines Matching full:kind
86 static const char *core_relo_kind_str(enum bpf_core_relo_kind kind) in core_relo_kind_str() argument
88 switch (kind) { in core_relo_kind_str()
106 static bool core_relo_is_field_based(enum bpf_core_relo_kind kind) in core_relo_is_field_based() argument
108 switch (kind) { in core_relo_is_field_based()
121 static bool core_relo_is_type_based(enum bpf_core_relo_kind kind) in core_relo_is_type_based() argument
123 switch (kind) { in core_relo_is_type_based()
135 static bool core_relo_is_enumval_based(enum bpf_core_relo_kind kind) in core_relo_is_enumval_based() argument
137 switch (kind) { in core_relo_is_enumval_based()
220 pr_warn("unexpected kind %s relocated, local [%d], target [%d]\n", in __bpf_core_types_are_compat()
281 spec->relo_kind = relo->kind; in bpf_core_parse_spec()
284 if (core_relo_is_type_based(relo->kind)) { in bpf_core_parse_spec()
315 if (core_relo_is_enumval_based(relo->kind)) { in bpf_core_parse_spec()
326 if (!core_relo_is_field_based(relo->kind)) in bpf_core_parse_spec()
386 pr_warn("prog '%s': relo for [%u] %s (at idx %d) captures type [%d] of unexpected kind %s\n", in bpf_core_parse_spec()
694 if (relo->kind == BPF_CORE_FIELD_EXISTS) { in bpf_core_calc_field_relo()
707 if (relo->kind == BPF_CORE_FIELD_BYTE_OFFSET) { in bpf_core_calc_field_relo()
715 } else if (relo->kind == BPF_CORE_FIELD_BYTE_SIZE) { in bpf_core_calc_field_relo()
722 prog_name, relo->kind, relo->insn_off / 8); in bpf_core_calc_field_relo()
744 prog_name, relo->kind, relo->insn_off / 8); in bpf_core_calc_field_relo()
766 switch (relo->kind) { in bpf_core_calc_field_relo()
819 switch (relo->kind) { in bpf_core_calc_type_relo()
853 switch (relo->kind) { in bpf_core_calc_enumval_relo()
874 * specs and relocation kind. These values are calculated for each candidate.
896 if (core_relo_is_field_based(relo->kind)) { in bpf_core_calc_relo()
942 } else if (core_relo_is_type_based(relo->kind)) { in bpf_core_calc_relo()
945 } else if (core_relo_is_enumval_based(relo->kind)) { in bpf_core_calc_relo()
958 prog_name, relo_idx, core_relo_kind_str(relo->kind), in bpf_core_calc_relo()
959 relo->kind, relo->insn_off / 8); in bpf_core_calc_relo()
1010 * Patched value is determined by relocation kind and target specification.
1012 * Expected insn->imm value is determined using relocation kind and local
1320 if (relo->kind == BPF_CORE_TYPE_ID_LOCAL) { in bpf_core_calc_relo_insn()
1333 prog_name, relo_idx, core_relo_kind_str(relo->kind), relo->kind); in bpf_core_calc_relo_insn()
1393 * depending on relo's kind. in bpf_core_calc_relo_insn()
1522 * - generally speaking types need to be of same kind (struct vs. struct, union
1535 * pointer, in which case we only check matching names and compatible kind
1596 /* match if the forward declaration is for the same kind */ in __bpf_core_types_match()
1686 pr_warn("unexpected kind %s relocated, local [%d], target [%d]\n", in __bpf_core_types_match()