/linux-master/tools/lib/bpf/ |
H A D | gen_loader.c | 565 struct ksym_relo_desc *relo; local 567 relo = libbpf_reallocarray(gen->relos, gen->relo_cnt + 1, sizeof(*relo)); 568 if (!relo) { 572 gen->relos = relo; 573 relo += gen->relo_cnt; 574 relo->name = name; 575 relo->is_weak = is_weak; 576 relo->is_typeless = is_typeless; 577 relo 584 get_ksym_desc(struct bpf_gen *gen, struct ksym_relo_desc *relo) argument 616 emit_bpf_find_by_name_kind(struct bpf_gen *gen, struct ksym_relo_desc *relo) argument 635 emit_bpf_kallsyms_lookup_name(struct bpf_gen *gen, struct ksym_relo_desc *relo) argument 664 emit_relo_kfunc_btf(struct bpf_gen *gen, struct ksym_relo_desc *relo, int insn) argument 735 emit_ksym_relo_log(struct bpf_gen *gen, struct ksym_relo_desc *relo, int ref) argument 754 emit_relo_ksym_typeless(struct bpf_gen *gen, struct ksym_relo_desc *relo, int insn) argument 801 emit_relo_ksym_btf(struct bpf_gen *gen, struct ksym_relo_desc *relo, int insn) argument 867 emit_relo(struct bpf_gen *gen, struct ksym_relo_desc *relo, int insns) argument [all...] |
H A D | relo_core.h | 83 const struct bpf_core_relo *relo, int relo_idx, 90 int insn_idx, const struct bpf_core_relo *relo, 94 const struct bpf_core_relo *relo,
|
H A D | relo_core.c | 264 const struct bpf_core_relo *relo, 274 spec_str = btf__name_by_offset(btf, relo->access_str_off); 280 spec->root_type_id = relo->type_id; 281 spec->relo_kind = relo->kind; 284 if (core_relo_is_type_based(relo->kind)) { 305 t = skip_mods_and_typedefs(btf, relo->type_id, &id); 315 if (core_relo_is_enumval_based(relo->kind)) { 326 if (!core_relo_is_field_based(relo->kind)) 386 pr_warn("prog '%s': relo for [%u] %s (at idx %d) captures type [%d] of unexpected kind %s\n", 387 prog_name, relo 263 bpf_core_parse_spec(const char *prog_name, const struct btf *btf, const struct bpf_core_relo *relo, struct bpf_core_spec *spec) argument 678 bpf_core_calc_field_relo(const char *prog_name, const struct bpf_core_relo *relo, const struct bpf_core_spec *spec, __u64 *val, __u32 *field_sz, __u32 *type_id, bool *validate) argument 803 bpf_core_calc_type_relo(const struct bpf_core_relo *relo, const struct bpf_core_spec *spec, __u64 *val, bool *validate) argument 847 bpf_core_calc_enumval_relo(const struct bpf_core_relo *relo, const struct bpf_core_spec *spec, __u64 *val) argument 879 bpf_core_calc_relo(const char *prog_name, const struct bpf_core_relo *relo, int relo_idx, const struct bpf_core_spec *local_spec, const struct bpf_core_spec *targ_spec, struct bpf_core_relo_res *res) argument 1024 bpf_core_patch_insn(const char *prog_name, struct bpf_insn *insn, int insn_idx, const struct bpf_core_relo *relo, int relo_idx, const struct bpf_core_relo_res *res) argument 1280 bpf_core_calc_relo_insn(const char *prog_name, const struct bpf_core_relo *relo, int relo_idx, const struct btf *local_btf, struct bpf_core_cand_list *cands, struct bpf_core_spec *specs_scratch, struct bpf_core_relo_res *targ_res) argument [all...] |
H A D | libbpf.c | 3849 /* Only do relo for section with exec instructions */ 3856 pr_info("elf: skipping relo section(%d) %s for section(%d) %s\n", 4386 pr_warn("prog '%s': invalid relo against '%s' for insns[%d].code 0x%x\n", 4402 pr_warn("prog '%s': extern relo failed to find extern for '%s' (%d)\n", 4426 pr_warn("prog '%s': bad call relo against '%s' in section '%s'\n", 4431 pr_warn("prog '%s': bad call relo against '%s' at offset %zu\n", 4442 pr_warn("prog '%s': invalid relo against '%s' in special section 0x%x; forgot to initialize global var?..\n", 4453 pr_warn("prog '%s': bad subprog addr relo against '%s' at offset %zu+%d\n", 4479 pr_warn("prog '%s': bad map relo against '%s' in section '%s'\n", 4495 pr_warn("prog '%s': map relo faile 5689 struct reloc_desc *relos, *relo; local 5706 struct reloc_desc *relo; local 5720 bpf_core_resolve_relo(struct bpf_program *prog, const struct bpf_core_relo *relo, int relo_idx, const struct btf *local_btf, struct hashmap *cand_cache, struct bpf_core_relo_res *targ_res) argument 5947 struct reloc_desc *relo = &prog->reloc_desc[i]; local 6180 const struct reloc_desc *relo = elem; local 6262 struct reloc_desc *relo; local 6940 struct reloc_desc *relo = &prog->reloc_desc[j]; local 7548 const struct bpf_core_relo *relo; local 7695 struct reloc_desc *relo = &prog->reloc_desc[i]; local [all...] |
H A D | linker.c | 859 Elf64_Rel *relo; local 869 pr_warn("ELF relo section #%zu points to invalid SYMTAB section #%zu in %s\n", 876 pr_warn("ELF relo section #%zu points to missing section #%zu in %s\n", 885 pr_warn("ELF relo section #%zu name has invalid name in %s\n", 896 pr_warn("ELF relo section #%zu points to invalid section #%zu in %s\n", 903 relo = sec->data->d_buf; 905 for (i = 0; i < n; i++, relo++) { 906 size_t sym_idx = ELF64_R_SYM(relo->r_info); 907 size_t sym_type = ELF64_R_TYPE(relo->r_info); 911 pr_warn("ELF relo # [all...] |
/linux-master/tools/bpf/bpftool/ |
H A D | gen.c | 2298 const struct bpf_core_relo *relo; local 2335 for_each_btf_ext_rec(seg, sec, relo_idx, relo) { 2341 if (relo->kind != BPF_CORE_TYPE_ID_LOCAL && 2342 !hashmap__find(cand_cache, relo->type_id, &cands)) { 2343 cands = btfgen_find_cands(btf, info->src_btf, relo->type_id); 2349 err = hashmap__set(cand_cache, relo->type_id, cands, 2355 err = bpf_core_calc_relo_insn(sec_name, relo, relo_idx, btf, cands,
|
/linux-master/drivers/net/ethernet/netronome/nfp/bpf/ |
H A D | jit.c | 163 enum nfp_relo_type relo) 176 FIELD_PREP(OP_RELO_TYPE, relo); 209 u8 defer, bool set, enum nfp_relo_type relo) 230 FIELD_PREP(OP_RELO_TYPE, relo); 634 enum nfp_relo_type relo) 644 FIELD_PREP(OP_RELO_TYPE, relo); 162 emit_br_relo(struct nfp_prog *nfp_prog, enum br_mask mask, u16 addr, u8 defer, enum nfp_relo_type relo) argument 208 emit_br_bit_relo(struct nfp_prog *nfp_prog, swreg src, u8 bit, u16 addr, u8 defer, bool set, enum nfp_relo_type relo) argument 633 wrp_immed_relo(struct nfp_prog *nfp_prog, swreg dst, u32 imm, enum nfp_relo_type relo) argument
|
/linux-master/kernel/bpf/ |
H A D | btf.c | 8686 int bpf_core_apply(struct bpf_core_ctx *ctx, const struct bpf_core_relo *relo, argument 8689 bool need_cands = relo->kind != BPF_CORE_TYPE_ID_LOCAL; 8707 cc = bpf_core_find_cands(ctx, relo->type_id); 8710 relo->type_id); 8736 err = bpf_core_calc_relo_insn((void *)ctx->log, relo, relo_idx, ctx->btf, &cands, specs, 8741 err = bpf_core_patch_insn((void *)ctx->log, insn, relo->insn_off / 8, relo, relo_idx,
|
/linux-master/include/linux/ |
H A D | bpf.h | 2606 int bpf_core_apply(struct bpf_core_ctx *ctx, const struct bpf_core_relo *relo,
|