Home
last modified time | relevance | path

Searched refs:iovec (Results 1 – 25 of 146) sorted by relevance

123456

/linux/tools/testing/vsock/
H A Dutil.c524 size_t iovec_bytes(const struct iovec *iov, size_t iovnum) in iovec_bytes()
535 unsigned long iovec_hash_djb2(const struct iovec *iov, size_t iovnum) in iovec_hash_djb2()
582 struct iovec *alloc_test_iovec(const struct iovec *test_iovec, int iovnum) in alloc_test_iovec()
584 struct iovec *iovec; in alloc_test_iovec() local
587 iovec = malloc(sizeof(*iovec) * iovnum); in alloc_test_iovec()
588 if (!iovec) { in alloc_test_iovec()
594 iovec[i].iov_len = test_iovec[i].iov_len; in alloc_test_iovec()
596 iovec[i].iov_base = mmap(NULL, iovec[i].iov_len, in alloc_test_iovec()
600 if (iovec[i].iov_base == MAP_FAILED) { in alloc_test_iovec()
606 iovec[i].iov_base += (uintptr_t)test_iovec[i].iov_base; in alloc_test_iovec()
[all …]
H A Dvsock_uring_test.c34 struct iovec vecs[VSOCK_TEST_DATA_MAX_IOV];
65 struct iovec *iovec; in vsock_io_uring_client() local
78 iovec = alloc_test_iovec(test_data->vecs, test_data->vecs_cnt); in vsock_io_uring_client()
83 if (io_uring_register_buffers(&ring, iovec, test_data->vecs_cnt)) in vsock_io_uring_client()
87 msg.msg_iov = iovec; in vsock_io_uring_client()
104 control_writeulong(iovec_hash_djb2(iovec, test_data->vecs_cnt)); in vsock_io_uring_client()
108 free_test_iovec(test_data->vecs, iovec, test_data->vecs_cnt); in vsock_io_uring_client()
145 struct iovec iovec; in vsock_io_uring_server() local
148 iovec.iov_base = data + recv_len; in vsock_io_uring_server()
149 iovec.iov_len = data_len; in vsock_io_uring_server()
[all …]
H A Dutil.h66 size_t iovec_bytes(const struct iovec *iov, size_t iovnum);
67 unsigned long iovec_hash_djb2(const struct iovec *iov, size_t iovnum);
68 struct iovec *alloc_test_iovec(const struct iovec *test_iovec, int iovnum);
69 void free_test_iovec(const struct iovec *test_iovec,
70 struct iovec *iovec, int iovnum);
H A Dvsock_test_zerocopy.c47 struct iovec vecs[VSOCK_TEST_DATA_MAX_IOV];
151 struct iovec *iovec; in test_client() local
167 iovec = alloc_test_iovec(test_data->vecs, test_data->vecs_cnt); in test_client()
169 msg.msg_iov = iovec; in test_client()
182 if (sendmsg_res != iovec_bytes(iovec, test_data->vecs_cnt)) { in test_client()
184 iovec_bytes(iovec, test_data->vecs_cnt), in test_client()
210 control_writeulong(iovec_hash_djb2(iovec, test_data->vecs_cnt)); in test_client()
215 free_test_iovec(test_data->vecs, iovec, test_data->vecs_cnt); in test_client()
/linux/mm/
H A Dprocess_vm_access.c152 const struct iovec *rvec, in process_vm_rw_core()
255 const struct iovec __user *lvec, in process_vm_rw()
257 const struct iovec __user *rvec, in process_vm_rw()
261 struct iovec iovstack_l[UIO_FASTIOV]; in process_vm_rw()
262 struct iovec iovstack_r[UIO_FASTIOV]; in process_vm_rw()
263 struct iovec *iov_l = iovstack_l; in process_vm_rw()
264 struct iovec *iov_r; in process_vm_rw()
292 SYSCALL_DEFINE6(process_vm_readv, pid_t, pid, const struct iovec __user *, lvec, in SYSCALL_DEFINE6()
293 unsigned long, liovcnt, const struct iovec __user *, rvec, in SYSCALL_DEFINE6()
300 const struct iovec __user *, lvec, in SYSCALL_DEFINE6()
[all …]
/linux/tools/testing/selftests/user_events/
H A Dftrace_test.c308 struct iovec io[3]; in TEST_F()
336 ASSERT_EQ(-1, writev(self->data_fd, (const struct iovec *)io, 3)); in TEST_F()
342 ASSERT_EQ(-1, writev(self->data_fd, (const struct iovec *)io, 3)); in TEST_F()
354 ASSERT_NE(-1, writev(self->data_fd, (const struct iovec *)io, 3)); in TEST_F()
360 ASSERT_EQ(-1, writev(self->data_fd, (const struct iovec *)io, 3)); in TEST_F()
366 struct iovec io[1]; in TEST_F()
392 ASSERT_NE(-1, writev(self->data_fd, (const struct iovec *)io, 1)); in TEST_F()
399 struct iovec io[2]; in TEST_F()
426 ASSERT_NE(-1, writev(self->data_fd, (const struct iovec *)io, 2)); in TEST_F()
430 ASSERT_NE(-1, writev(self->data_fd, (const struct iovec *)io, 2)); in TEST_F()
[all …]
/linux/include/linux/
H A Duio.h64 struct iovec __ubuf_iovec;
68 const struct iovec *__iov;
85 static inline const struct iovec *iter_iov(const struct iov_iter *iter) in iter_iov()
88 return (const struct iovec *) &iter->__ubuf_iovec; in iter_iov()
160 static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs) in iov_length()
284 void iov_iter_init(struct iov_iter *i, unsigned int direction, const struct iovec *iov,
354 struct iovec *iovec_from_user(const struct iovec __user *uvector,
356 struct iovec *fast_iov, bool compat);
357 ssize_t import_iovec(int type, const struct iovec __user *uvec,
358 unsigned nr_segs, unsigned fast_segs, struct iovec **iovp,
[all …]
H A Dvringh.h99 struct iovec *iov;
133 struct iovec *iovec, unsigned num) in vringh_iov_init() argument
138 iov->iov = iovec; in vringh_iov_init()
/linux/drivers/vhost/
H A Dvringh.c229 sizeof(struct iovec), gfp); in resize_iovec()
231 new = kmalloc_array(new_num, sizeof(struct iovec), gfp); in resize_iovec()
234 iov->max_num * sizeof(struct iovec)); in resize_iovec()
731 BUILD_BUG_ON(sizeof(struct iovec) != sizeof(struct kvec)); in vringh_getdesc_user()
732 BUILD_BUG_ON(offsetof(struct iovec, iov_base) != in vringh_getdesc_user()
734 BUILD_BUG_ON(offsetof(struct iovec, iov_len) != in vringh_getdesc_user()
736 BUILD_BUG_ON(sizeof(((struct iovec *)NULL)->iov_base) in vringh_getdesc_user()
738 BUILD_BUG_ON(sizeof(((struct iovec *)NULL)->iov_len) in vringh_getdesc_user()
1109 struct iovec *iovec; member
1150 struct iovec *iovec = ivec->iov.iovec; in iotlb_translate() local
[all …]
/linux/tools/testing/selftests/powerpc/ptrace/
H A Dptrace.h108 struct iovec iov; in ptrace_read_regs()
128 struct iovec iov; in ptrace_write_regs()
146 struct iovec iov; in show_tar_registers()
192 struct iovec iov; in write_tar_registers()
235 struct iovec iov; in show_tm_checkpointed_state()
283 struct iovec iov; in write_ckpt_tar_registers()
370 struct iovec iov; in show_ckpt_fpr()
394 struct iovec iov; in write_ckpt_fpr()
539 struct iovec iov; in show_ckpt_gpr()
568 struct iovec iov; in write_ckpt_gpr()
[all …]
/linux/drivers/infiniband/hw/hfi1/
H A Dpin_system.c349 struct user_sdma_iovec *iovec, in add_system_iovec_to_sdma_packet() argument
358 start = (uintptr_t)iovec->iov.iov_base + iovec->offset; in add_system_iovec_to_sdma_packet()
385 iovec->offset += from_this_cache_entry; in add_system_iovec_to_sdma_packet()
403 struct user_sdma_iovec *iovec, in hfi1_add_pages_to_sdma_packet() argument
417 cur_iovec = iovec; in hfi1_add_pages_to_sdma_packet()
418 from_this_iovec = iovec->iov.iov_len - iovec->offset; in hfi1_add_pages_to_sdma_packet()
425 iovec++; in hfi1_add_pages_to_sdma_packet()
H A Duser_sdma.c278 struct iovec *iovec, unsigned long dim, in hfi1_user_sdma_process_request() argument
297 if (iovec[idx].iov_len < sizeof(info) + sizeof(req->hdr)) { in hfi1_user_sdma_process_request()
302 iovec[idx].iov_len, sizeof(info) + sizeof(req->hdr)); in hfi1_user_sdma_process_request()
305 ret = copy_from_user(&info, iovec[idx].iov_base, sizeof(info)); in hfi1_user_sdma_process_request()
391 ret = copy_from_user(&req->hdr, iovec[idx].iov_base + sizeof(info), in hfi1_user_sdma_process_request()
462 iovec + idx++, in hfi1_user_sdma_process_request()
483 u16 ntids = iovec[idx].iov_len / sizeof(*req->tids); in hfi1_user_sdma_process_request()
497 tmp = memdup_array_user(iovec[idx].iov_base, in hfi1_user_sdma_process_request()
682 struct user_sdma_iovec *iovec = NULL; in user_sdma_send_pkts() local
738 iovec = &req->iovs[req->iov_idx]; in user_sdma_send_pkts()
[all …]
H A Duser_sdma.h108 struct iovec iov;
199 struct iovec *iovec, unsigned long dim,
/linux/drivers/xen/xenbus/
H A Dxenbus_xs.c304 const struct kvec *iovec, in xs_talkv() argument
318 req->vec = iovec; in xs_talkv()
328 msg.len += iovec[i].iov_len; in xs_talkv()
360 struct kvec iovec; in xs_single() local
362 iovec.iov_base = (void *)string; in xs_single()
363 iovec.iov_len = strlen(string) + 1; in xs_single()
364 return xs_talkv(t, type, &iovec, 1, len); in xs_single()
483 struct kvec iovec[2]; in xenbus_write() local
490 iovec[0].iov_base = (void *)path; in xenbus_write()
491 iovec[0].iov_len = strlen(path) + 1; in xenbus_write()
[all …]
/linux/lib/
H A Diov_iter.c98 const struct iovec *p; in fault_in_iov_iter_readable()
141 const struct iovec *p; in fault_in_iov_iter_writeable()
163 const struct iovec *iov, unsigned long nr_segs, in iov_iter_init()
515 const struct iovec *iov, *end; in iov_iter_iovec_advance()
646 const struct iovec *iov = iter_iov(i); in iov_iter_revert()
793 const struct iovec *iov = iter_iov(i); in iov_iter_aligned_iovec()
887 const struct iovec *iov = iter_iov(i); in iov_iter_alignment_iovec()
968 const struct iovec *iov = iter_iov(i) + k; in iov_iter_gap_alignment()
1121 const struct iovec *iov = iter_iov(i) + k; in first_iovec_segment()
1242 const struct iovec *p; in iov_npages()
[all …]
/linux/fs/
H A Dread_write.c997 static ssize_t vfs_readv(struct file *file, const struct iovec __user *vec, in vfs_readv()
1000 struct iovec iovstack[UIO_FASTIOV]; in vfs_readv()
1001 struct iovec *iov = iovstack; in vfs_readv()
1035 static ssize_t vfs_writev(struct file *file, const struct iovec __user *vec, in vfs_writev()
1038 struct iovec iovstack[UIO_FASTIOV]; in vfs_writev()
1039 struct iovec *iov = iovstack; in vfs_writev()
1075 static ssize_t do_readv(unsigned long fd, const struct iovec __user *vec, in do_readv()
1099 static ssize_t do_writev(unsigned long fd, const struct iovec __user *vec, in do_writev()
1129 static ssize_t do_preadv(unsigned long fd, const struct iovec __user *vec, in do_preadv()
1152 static ssize_t do_pwritev(unsigned long fd, const struct iovec __user *vec, in do_pwritev()
[all …]
/linux/io_uring/
H A Drw.h9 struct iovec fast_iov;
10 struct iovec *free_iovec;
H A Dnet.h8 struct iovec fast_iov;
10 struct iovec *free_iov;
H A Drsrc.c30 static int io_sqe_buffer_register(struct io_ring_ctx *ctx, struct iovec *iov,
89 static int io_buffer_validate(struct iovec *iov) in io_buffer_validate()
401 struct iovec fast_iov, *iov; in __io_sqe_buffers_update()
403 struct iovec __user *uvec; in __io_sqe_buffers_update()
454 user_data += sizeof(struct iovec); in __io_sqe_buffers_update()
953 static int io_sqe_buffer_register(struct io_ring_ctx *ctx, struct iovec *iov, in io_sqe_buffer_register()
1030 struct iovec fast_iov, *iov = &fast_iov; in io_sqe_buffers_register()
1031 const struct iovec __user *uvec; in io_sqe_buffers_register()
1054 uvec = (struct iovec __user *) arg; in io_sqe_buffers_register()
1066 arg += sizeof(struct iovec); in io_sqe_buffers_register()
/linux/samples/user_events/
H A Dexample.c42 struct iovec io[2]; in main()
62 writev(data_fd, (const struct iovec *)io, 2); in main()
/linux/fs/xfs/
H A Dxfs_attr_item.c956 const struct xfs_log_iovec *iovec, in xfs_attri_validate_name_iovec() argument
959 if (iovec->i_len != xlog_calc_iovec_len(name_len)) { in xfs_attri_validate_name_iovec()
965 if (!xfs_attr_namecheck(attri_formatp->alfi_attr_filter, iovec->i_addr, in xfs_attri_validate_name_iovec()
970 iovec->i_addr, iovec->i_len); in xfs_attri_validate_name_iovec()
974 return iovec->i_addr; in xfs_attri_validate_name_iovec()
981 const struct xfs_log_iovec *iovec, in xfs_attri_validate_value_iovec() argument
984 if (iovec->i_len != xlog_calc_iovec_len(value_len)) { in xfs_attri_validate_value_iovec()
991 !xfs_parent_valuecheck(mp, iovec->i_addr, value_len)) { in xfs_attri_validate_value_iovec()
995 iovec->i_addr, iovec->i_len); in xfs_attri_validate_value_iovec()
999 return iovec->i_addr; in xfs_attri_validate_value_iovec()
/linux/tools/testing/selftests/arm64/fp/
H A Dzt-ptrace.c59 struct iovec iov; in get_za()
93 struct iovec iov; in set_za()
102 struct iovec iov; in get_zt()
112 struct iovec iov; in set_zt()
H A Dfp-ptrace.c234 struct iovec *iov_parent, in read_one_child_regs()
235 struct iovec *iov_child) in read_one_child_regs()
250 struct iovec iov_parent, iov_child; in read_child_regs()
321 struct iovec iov; in continue_breakpoint()
358 struct iovec iov; in check_ptrace_values_sve()
435 struct iovec iov; in check_ptrace_values_ssve()
510 struct iovec iov; in check_ptrace_values_za()
571 struct iovec iov; in check_ptrace_values_zt()
594 struct iovec iov; in check_ptrace_values()
990 struct iovec iov; in fpsimd_write()
[all …]
/linux/tools/testing/selftests/bpf/
H A Dnetlink_helpers.c110 struct iovec *iov = msg->msg_iov; in rtnl_recvmsg()
148 static int __rtnl_talk_iov(struct rtnl_handle *rtnl, struct iovec *iov, in __rtnl_talk_iov()
153 struct iovec riov; in __rtnl_talk_iov()
268 struct iovec iov = { in __rtnl_talk()
/linux/arch/arm64/kernel/
H A Dmte.c394 struct iovec *kiov, unsigned int gup_flags) in __access_remote_tags()
474 struct iovec *kiov, unsigned int gup_flags) in access_remote_tags()
500 struct iovec kiov; in mte_ptrace_copy_tags()
501 struct iovec __user *uiov = (void __user *)data; in mte_ptrace_copy_tags()

123456