Lines Matching defs:sec
201 typedef struct bpf_link *(*attach_fn_t)(const struct bpf_sec_def *sec,
205 const char *sec;
564 pr_warn("sec '%s': corrupted program '%s', offset %zu, size %zu\n",
603 pr_warn("sec '%s': failed to allocate memory for prog '%s'\n", sec_name, name);
625 pr_warn("sec '%s': failed to find program symbol at offset %zu\n",
634 pr_warn("sec '%s': failed to get symbol name for offset %zu\n",
640 pr_warn("sec '%s': program at offset %zu crosses section boundary\n",
645 pr_debug("sec '%s': found program '%s' at insn offset %zu (%zu bytes), code size %zu insns (%zu bytes)\n",
655 pr_warn("sec '%s': failed to alloc memory for new program '%s'\n",
2216 const struct btf_type *sec,
2227 vi = btf_var_secinfos(sec) + var_idx;
2285 const struct btf_type *sec = NULL;
2310 sec = t;
2316 if (!sec) {
2321 vlen = btf_vlen(sec);
2323 err = bpf_object__init_user_btf_map(obj, sec, i,
2901 int sec = sh.sh_info; /* points to other section */
2904 if (!section_have_execinstr(obj, sec) &&
2908 idx, name, sec,
2909 elf_sec_name(obj, elf_sec_by_idx(obj, sec)) ?: "<?>");
3088 struct btf_type *sec, *kcfg_sec = NULL, *ksym_sec = NULL;
3143 sec = (void *)btf__type_by_id(obj->btf, ext->sec_btf_id);
3144 sec_name = btf__name_by_offset(obj->btf, sec->name_off);
3147 kcfg_sec = sec;
3168 ksym_sec = sec;
3203 sec = ksym_sec;
3204 n = btf_vlen(sec);
3206 struct btf_var_secinfo *vs = btf_var_secinfos(sec) + i;
3222 sec->size = off;
3226 sec = kcfg_sec;
3239 sec->size = off;
3240 n = btf_vlen(sec);
3242 struct btf_var_secinfo *vs = btf_var_secinfos(sec) + i;
3425 pr_debug("prog '%s': found map %zd (%s, sec %d, off %zu) for insn #%u\n",
3452 pr_debug("prog '%s': found data map %zd (%s, sec %d, off %zu) for insn %u\n",
3523 pr_debug("sec '%s': collecting relocation for section(%zu) '%s'\n",
3529 pr_warn("sec '%s': failed to get relo #%d\n", relo_sec_name, i);
3533 pr_warn("sec '%s': symbol 0x%zx not found for relo #%d\n",
3538 pr_warn("sec '%s': invalid offset 0x%zx for relo #%d\n",
3556 pr_debug("sec '%s': relo #%d: insn #%u against '%s'\n",
3561 pr_warn("sec '%s': relo #%d: program not found in section '%s' for insn #%u\n",
5896 const struct btf_ext_info_sec *sec;
5925 for_each_btf_ext_sec(seg, sec) {
5926 sec_name = btf__name_by_offset(obj->btf, sec->sec_name_off);
5945 pr_warn("sec '%s': failed to find a BPF program\n", sec_name);
5950 pr_debug("sec '%s': found %d CO-RE relocations\n",
5951 sec_name, sec->num_info);
5953 for_each_btf_ext_rec(seg, sec, i, rec) {
5965 pr_debug("sec '%s': skipping CO-RE relocation #%d for insn #%d belonging to eliminated weak subprogram\n",
6063 const struct btf_ext_info_sec *sec;
6068 for_each_btf_ext_sec(ext_info, sec) {
6069 sec_name = btf__name_by_offset(obj->btf, sec->sec_name_off);
6075 for_each_btf_ext_rec(ext_info, sec, i, rec) {
6493 const struct btf_type *sec, *var, *def;
6505 sec = btf__type_by_id(obj->btf, obj->efile.btf_maps_sec_btf_id);
6506 if (!sec)
6537 vi = btf_var_secinfos(sec) + map->btf_var_idx;
8273 .sec = string, \
8303 .sec = sec_pfx, \
8309 static struct bpf_link *attach_kprobe(const struct bpf_sec_def *sec,
8311 static struct bpf_link *attach_tp(const struct bpf_sec_def *sec,
8313 static struct bpf_link *attach_raw_tp(const struct bpf_sec_def *sec,
8315 static struct bpf_link *attach_trace(const struct bpf_sec_def *sec,
8317 static struct bpf_link *attach_lsm(const struct bpf_sec_def *sec,
8319 static struct bpf_link *attach_iter(const struct bpf_sec_def *sec,
8479 section_defs[i].sec, section_defs[i].len))
8501 if (strlen(buf) + strlen(section_defs[i].sec) + 2 > len) {
8506 strcat(buf, section_defs[i].sec);
8666 pr_warn("struct_ops reloc %s: cannot use prog %s in sec %s with type %u attach_btf_id %u expected_attach_type %u for func ptr %s\n",
8780 if (strncmp(name, section_defs[i].sec, section_defs[i].len))
8805 if (strncmp(name, section_defs[i].sec, section_defs[i].len))
9468 static struct bpf_link *attach_kprobe(const struct bpf_sec_def *sec,
9474 func_name = prog->sec_name + sec->len;
9475 retprobe = strcmp(sec->sec, "kretprobe/") == 0;
9588 static struct bpf_link *attach_tp(const struct bpf_sec_def *sec,
9599 tp_cat = sec_name + sec->len;
9644 static struct bpf_link *attach_raw_tp(const struct bpf_sec_def *sec,
9647 const char *tp_name = prog->sec_name + sec->len;
9692 static struct bpf_link *attach_trace(const struct bpf_sec_def *sec,
9698 static struct bpf_link *attach_lsm(const struct bpf_sec_def *sec,
9704 static struct bpf_link *attach_iter(const struct bpf_sec_def *sec,