Lines Matching refs:btf
212 t = btf_type_by_id(field->kptr.btf, field->kptr.btf_id); in bpf_obj_pin_uptrs()
663 if (btf_is_kernel(rec->fields[i].kptr.btf)) in btf_record_free()
664 btf_put(rec->fields[i].kptr.btf); in btf_record_free()
712 if (btf_is_kernel(fields[i].kptr.btf)) in btf_record_dup()
713 btf_get(fields[i].kptr.btf); in btf_record_dup()
819 if (!btf_is_kernel(field->kptr.btf)) { in bpf_obj_free_fields()
820 pointee_struct_meta = btf_find_struct_meta(field->kptr.btf, in bpf_obj_free_fields()
857 struct btf *btf = map->btf; in bpf_map_free() local
880 btf_put(btf); in bpf_map_free()
1209 const struct btf *btf, in map_check_no_btf() argument
1217 const struct btf *btf, u32 btf_key_id, u32 btf_value_id) in map_check_btf() argument
1225 key_type = btf_type_id_size(btf, &btf_key_id, &key_size); in map_check_btf()
1229 key_type = btf_type_by_id(btf, 0); in map_check_btf()
1234 value_type = btf_type_id_size(btf, &btf_value_id, &value_size); in map_check_btf()
1238 map->record = btf_parse_fields(btf, value_type, in map_check_btf()
1320 ret = btf_check_and_fixup_fields(btf, map->record); in map_check_btf()
1325 ret = map->ops->map_check_btf(map, btf, key_type, value_type); in map_check_btf()
1510 struct btf *btf; in map_create() local
1512 btf = btf_get_by_fd(attr->btf_fd); in map_create()
1513 if (IS_ERR(btf)) { in map_create()
1514 err = PTR_ERR(btf); in map_create()
1517 if (btf_is_kernel(btf)) { in map_create()
1518 btf_put(btf); in map_create()
1522 map->btf = btf; in map_create()
1525 err = map_check_btf(map, token, btf, attr->btf_key_type_id, in map_create()
2338 btf_put(prog->aux->btf); in __bpf_prog_put_noref()
2611 struct btf *attach_btf, u32 btf_id, in bpf_prog_load_check_attach()
2771 struct btf *attach_btf = NULL; in bpf_prog_load()
4865 struct btf *attach_btf = bpf_prog_get_target_btf(prog); in bpf_prog_get_info_by_fd()
4919 if (prog->aux->btf) in bpf_prog_get_info_by_fd()
4920 info.btf_id = btf_obj_id(prog->aux->btf); in bpf_prog_get_info_by_fd()
5173 if (map->btf) { in bpf_map_get_info_by_fd()
5174 info.btf_id = btf_obj_id(map->btf); in bpf_map_get_info_by_fd()
5196 struct btf *btf, in bpf_btf_get_info_by_fd() argument
5208 return btf_get_info_by_fd(btf, attr, uattr); in bpf_btf_get_info_by_fd()