load_attr 1094 tools/bpf/bpftool/prog.c struct bpf_object_load_attr load_attr = { 0 }; load_attr 1306 tools/bpf/bpftool/prog.c load_attr.obj = obj; load_attr 1309 tools/bpf/bpftool/prog.c load_attr.log_level = 1 + 2 + 4; load_attr 1311 tools/bpf/bpftool/prog.c err = bpf_object__load_xattr(&load_attr); load_attr 213 tools/lib/bpf/bpf.c int bpf_load_program_xattr(const struct bpf_load_program_attr *load_attr, load_attr 221 tools/lib/bpf/bpf.c if (!load_attr || !log_buf != !log_buf_sz) load_attr 224 tools/lib/bpf/bpf.c log_level = load_attr->log_level; load_attr 229 tools/lib/bpf/bpf.c attr.prog_type = load_attr->prog_type; load_attr 230 tools/lib/bpf/bpf.c attr.expected_attach_type = load_attr->expected_attach_type; load_attr 231 tools/lib/bpf/bpf.c attr.insn_cnt = (__u32)load_attr->insns_cnt; load_attr 232 tools/lib/bpf/bpf.c attr.insns = ptr_to_u64(load_attr->insns); load_attr 233 tools/lib/bpf/bpf.c attr.license = ptr_to_u64(load_attr->license); load_attr 244 tools/lib/bpf/bpf.c attr.kern_version = load_attr->kern_version; load_attr 245 tools/lib/bpf/bpf.c attr.prog_ifindex = load_attr->prog_ifindex; load_attr 246 tools/lib/bpf/bpf.c attr.prog_btf_fd = load_attr->prog_btf_fd; load_attr 247 tools/lib/bpf/bpf.c attr.func_info_rec_size = load_attr->func_info_rec_size; load_attr 248 tools/lib/bpf/bpf.c attr.func_info_cnt = load_attr->func_info_cnt; load_attr 249 tools/lib/bpf/bpf.c attr.func_info = ptr_to_u64(load_attr->func_info); load_attr 250 tools/lib/bpf/bpf.c attr.line_info_rec_size = load_attr->line_info_rec_size; load_attr 251 tools/lib/bpf/bpf.c attr.line_info_cnt = load_attr->line_info_cnt; load_attr 252 tools/lib/bpf/bpf.c attr.line_info = ptr_to_u64(load_attr->line_info); load_attr 253 tools/lib/bpf/bpf.c if (load_attr->name) load_attr 254 tools/lib/bpf/bpf.c memcpy(attr.prog_name, load_attr->name, load_attr 255 tools/lib/bpf/bpf.c min(strlen(load_attr->name), BPF_OBJ_NAME_LEN - 1)); load_attr 256 tools/lib/bpf/bpf.c attr.prog_flags = load_attr->prog_flags; load_attr 268 tools/lib/bpf/bpf.c attr.func_info_rec_size < load_attr->func_info_rec_size) { load_attr 270 tools/lib/bpf/bpf.c finfo = alloc_zero_tailing_info(load_attr->func_info, load_attr 271 tools/lib/bpf/bpf.c load_attr->func_info_cnt, load_attr 272 tools/lib/bpf/bpf.c load_attr->func_info_rec_size, load_attr 278 tools/lib/bpf/bpf.c attr.func_info_rec_size = load_attr->func_info_rec_size; load_attr 281 tools/lib/bpf/bpf.c load_attr->line_info_rec_size) { load_attr 282 tools/lib/bpf/bpf.c linfo = alloc_zero_tailing_info(load_attr->line_info, load_attr 283 tools/lib/bpf/bpf.c load_attr->line_info_cnt, load_attr 284 tools/lib/bpf/bpf.c load_attr->line_info_rec_size, load_attr 290 tools/lib/bpf/bpf.c attr.line_info_rec_size = load_attr->line_info_rec_size; load_attr 321 tools/lib/bpf/bpf.c struct bpf_load_program_attr load_attr; load_attr 323 tools/lib/bpf/bpf.c memset(&load_attr, 0, sizeof(struct bpf_load_program_attr)); load_attr 324 tools/lib/bpf/bpf.c load_attr.prog_type = type; load_attr 325 tools/lib/bpf/bpf.c load_attr.expected_attach_type = 0; load_attr 326 tools/lib/bpf/bpf.c load_attr.name = NULL; load_attr 327 tools/lib/bpf/bpf.c load_attr.insns = insns; load_attr 328 tools/lib/bpf/bpf.c load_attr.insns_cnt = insns_cnt; load_attr 329 tools/lib/bpf/bpf.c load_attr.license = license; load_attr 330 tools/lib/bpf/bpf.c load_attr.kern_version = kern_version; load_attr 332 tools/lib/bpf/bpf.c return bpf_load_program_xattr(&load_attr, log_buf, log_buf_sz); load_attr 99 tools/lib/bpf/bpf.h bpf_load_program_xattr(const struct bpf_load_program_attr *load_attr, load_attr 3367 tools/lib/bpf/libbpf.c struct bpf_load_program_attr load_attr; load_attr 3376 tools/lib/bpf/libbpf.c memset(&load_attr, 0, sizeof(struct bpf_load_program_attr)); load_attr 3377 tools/lib/bpf/libbpf.c load_attr.prog_type = prog->type; load_attr 3378 tools/lib/bpf/libbpf.c load_attr.expected_attach_type = prog->expected_attach_type; load_attr 3380 tools/lib/bpf/libbpf.c load_attr.name = prog->name; load_attr 3381 tools/lib/bpf/libbpf.c load_attr.insns = insns; load_attr 3382 tools/lib/bpf/libbpf.c load_attr.insns_cnt = insns_cnt; load_attr 3383 tools/lib/bpf/libbpf.c load_attr.license = license; load_attr 3384 tools/lib/bpf/libbpf.c load_attr.kern_version = kern_version; load_attr 3385 tools/lib/bpf/libbpf.c load_attr.prog_ifindex = prog->prog_ifindex; load_attr 3391 tools/lib/bpf/libbpf.c load_attr.prog_btf_fd = btf_fd >= 0 ? btf_fd : 0; load_attr 3392 tools/lib/bpf/libbpf.c load_attr.func_info = prog->func_info; load_attr 3393 tools/lib/bpf/libbpf.c load_attr.func_info_rec_size = prog->func_info_rec_size; load_attr 3394 tools/lib/bpf/libbpf.c load_attr.func_info_cnt = prog->func_info_cnt; load_attr 3395 tools/lib/bpf/libbpf.c load_attr.line_info = prog->line_info; load_attr 3396 tools/lib/bpf/libbpf.c load_attr.line_info_rec_size = prog->line_info_rec_size; load_attr 3397 tools/lib/bpf/libbpf.c load_attr.line_info_cnt = prog->line_info_cnt; load_attr 3398 tools/lib/bpf/libbpf.c load_attr.log_level = prog->log_level; load_attr 3399 tools/lib/bpf/libbpf.c load_attr.prog_flags = prog->prog_flags; load_attr 3406 tools/lib/bpf/libbpf.c ret = bpf_load_program_xattr(&load_attr, log_buf, log_buf_size); load_attr 3409 tools/lib/bpf/libbpf.c if (load_attr.log_level) load_attr 3430 tools/lib/bpf/libbpf.c } else if (load_attr.insns_cnt >= BPF_MAXINSNS) { load_attr 3432 tools/lib/bpf/libbpf.c load_attr.insns_cnt, BPF_MAXINSNS); load_attr 3436 tools/lib/bpf/libbpf.c if (load_attr.prog_type != BPF_PROG_TYPE_KPROBE) { load_attr 3439 tools/lib/bpf/libbpf.c load_attr.prog_type = BPF_PROG_TYPE_KPROBE; load_attr 3440 tools/lib/bpf/libbpf.c load_attr.expected_attach_type = 0; load_attr 3441 tools/lib/bpf/libbpf.c fd = bpf_load_program_xattr(&load_attr, NULL, 0); load_attr 292 tools/testing/selftests/bpf/prog_tests/core_reloc.c struct bpf_object_load_attr load_attr = {}; load_attr 320 tools/testing/selftests/bpf/prog_tests/core_reloc.c load_attr.obj = obj; load_attr 321 tools/testing/selftests/bpf/prog_tests/core_reloc.c load_attr.log_level = 0; load_attr 322 tools/testing/selftests/bpf/prog_tests/core_reloc.c load_attr.target_btf_path = test_case->btf_src_file; load_attr 323 tools/testing/selftests/bpf/prog_tests/core_reloc.c err = bpf_object__load_xattr(&load_attr); load_attr 21 tools/testing/selftests/bpf/prog_tests/raw_tp_writable_reject_nbd_invalid.c struct bpf_load_program_attr load_attr = { load_attr 29 tools/testing/selftests/bpf/prog_tests/raw_tp_writable_reject_nbd_invalid.c bpf_fd = bpf_load_program_xattr(&load_attr, error, sizeof(error)); load_attr 19 tools/testing/selftests/bpf/prog_tests/raw_tp_writable_test_run.c struct bpf_load_program_attr load_attr = { load_attr 27 tools/testing/selftests/bpf/prog_tests/raw_tp_writable_test_run.c int bpf_fd = bpf_load_program_xattr(&load_attr, error, sizeof(error)); load_attr 644 tools/testing/selftests/bpf/test_sock_addr.c struct bpf_load_program_attr load_attr; load_attr 647 tools/testing/selftests/bpf/test_sock_addr.c memset(&load_attr, 0, sizeof(struct bpf_load_program_attr)); load_attr 648 tools/testing/selftests/bpf/test_sock_addr.c load_attr.prog_type = BPF_PROG_TYPE_CGROUP_SOCK_ADDR; load_attr 649 tools/testing/selftests/bpf/test_sock_addr.c load_attr.expected_attach_type = test->expected_attach_type; load_attr 650 tools/testing/selftests/bpf/test_sock_addr.c load_attr.insns = insns; load_attr 651 tools/testing/selftests/bpf/test_sock_addr.c load_attr.insns_cnt = insns_cnt; load_attr 652 tools/testing/selftests/bpf/test_sock_addr.c load_attr.license = "GPL"; load_attr 654 tools/testing/selftests/bpf/test_sock_addr.c ret = bpf_load_program_xattr(&load_attr, bpf_log_buf, BPF_LOG_BUF_SIZE); load_attr 27 tools/testing/selftests/bpf/test_stub.c struct bpf_load_program_attr load_attr; load_attr 29 tools/testing/selftests/bpf/test_stub.c memset(&load_attr, 0, sizeof(struct bpf_load_program_attr)); load_attr 30 tools/testing/selftests/bpf/test_stub.c load_attr.prog_type = type; load_attr 31 tools/testing/selftests/bpf/test_stub.c load_attr.expected_attach_type = 0; load_attr 32 tools/testing/selftests/bpf/test_stub.c load_attr.name = NULL; load_attr 33 tools/testing/selftests/bpf/test_stub.c load_attr.insns = insns; load_attr 34 tools/testing/selftests/bpf/test_stub.c load_attr.insns_cnt = insns_cnt; load_attr 35 tools/testing/selftests/bpf/test_stub.c load_attr.license = license; load_attr 36 tools/testing/selftests/bpf/test_stub.c load_attr.kern_version = kern_version; load_attr 37 tools/testing/selftests/bpf/test_stub.c load_attr.prog_flags = BPF_F_TEST_RND_HI32; load_attr 39 tools/testing/selftests/bpf/test_stub.c return bpf_load_program_xattr(&load_attr, log_buf, log_buf_sz);