Lines Matching refs:uattr

1506 static int map_update_elem(union bpf_attr *attr, bpfptr_t uattr)  in map_update_elem()  argument
1508 bpfptr_t ukey = make_bpfptr(attr->key, uattr.is_kernel); in map_update_elem()
1509 bpfptr_t uvalue = make_bpfptr(attr->value, uattr.is_kernel); in map_update_elem()
1562 static int map_delete_elem(union bpf_attr *attr, bpfptr_t uattr) in map_delete_elem() argument
1564 bpfptr_t ukey = make_bpfptr(attr->key, uattr.is_kernel); in map_delete_elem()
1683 union bpf_attr __user *uattr) in generic_map_delete_batch() argument
1702 if (put_user(0, &uattr->batch.count)) in generic_map_delete_batch()
1729 if (copy_to_user(&uattr->batch.count, &cp, sizeof(cp))) in generic_map_delete_batch()
1740 union bpf_attr __user *uattr) in generic_map_update_batch() argument
1762 if (put_user(0, &uattr->batch.count)) in generic_map_update_batch()
1790 if (copy_to_user(&uattr->batch.count, &cp, sizeof(cp))) in generic_map_update_batch()
1802 union bpf_attr __user *uattr) in generic_map_lookup_batch() argument
1825 if (put_user(0, &uattr->batch.count)) in generic_map_lookup_batch()
1890 if ((copy_to_user(&uattr->batch.count, &cp, sizeof(cp)) || in generic_map_lookup_batch()
2583 static int bpf_prog_load(union bpf_attr *attr, bpfptr_t uattr, u32 uattr_size) in bpf_prog_load() argument
2697 make_bpfptr(attr->insns, uattr.is_kernel), in bpf_prog_load()
2702 make_bpfptr(attr->license, uattr.is_kernel), in bpf_prog_load()
2740 err = bpf_check(&prog, attr, uattr, uattr_size); in bpf_prog_load()
3969 union bpf_attr __user *uattr) in bpf_prog_query() argument
4003 return cgroup_bpf_prog_query(attr, uattr); in bpf_prog_query()
4005 return lirc_prog_query(attr, uattr); in bpf_prog_query()
4008 return netns_bpf_prog_query(attr, uattr); in bpf_prog_query()
4013 return sock_map_bpf_prog_query(attr, uattr); in bpf_prog_query()
4016 return tcx_prog_query(attr, uattr); in bpf_prog_query()
4025 union bpf_attr __user *uattr) in bpf_prog_test_run() argument
4046 ret = prog->aux->ops->test_run(prog, attr, uattr); in bpf_prog_test_run()
4055 union bpf_attr __user *uattr, in bpf_obj_get_next_id() argument
4075 err = put_user(next_id, &uattr->next_id); in bpf_obj_get_next_id()
4312 union bpf_attr __user *uattr) in bpf_prog_get_info_by_fd() argument
4592 put_user(info_len, &uattr->info.info_len)) in bpf_prog_get_info_by_fd()
4601 union bpf_attr __user *uattr) in bpf_map_get_info_by_fd() argument
4637 put_user(info_len, &uattr->info.info_len)) in bpf_map_get_info_by_fd()
4646 union bpf_attr __user *uattr) in bpf_btf_get_info_by_fd() argument
4656 return btf_get_info_by_fd(btf, attr, uattr); in bpf_btf_get_info_by_fd()
4662 union bpf_attr __user *uattr) in bpf_link_get_info_by_fd() argument
4690 put_user(info_len, &uattr->info.info_len)) in bpf_link_get_info_by_fd()
4700 union bpf_attr __user *uattr) in bpf_obj_get_info_by_fd() argument
4715 uattr); in bpf_obj_get_info_by_fd()
4718 uattr); in bpf_obj_get_info_by_fd()
4720 err = bpf_btf_get_info_by_fd(f.file, f.file->private_data, attr, uattr); in bpf_obj_get_info_by_fd()
4723 attr, uattr); in bpf_obj_get_info_by_fd()
4733 static int bpf_btf_load(const union bpf_attr *attr, bpfptr_t uattr, __u32 uattr_size) in bpf_btf_load() argument
4741 return btf_new_fd(attr, uattr, uattr_size); in bpf_btf_load()
4758 union bpf_attr __user *uattr, in bpf_task_fd_query_copy() argument
4767 if (put_user(len, &uattr->task_fd_query.buf_len)) in bpf_task_fd_query_copy()
4795 if (put_user(prog_id, &uattr->task_fd_query.prog_id) || in bpf_task_fd_query_copy()
4796 put_user(fd_type, &uattr->task_fd_query.fd_type) || in bpf_task_fd_query_copy()
4797 put_user(probe_offset, &uattr->task_fd_query.probe_offset) || in bpf_task_fd_query_copy()
4798 put_user(probe_addr, &uattr->task_fd_query.probe_addr)) in bpf_task_fd_query_copy()
4807 union bpf_attr __user *uattr) in bpf_task_fd_query() argument
4845 err = bpf_task_fd_query_copy(attr, uattr, in bpf_task_fd_query()
4864 err = bpf_task_fd_query_copy(attr, uattr, prog_id, in bpf_task_fd_query()
4890 union bpf_attr __user *uattr, in bpf_map_do_batch() argument
4920 BPF_DO_BATCH(map->ops->map_lookup_batch, map, attr, uattr); in bpf_map_do_batch()
4922 BPF_DO_BATCH(map->ops->map_lookup_and_delete_batch, map, attr, uattr); in bpf_map_do_batch()
4924 BPF_DO_BATCH(map->ops->map_update_batch, map, f.file, attr, uattr); in bpf_map_do_batch()
4926 BPF_DO_BATCH(map->ops->map_delete_batch, map, attr, uattr); in bpf_map_do_batch()
4935 static int link_create(union bpf_attr *attr, bpfptr_t uattr) in link_create() argument
4980 ret = bpf_iter_link_attach(attr, uattr, prog); in link_create()
5346 static int __sys_bpf(int cmd, bpfptr_t uattr, unsigned int size) in __sys_bpf() argument
5351 err = bpf_check_uarg_tail_zero(uattr, sizeof(attr), size); in __sys_bpf()
5358 if (copy_from_bpfptr(&attr, uattr, size) != 0) in __sys_bpf()
5373 err = map_update_elem(&attr, uattr); in __sys_bpf()
5376 err = map_delete_elem(&attr, uattr); in __sys_bpf()
5385 err = bpf_prog_load(&attr, uattr, size); in __sys_bpf()
5400 err = bpf_prog_query(&attr, uattr.user); in __sys_bpf()
5403 err = bpf_prog_test_run(&attr, uattr.user); in __sys_bpf()
5406 err = bpf_obj_get_next_id(&attr, uattr.user, in __sys_bpf()
5410 err = bpf_obj_get_next_id(&attr, uattr.user, in __sys_bpf()
5414 err = bpf_obj_get_next_id(&attr, uattr.user, in __sys_bpf()
5424 err = bpf_obj_get_info_by_fd(&attr, uattr.user); in __sys_bpf()
5430 err = bpf_btf_load(&attr, uattr, size); in __sys_bpf()
5436 err = bpf_task_fd_query(&attr, uattr.user); in __sys_bpf()
5442 err = bpf_map_do_batch(&attr, uattr.user, BPF_MAP_LOOKUP_BATCH); in __sys_bpf()
5445 err = bpf_map_do_batch(&attr, uattr.user, in __sys_bpf()
5449 err = bpf_map_do_batch(&attr, uattr.user, BPF_MAP_UPDATE_BATCH); in __sys_bpf()
5452 err = bpf_map_do_batch(&attr, uattr.user, BPF_MAP_DELETE_BATCH); in __sys_bpf()
5455 err = link_create(&attr, uattr); in __sys_bpf()
5464 err = bpf_obj_get_next_id(&attr, uattr.user, in __sys_bpf()
5487 SYSCALL_DEFINE3(bpf, int, cmd, union bpf_attr __user *, uattr, unsigned int, size) in SYSCALL_DEFINE3() argument
5489 return __sys_bpf(cmd, USER_BPFPTR(uattr), size); in SYSCALL_DEFINE3()