• Home
  • Raw
  • Download

Lines Matching refs:attr

112 static struct bpf_map *find_and_alloc_map(union bpf_attr *attr)  in find_and_alloc_map()  argument
115 u32 type = attr->map_type; in find_and_alloc_map()
127 err = ops->map_alloc_check(attr); in find_and_alloc_map()
131 if (attr->map_ifindex) in find_and_alloc_map()
133 map = ops->map_alloc(attr); in find_and_alloc_map()
366 void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr) in bpf_map_init_from_attr() argument
368 map->map_type = attr->map_type; in bpf_map_init_from_attr()
369 map->key_size = attr->key_size; in bpf_map_init_from_attr()
370 map->value_size = attr->value_size; in bpf_map_init_from_attr()
371 map->max_entries = attr->max_entries; in bpf_map_init_from_attr()
372 map->map_flags = bpf_map_flags_retain_permanent(attr->map_flags); in bpf_map_init_from_attr()
373 map->numa_node = bpf_map_attr_numa_node(attr); in bpf_map_init_from_attr()
374 map->map_extra = attr->map_extra; in bpf_map_init_from_attr()
873 memchr_inv((void *) &attr->CMD##_LAST_FIELD + \
874 sizeof(attr->CMD##_LAST_FIELD), 0, \
875 sizeof(*attr) - \
877 sizeof(attr->CMD##_LAST_FIELD)) != NULL
1075 static int map_create(union bpf_attr *attr) in map_create() argument
1077 int numa_node = bpf_map_attr_numa_node(attr); in map_create()
1086 if (attr->btf_vmlinux_value_type_id) { in map_create()
1087 if (attr->map_type != BPF_MAP_TYPE_STRUCT_OPS || in map_create()
1088 attr->btf_key_type_id || attr->btf_value_type_id) in map_create()
1090 } else if (attr->btf_key_type_id && !attr->btf_value_type_id) { in map_create()
1094 if (attr->map_type != BPF_MAP_TYPE_BLOOM_FILTER && in map_create()
1095 attr->map_extra != 0) in map_create()
1098 f_flags = bpf_get_file_flag(attr->map_flags); in map_create()
1108 map = find_and_alloc_map(attr); in map_create()
1112 err = bpf_obj_name_cpy(map->name, attr->map_name, in map_create()
1113 sizeof(attr->map_name)); in map_create()
1124 if (attr->btf_key_type_id || attr->btf_value_type_id || in map_create()
1131 attr->btf_vmlinux_value_type_id) { in map_create()
1134 btf = btf_get_by_fd(attr->btf_fd); in map_create()
1146 if (attr->btf_value_type_id) { in map_create()
1147 err = map_check_btf(map, btf, attr->btf_key_type_id, in map_create()
1148 attr->btf_value_type_id); in map_create()
1153 map->btf_key_type_id = attr->btf_key_type_id; in map_create()
1154 map->btf_value_type_id = attr->btf_value_type_id; in map_create()
1156 attr->btf_vmlinux_value_type_id; in map_create()
1310 static int map_lookup_elem(union bpf_attr *attr) in map_lookup_elem() argument
1312 void __user *ukey = u64_to_user_ptr(attr->key); in map_lookup_elem()
1313 void __user *uvalue = u64_to_user_ptr(attr->value); in map_lookup_elem()
1314 int ufd = attr->map_fd; in map_lookup_elem()
1324 if (attr->flags & ~BPF_F_LOCK) in map_lookup_elem()
1336 if ((attr->flags & BPF_F_LOCK) && in map_lookup_elem()
1359 err = bpf_map_copy_value(map, key, value, attr->flags); in map_lookup_elem()
1363 err = bpf_map_copy_value(map, key, value, attr->flags); in map_lookup_elem()
1385 static int map_update_elem(union bpf_attr *attr, bpfptr_t uattr) in map_update_elem() argument
1387 bpfptr_t ukey = make_bpfptr(attr->key, uattr.is_kernel); in map_update_elem()
1388 bpfptr_t uvalue = make_bpfptr(attr->value, uattr.is_kernel); in map_update_elem()
1389 int ufd = attr->map_fd; in map_update_elem()
1409 if ((attr->flags & BPF_F_LOCK) && in map_update_elem()
1428 err = bpf_map_update_value(map, f, key, value, attr->flags); in map_update_elem()
1441 static int map_delete_elem(union bpf_attr *attr, bpfptr_t uattr) in map_delete_elem() argument
1443 bpfptr_t ukey = make_bpfptr(attr->key, uattr.is_kernel); in map_delete_elem()
1444 int ufd = attr->map_fd; in map_delete_elem()
1496 static int map_get_next_key(union bpf_attr *attr) in map_get_next_key() argument
1498 void __user *ukey = u64_to_user_ptr(attr->key); in map_get_next_key()
1499 void __user *unext_key = u64_to_user_ptr(attr->next_key); in map_get_next_key()
1500 int ufd = attr->map_fd; in map_get_next_key()
1561 const union bpf_attr *attr, in generic_map_delete_batch() argument
1564 void __user *keys = u64_to_user_ptr(attr->batch.keys); in generic_map_delete_batch()
1569 if (attr->batch.elem_flags & ~BPF_F_LOCK) in generic_map_delete_batch()
1572 if ((attr->batch.elem_flags & BPF_F_LOCK) && in generic_map_delete_batch()
1577 max_count = attr->batch.count; in generic_map_delete_batch()
1618 const union bpf_attr *attr, in generic_map_update_batch() argument
1621 void __user *values = u64_to_user_ptr(attr->batch.values); in generic_map_update_batch()
1622 void __user *keys = u64_to_user_ptr(attr->batch.keys); in generic_map_update_batch()
1624 int ufd = attr->batch.map_fd; in generic_map_update_batch()
1629 if (attr->batch.elem_flags & ~BPF_F_LOCK) in generic_map_update_batch()
1632 if ((attr->batch.elem_flags & BPF_F_LOCK) && in generic_map_update_batch()
1639 max_count = attr->batch.count; in generic_map_update_batch()
1665 attr->batch.elem_flags); in generic_map_update_batch()
1684 const union bpf_attr *attr, in generic_map_lookup_batch() argument
1687 void __user *uobatch = u64_to_user_ptr(attr->batch.out_batch); in generic_map_lookup_batch()
1688 void __user *ubatch = u64_to_user_ptr(attr->batch.in_batch); in generic_map_lookup_batch()
1689 void __user *values = u64_to_user_ptr(attr->batch.values); in generic_map_lookup_batch()
1690 void __user *keys = u64_to_user_ptr(attr->batch.keys); in generic_map_lookup_batch()
1695 if (attr->batch.elem_flags & ~BPF_F_LOCK) in generic_map_lookup_batch()
1698 if ((attr->batch.elem_flags & BPF_F_LOCK) && in generic_map_lookup_batch()
1704 max_count = attr->batch.count; in generic_map_lookup_batch()
1737 attr->batch.elem_flags); in generic_map_lookup_batch()
1785 static int map_lookup_and_delete_elem(union bpf_attr *attr) in map_lookup_and_delete_elem() argument
1787 void __user *ukey = u64_to_user_ptr(attr->key); in map_lookup_and_delete_elem()
1788 void __user *uvalue = u64_to_user_ptr(attr->value); in map_lookup_and_delete_elem()
1789 int ufd = attr->map_fd; in map_lookup_and_delete_elem()
1799 if (attr->flags & ~BPF_F_LOCK) in map_lookup_and_delete_elem()
1813 if (attr->flags && in map_lookup_and_delete_elem()
1820 if ((attr->flags & BPF_F_LOCK) && in map_lookup_and_delete_elem()
1850 err = map->ops->map_lookup_and_delete_elem(map, key, value, attr->flags); in map_lookup_and_delete_elem()
1878 static int map_freeze(const union bpf_attr *attr) in map_freeze() argument
1880 int err = 0, ufd = attr->map_fd; in map_freeze()
2300 static void bpf_prog_load_fixup_attach_type(union bpf_attr *attr) in bpf_prog_load_fixup_attach_type() argument
2302 switch (attr->prog_type) { in bpf_prog_load_fixup_attach_type()
2307 if (!attr->expected_attach_type) in bpf_prog_load_fixup_attach_type()
2308 attr->expected_attach_type = in bpf_prog_load_fixup_attach_type()
2312 if (!attr->expected_attach_type) in bpf_prog_load_fixup_attach_type()
2313 attr->expected_attach_type = in bpf_prog_load_fixup_attach_type()
2469 static int bpf_prog_load(union bpf_attr *attr, bpfptr_t uattr) in bpf_prog_load() argument
2471 enum bpf_prog_type type = attr->prog_type; in bpf_prog_load()
2481 if (attr->prog_flags & ~(BPF_F_STRICT_ALIGNMENT | in bpf_prog_load()
2490 (attr->prog_flags & BPF_F_ANY_ALIGNMENT) && in bpf_prog_load()
2496 make_bpfptr(attr->license, uattr.is_kernel), in bpf_prog_load()
2504 if (attr->insn_cnt == 0 || in bpf_prog_load()
2505 attr->insn_cnt > (bpf_capable() ? BPF_COMPLEXITY_LIMIT_INSNS : BPF_MAXINSNS)) in bpf_prog_load()
2520 if (attr->attach_prog_fd) { in bpf_prog_load()
2521 dst_prog = bpf_prog_get(attr->attach_prog_fd); in bpf_prog_load()
2524 attach_btf = btf_get_by_fd(attr->attach_btf_obj_fd); in bpf_prog_load()
2535 } else if (attr->attach_btf_id) { in bpf_prog_load()
2545 bpf_prog_load_fixup_attach_type(attr); in bpf_prog_load()
2546 if (bpf_prog_load_check_attach(type, attr->expected_attach_type, in bpf_prog_load()
2547 attach_btf, attr->attach_btf_id, in bpf_prog_load()
2557 prog = bpf_prog_alloc(bpf_prog_size(attr->insn_cnt), GFP_USER); in bpf_prog_load()
2566 prog->expected_attach_type = attr->expected_attach_type; in bpf_prog_load()
2568 prog->aux->attach_btf_id = attr->attach_btf_id; in bpf_prog_load()
2570 prog->aux->offload_requested = !!attr->prog_ifindex; in bpf_prog_load()
2571 prog->aux->sleepable = attr->prog_flags & BPF_F_SLEEPABLE; in bpf_prog_load()
2572 prog->aux->xdp_has_frags = attr->prog_flags & BPF_F_XDP_HAS_FRAGS; in bpf_prog_load()
2579 prog->len = attr->insn_cnt; in bpf_prog_load()
2583 make_bpfptr(attr->insns, uattr.is_kernel), in bpf_prog_load()
2594 err = bpf_prog_offload_init(prog, attr); in bpf_prog_load()
2605 err = bpf_obj_name_cpy(prog->aux->name, attr->prog_name, in bpf_prog_load()
2606 sizeof(attr->prog_name)); in bpf_prog_load()
2611 err = bpf_check(&prog, attr, uattr); in bpf_prog_load()
2665 static int bpf_obj_pin(const union bpf_attr *attr) in bpf_obj_pin() argument
2667 if (CHECK_ATTR(BPF_OBJ) || attr->file_flags != 0) in bpf_obj_pin()
2670 return bpf_obj_pin_user(attr->bpf_fd, u64_to_user_ptr(attr->pathname)); in bpf_obj_pin()
2673 static int bpf_obj_get(const union bpf_attr *attr) in bpf_obj_get() argument
2675 if (CHECK_ATTR(BPF_OBJ) || attr->bpf_fd != 0 || in bpf_obj_get()
2676 attr->file_flags & ~BPF_OBJ_FLAG_MASK) in bpf_obj_get()
2679 return bpf_obj_get_user(u64_to_user_ptr(attr->pathname), in bpf_obj_get()
2680 attr->file_flags); in bpf_obj_get()
3246 static int bpf_perf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog) in bpf_perf_link_attach() argument
3254 if (attr->link_create.flags) in bpf_perf_link_attach()
3257 perf_file = perf_event_get(attr->link_create.target_fd); in bpf_perf_link_attach()
3276 err = perf_event_set_bpf_prog(event, prog, attr->link_create.perf_event.bpf_cookie); in bpf_perf_link_attach()
3291 static int bpf_perf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog) in bpf_perf_link_attach() argument
3367 static int bpf_raw_tracepoint_open(const union bpf_attr *attr) in bpf_raw_tracepoint_open() argument
3375 prog = bpf_prog_get(attr->raw_tracepoint.prog_fd); in bpf_raw_tracepoint_open()
3379 fd = bpf_raw_tp_link_attach(prog, u64_to_user_ptr(attr->raw_tracepoint.name)); in bpf_raw_tracepoint_open()
3481 static int bpf_prog_attach(const union bpf_attr *attr) in bpf_prog_attach() argument
3490 if (attr->attach_flags & ~BPF_F_ATTACH_MASK) in bpf_prog_attach()
3493 ptype = attach_type_to_prog_type(attr->attach_type); in bpf_prog_attach()
3497 prog = bpf_prog_get_type(attr->attach_bpf_fd, ptype); in bpf_prog_attach()
3501 if (bpf_prog_attach_check_attach_type(prog, attr->attach_type)) { in bpf_prog_attach()
3509 ret = sock_map_get_from_fd(attr, prog); in bpf_prog_attach()
3512 ret = lirc_prog_attach(attr, prog); in bpf_prog_attach()
3515 ret = netns_bpf_prog_attach(attr, prog); in bpf_prog_attach()
3529 ret = cgroup_bpf_prog_attach(attr, ptype, prog); in bpf_prog_attach()
3542 static int bpf_prog_detach(const union bpf_attr *attr) in bpf_prog_detach() argument
3549 ptype = attach_type_to_prog_type(attr->attach_type); in bpf_prog_detach()
3554 return sock_map_prog_detach(attr, ptype); in bpf_prog_detach()
3556 return lirc_prog_detach(attr); in bpf_prog_detach()
3558 return netns_bpf_prog_detach(attr, ptype); in bpf_prog_detach()
3567 return cgroup_bpf_prog_detach(attr, ptype); in bpf_prog_detach()
3575 static int bpf_prog_query(const union bpf_attr *attr, in bpf_prog_query() argument
3582 if (attr->query.query_flags & ~BPF_F_QUERY_EFFECTIVE) in bpf_prog_query()
3585 switch (attr->query.attach_type) { in bpf_prog_query()
3610 return cgroup_bpf_prog_query(attr, uattr); in bpf_prog_query()
3612 return lirc_prog_query(attr, uattr); in bpf_prog_query()
3615 return netns_bpf_prog_query(attr, uattr); in bpf_prog_query()
3620 return sock_map_bpf_prog_query(attr, uattr); in bpf_prog_query()
3628 static int bpf_prog_test_run(const union bpf_attr *attr, in bpf_prog_test_run() argument
3637 if ((attr->test.ctx_size_in && !attr->test.ctx_in) || in bpf_prog_test_run()
3638 (!attr->test.ctx_size_in && attr->test.ctx_in)) in bpf_prog_test_run()
3641 if ((attr->test.ctx_size_out && !attr->test.ctx_out) || in bpf_prog_test_run()
3642 (!attr->test.ctx_size_out && attr->test.ctx_out)) in bpf_prog_test_run()
3645 prog = bpf_prog_get(attr->test.prog_fd); in bpf_prog_test_run()
3650 ret = prog->aux->ops->test_run(prog, attr, uattr); in bpf_prog_test_run()
3658 static int bpf_obj_get_next_id(const union bpf_attr *attr, in bpf_obj_get_next_id() argument
3663 u32 next_id = attr->start_id; in bpf_obj_get_next_id()
3741 static int bpf_prog_get_fd_by_id(const union bpf_attr *attr) in bpf_prog_get_fd_by_id() argument
3744 u32 id = attr->prog_id; in bpf_prog_get_fd_by_id()
3766 static int bpf_map_get_fd_by_id(const union bpf_attr *attr) in bpf_map_get_fd_by_id() argument
3769 u32 id = attr->map_id; in bpf_map_get_fd_by_id()
3774 attr->open_flags & ~BPF_OBJ_FLAG_MASK) in bpf_map_get_fd_by_id()
3780 f_flags = bpf_get_file_flag(attr->open_flags); in bpf_map_get_fd_by_id()
3915 const union bpf_attr *attr, in bpf_prog_get_info_by_fd() argument
3918 struct bpf_prog_info __user *uinfo = u64_to_user_ptr(attr->info.info); in bpf_prog_get_info_by_fd()
3921 u32 info_len = attr->info.info_len; in bpf_prog_get_info_by_fd()
4204 const union bpf_attr *attr, in bpf_map_get_info_by_fd() argument
4207 struct bpf_map_info __user *uinfo = u64_to_user_ptr(attr->info.info); in bpf_map_get_info_by_fd()
4209 u32 info_len = attr->info.info_len; in bpf_map_get_info_by_fd()
4249 const union bpf_attr *attr, in bpf_btf_get_info_by_fd() argument
4252 struct bpf_btf_info __user *uinfo = u64_to_user_ptr(attr->info.info); in bpf_btf_get_info_by_fd()
4253 u32 info_len = attr->info.info_len; in bpf_btf_get_info_by_fd()
4260 return btf_get_info_by_fd(btf, attr, uattr); in bpf_btf_get_info_by_fd()
4265 const union bpf_attr *attr, in bpf_link_get_info_by_fd() argument
4268 struct bpf_link_info __user *uinfo = u64_to_user_ptr(attr->info.info); in bpf_link_get_info_by_fd()
4270 u32 info_len = attr->info.info_len; in bpf_link_get_info_by_fd()
4302 static int bpf_obj_get_info_by_fd(const union bpf_attr *attr, in bpf_obj_get_info_by_fd() argument
4305 int ufd = attr->info.bpf_fd; in bpf_obj_get_info_by_fd()
4317 err = bpf_prog_get_info_by_fd(f.file, f.file->private_data, attr, in bpf_obj_get_info_by_fd()
4320 err = bpf_map_get_info_by_fd(f.file, f.file->private_data, attr, in bpf_obj_get_info_by_fd()
4323 err = bpf_btf_get_info_by_fd(f.file, f.file->private_data, attr, uattr); in bpf_obj_get_info_by_fd()
4326 attr, uattr); in bpf_obj_get_info_by_fd()
4336 static int bpf_btf_load(const union bpf_attr *attr, bpfptr_t uattr) in bpf_btf_load() argument
4344 return btf_new_fd(attr, uattr); in bpf_btf_load()
4349 static int bpf_btf_get_fd_by_id(const union bpf_attr *attr) in bpf_btf_get_fd_by_id() argument
4357 return btf_get_fd_by_id(attr->btf_id); in bpf_btf_get_fd_by_id()
4360 static int bpf_task_fd_query_copy(const union bpf_attr *attr, in bpf_task_fd_query_copy() argument
4366 char __user *ubuf = u64_to_user_ptr(attr->task_fd_query.buf); in bpf_task_fd_query_copy()
4372 input_len = attr->task_fd_query.buf_len; in bpf_task_fd_query_copy()
4409 static int bpf_task_fd_query(const union bpf_attr *attr, in bpf_task_fd_query() argument
4412 pid_t pid = attr->task_fd_query.pid; in bpf_task_fd_query()
4413 u32 fd = attr->task_fd_query.fd; in bpf_task_fd_query()
4425 if (attr->task_fd_query.flags != 0) in bpf_task_fd_query()
4448 err = bpf_task_fd_query_copy(attr, uattr, in bpf_task_fd_query()
4467 err = bpf_task_fd_query_copy(attr, uattr, prog_id, in bpf_task_fd_query()
4489 err = fn(map, attr, uattr); \
4492 static int bpf_map_do_batch(const union bpf_attr *attr, in bpf_map_do_batch() argument
4506 ufd = attr->batch.map_fd; in bpf_map_do_batch()
4538 static int link_create(union bpf_attr *attr, bpfptr_t uattr) in link_create() argument
4547 prog = bpf_prog_get(attr->link_create.prog_fd); in link_create()
4552 attr->link_create.attach_type); in link_create()
4561 if (attr->link_create.attach_type != BPF_PERF_EVENT) { in link_create()
4567 if (attr->link_create.attach_type != BPF_PERF_EVENT && in link_create()
4568 attr->link_create.attach_type != BPF_TRACE_KPROBE_MULTI) { in link_create()
4574 ptype = attach_type_to_prog_type(attr->link_create.attach_type); in link_create()
4590 ret = cgroup_bpf_link_attach(attr, prog); in link_create()
4594 attr->link_create.target_fd, in link_create()
4595 attr->link_create.target_btf_id, in link_create()
4596 attr->link_create.tracing.cookie); in link_create()
4600 if (attr->link_create.attach_type != prog->expected_attach_type) { in link_create()
4607 ret = bpf_iter_link_attach(attr, uattr, prog); in link_create()
4609 ret = cgroup_bpf_link_attach(attr, prog); in link_create()
4612 attr->link_create.target_fd, in link_create()
4613 attr->link_create.target_btf_id, in link_create()
4614 attr->link_create.tracing.cookie); in link_create()
4618 ret = netns_bpf_link_create(attr, prog); in link_create()
4622 ret = bpf_xdp_link_attach(attr, prog); in link_create()
4627 ret = bpf_perf_link_attach(attr, prog); in link_create()
4630 if (attr->link_create.attach_type == BPF_PERF_EVENT) in link_create()
4631 ret = bpf_perf_link_attach(attr, prog); in link_create()
4633 ret = bpf_kprobe_multi_link_attach(attr, prog); in link_create()
4647 static int link_update(union bpf_attr *attr) in link_update() argument
4657 flags = attr->link_update.flags; in link_update()
4661 link = bpf_link_get_from_fd(attr->link_update.link_fd); in link_update()
4665 new_prog = bpf_prog_get(attr->link_update.new_prog_fd); in link_update()
4672 old_prog = bpf_prog_get(attr->link_update.old_prog_fd); in link_update()
4678 } else if (attr->link_update.old_prog_fd) { in link_update()
4700 static int link_detach(union bpf_attr *attr) in link_detach() argument
4708 link = bpf_link_get_from_fd(attr->link_detach.link_fd); in link_detach()
4769 static int bpf_link_get_fd_by_id(const union bpf_attr *attr) in bpf_link_get_fd_by_id() argument
4772 u32 id = attr->link_id; in bpf_link_get_fd_by_id()
4828 static int bpf_enable_stats(union bpf_attr *attr) in bpf_enable_stats() argument
4837 switch (attr->enable_stats.type) { in bpf_enable_stats()
4848 static int bpf_iter_create(union bpf_attr *attr) in bpf_iter_create() argument
4856 if (attr->iter_create.flags) in bpf_iter_create()
4859 link = bpf_link_get_from_fd(attr->iter_create.link_fd); in bpf_iter_create()
4871 static int bpf_prog_bind_map(union bpf_attr *attr) in bpf_prog_bind_map() argument
4881 if (attr->prog_bind_map.flags) in bpf_prog_bind_map()
4884 prog = bpf_prog_get(attr->prog_bind_map.prog_fd); in bpf_prog_bind_map()
4888 map = bpf_map_get(attr->prog_bind_map.map_fd); in bpf_prog_bind_map()
4933 union bpf_attr attr; in __sys_bpf() local
4951 err = bpf_check_uarg_tail_zero(uattr, sizeof(attr), size); in __sys_bpf()
4954 size = min_t(u32, size, sizeof(attr)); in __sys_bpf()
4957 memset(&attr, 0, sizeof(attr)); in __sys_bpf()
4958 if (copy_from_bpfptr(&attr, uattr, size) != 0) in __sys_bpf()
4961 trace_android_vh_check_bpf_syscall(cmd, &attr, size); in __sys_bpf()
4963 err = security_bpf(cmd, &attr, size); in __sys_bpf()
4969 err = map_create(&attr); in __sys_bpf()
4972 err = map_lookup_elem(&attr); in __sys_bpf()
4975 err = map_update_elem(&attr, uattr); in __sys_bpf()
4978 err = map_delete_elem(&attr, uattr); in __sys_bpf()
4981 err = map_get_next_key(&attr); in __sys_bpf()
4984 err = map_freeze(&attr); in __sys_bpf()
4987 err = bpf_prog_load(&attr, uattr); in __sys_bpf()
4990 err = bpf_obj_pin(&attr); in __sys_bpf()
4993 err = bpf_obj_get(&attr); in __sys_bpf()
4996 err = bpf_prog_attach(&attr); in __sys_bpf()
4999 err = bpf_prog_detach(&attr); in __sys_bpf()
5002 err = bpf_prog_query(&attr, uattr.user); in __sys_bpf()
5005 err = bpf_prog_test_run(&attr, uattr.user); in __sys_bpf()
5008 err = bpf_obj_get_next_id(&attr, uattr.user, in __sys_bpf()
5012 err = bpf_obj_get_next_id(&attr, uattr.user, in __sys_bpf()
5016 err = bpf_obj_get_next_id(&attr, uattr.user, in __sys_bpf()
5020 err = bpf_prog_get_fd_by_id(&attr); in __sys_bpf()
5023 err = bpf_map_get_fd_by_id(&attr); in __sys_bpf()
5026 err = bpf_obj_get_info_by_fd(&attr, uattr.user); in __sys_bpf()
5029 err = bpf_raw_tracepoint_open(&attr); in __sys_bpf()
5032 err = bpf_btf_load(&attr, uattr); in __sys_bpf()
5035 err = bpf_btf_get_fd_by_id(&attr); in __sys_bpf()
5038 err = bpf_task_fd_query(&attr, uattr.user); in __sys_bpf()
5041 err = map_lookup_and_delete_elem(&attr); in __sys_bpf()
5044 err = bpf_map_do_batch(&attr, uattr.user, BPF_MAP_LOOKUP_BATCH); in __sys_bpf()
5047 err = bpf_map_do_batch(&attr, uattr.user, in __sys_bpf()
5051 err = bpf_map_do_batch(&attr, uattr.user, BPF_MAP_UPDATE_BATCH); in __sys_bpf()
5054 err = bpf_map_do_batch(&attr, uattr.user, BPF_MAP_DELETE_BATCH); in __sys_bpf()
5057 err = link_create(&attr, uattr); in __sys_bpf()
5060 err = link_update(&attr); in __sys_bpf()
5063 err = bpf_link_get_fd_by_id(&attr); in __sys_bpf()
5066 err = bpf_obj_get_next_id(&attr, uattr.user, in __sys_bpf()
5070 err = bpf_enable_stats(&attr); in __sys_bpf()
5073 err = bpf_iter_create(&attr); in __sys_bpf()
5076 err = link_detach(&attr); in __sys_bpf()
5079 err = bpf_prog_bind_map(&attr); in __sys_bpf()
5106 BPF_CALL_3(bpf_sys_bpf, int, cmd, union bpf_attr *, attr, u32, attr_size) in BPF_CALL_3() argument
5122 return __sys_bpf(cmd, KERNEL_BPFPTR(attr), attr_size); in BPF_CALL_3()
5131 int kern_sys_bpf(int cmd, union bpf_attr *attr, unsigned int size);
5133 int kern_sys_bpf(int cmd, union bpf_attr *attr, unsigned int size) in kern_sys_bpf() argument
5141 if (attr->test.data_in || attr->test.data_out || in kern_sys_bpf()
5142 attr->test.ctx_out || attr->test.duration || in kern_sys_bpf()
5143 attr->test.repeat || attr->test.flags) in kern_sys_bpf()
5146 prog = bpf_prog_get_type(attr->test.prog_fd, BPF_PROG_TYPE_SYSCALL); in kern_sys_bpf()
5150 if (attr->test.ctx_size_in < prog->aux->max_ctx_offset || in kern_sys_bpf()
5151 attr->test.ctx_size_in > U16_MAX) { in kern_sys_bpf()
5163 attr->test.retval = bpf_prog_run(prog, (void *) (long) attr->test.ctx_in); in kern_sys_bpf()
5170 return ____bpf_sys_bpf(cmd, attr, size); in kern_sys_bpf()