/fs/smb/client/ |
D | smb2pdu.c | 846 add_posix_context(struct kvec *iov, unsigned int *num_iovec, umode_t mode) in add_posix_context() argument 848 struct smb2_create_req *req = iov[0].iov_base; in add_posix_context() 851 iov[num].iov_base = create_posix_buf(mode); in add_posix_context() 854 if (iov[num].iov_base == NULL) in add_posix_context() 856 iov[num].iov_len = sizeof(struct create_posix); in add_posix_context() 860 iov[num - 1].iov_len); in add_posix_context() 890 struct kvec iov[1]; in SMB2_negotiate() local 963 iov[0].iov_base = (char *)req; in SMB2_negotiate() 964 iov[0].iov_len = total_len; in SMB2_negotiate() 967 rqst.rq_iov = iov; in SMB2_negotiate() [all …]
|
D | transport.c | 250 struct kvec *iov; in smb_rqst_len() local 256 iov = &rqst->rq_iov[1]; in smb_rqst_len() 259 iov = rqst->rq_iov; in smb_rqst_len() 265 buflen += iov[i].iov_len; in smb_rqst_len() 295 struct kvec *iov; in __smb_send_rqst() local 360 iov = rqst[j].rq_iov; in __smb_send_rqst() 365 dump_smb(iov[i].iov_base, iov[i].iov_len); in __smb_send_rqst() 366 size += iov[i].iov_len; in __smb_send_rqst() 369 iov_iter_kvec(&smb_msg.msg_iter, ITER_SOURCE, iov, n_vec, size); in __smb_send_rqst() 451 struct kvec iov; in smb_send_rqst() local [all …]
|
D | sess.c | 1257 struct kvec iov[3]; member 1274 sess_data->iov[0].iov_base = (char *)smb_buf; in sess_alloc_buffer() 1275 sess_data->iov[0].iov_len = be32_to_cpu(smb_buf->smb_buf_length) + 4; in sess_alloc_buffer() 1283 sess_data->iov[2].iov_base = kmalloc(2000, GFP_KERNEL); in sess_alloc_buffer() 1284 if (!sess_data->iov[2].iov_base) { in sess_alloc_buffer() 1293 sess_data->iov[0].iov_base = NULL; in sess_alloc_buffer() 1294 sess_data->iov[0].iov_len = 0; in sess_alloc_buffer() 1302 struct kvec *iov = sess_data->iov; in sess_free_buffer() local 1308 if (sess_data->buf0_type != CIFS_NO_BUFFER && iov[0].iov_base) in sess_free_buffer() 1309 memzero_explicit(iov[0].iov_base, iov[0].iov_len); in sess_free_buffer() [all …]
|
D | smb2file.c | 25 static struct smb2_symlink_err_rsp *symlink_data(const struct kvec *iov) in symlink_data() argument 27 struct smb2_err_rsp *err = iov->iov_base; in symlink_data() 37 if (le32_to_cpu(err->ByteCount) < len || iov->iov_len < len + sizeof(*err) + 1) in symlink_data() 41 end = (struct smb2_error_context_rsp *)((u8 *)err + iov->iov_len); in symlink_data() 54 iov->iov_len >= SMB2_SYMLINK_STRUCT_SIZE) { in symlink_data() 65 int smb2_parse_symlink_response(struct cifs_sb_info *cifs_sb, const struct kvec *iov, char **path) in smb2_parse_symlink_response() argument 72 if (!cifs_sb || !iov || !iov->iov_base || !iov->iov_len || !path) in smb2_parse_symlink_response() 75 sym = symlink_data(iov); in smb2_parse_symlink_response() 84 if (iov->iov_len < SMB2_SYMLINK_STRUCT_SIZE + sub_offs + sub_len || in smb2_parse_symlink_response() 85 iov->iov_len < SMB2_SYMLINK_STRUCT_SIZE + print_offs + print_len) in smb2_parse_symlink_response()
|
D | cifsencrypt.c | 33 struct kvec *iov = rqst->rq_iov; in __cifs_calc_signature() local 38 if (iov[0].iov_len <= 4) in __cifs_calc_signature() 42 if (n_vec < 2 || iov[0].iov_len != 4) in __cifs_calc_signature() 48 if (iov[i].iov_len == 0) in __cifs_calc_signature() 50 if (iov[i].iov_base == NULL) { in __cifs_calc_signature() 56 iov[i].iov_base, iov[i].iov_len); in __cifs_calc_signature() 170 int cifs_sign_smbv(struct kvec *iov, int n_vec, struct TCP_Server_Info *server, in cifs_sign_smbv() argument 173 struct smb_rqst rqst = { .rq_iov = iov, in cifs_sign_smbv() 183 struct kvec iov[2]; in cifs_sign_smb() local 185 iov[0].iov_base = cifs_pdu; in cifs_sign_smb() [all …]
|
D | smb2transport.c | 234 struct kvec *iov = rqst->rq_iov; in smb2_calc_signature() local 235 struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base; in smb2_calc_signature() 283 if (drqst.rq_nvec >= 2 && iov[0].iov_len == 4) { in smb2_calc_signature() 284 rc = crypto_shash_update(shash, iov[0].iov_base, in smb2_calc_signature() 285 iov[0].iov_len); in smb2_calc_signature() 558 struct kvec *iov = rqst->rq_iov; in smb3_calc_signature() local 559 struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base; in smb3_calc_signature() 606 if (drqst.rq_nvec >= 2 && iov[0].iov_len == 4) { in smb3_calc_signature() 607 rc = crypto_shash_update(shash, iov[0].iov_base, in smb3_calc_signature() 608 iov[0].iov_len); in smb3_calc_signature() [all …]
|
D | smb2proto.h | 94 int smb2_parse_symlink_response(struct cifs_sb_info *cifs_sb, const struct kvec *iov, char **path); 193 unsigned int *nbytes, struct kvec *iov, int n_vec); 261 struct kvec *iov, unsigned int min_buf_size); 264 struct kvec *iov, 272 struct kvec *iov, int nvec);
|
D | cifssmb.c | 564 struct kvec iov[2]; in CIFSSMBEcho() local 565 struct smb_rqst rqst = { .rq_iov = iov, in CIFSSMBEcho() 585 iov[0].iov_len = 4; in CIFSSMBEcho() 586 iov[0].iov_base = smb; in CIFSSMBEcho() 587 iov[1].iov_len = get_rfc1002_length(smb); in CIFSSMBEcho() 588 iov[1].iov_base = (char *)smb + 4; in CIFSSMBEcho() 1258 struct smb_rqst rqst = { .rq_iov = rdata->iov, in cifs_readv_callback() 1314 struct smb_rqst rqst = { .rq_iov = rdata->iov, in cifs_async_readv() 1355 rdata->iov[0].iov_base = smb; in cifs_async_readv() 1356 rdata->iov[0].iov_len = 4; in cifs_async_readv() [all …]
|
D | smbdirect.c | 39 struct kvec *iov, int n_vec, int remaining_data_length); 1015 struct smbd_connection *info, struct kvec *iov, int n_vec, in smbd_post_send_data() argument 1029 data_length += iov[i].iov_len; in smbd_post_send_data() 1030 sg_set_buf(&sgl[i], iov[i].iov_base, iov[i].iov_len); in smbd_post_send_data() 1997 struct kvec *iov; in smbd_send() local 2027 iov = rqst->rq_iov; in smbd_send() 2033 remaining_vec_data_length += iov[i].iov_len; in smbd_send() 2034 dump_smb(iov[i].iov_base, iov[i].iov_len); in smbd_send() 2052 vecs[j].iov_base = iov[i].iov_base + offset; in smbd_send() 2053 if (buflen + iov[i].iov_len > max_iov_size) { in smbd_send() [all …]
|
D | smb2ops.c | 1883 struct kvec *iov, unsigned long nr_segs) in smb2_sync_write() argument 1888 return SMB2_write(xid, parms, written, iov, nr_segs); in smb2_sync_write() 3557 struct kvec iov[2]; in smb3_simple_fallocate_write_range() local 3571 iov[1].iov_base = buf; in smb3_simple_fallocate_write_range() 3572 iov[1].iov_len = io_parms.length; in smb3_simple_fallocate_write_range() 3573 rc = SMB2_write(xid, &io_parms, &nbytes, iov, 1); in smb3_simple_fallocate_write_range() 4413 struct kvec *iov = &rqst[i].rq_iov[j]; in smb2_get_aead_req() local 4416 addr = (unsigned long)iov->iov_base + skip; in smb2_get_aead_req() 4417 len = iov->iov_len - skip; in smb2_get_aead_req() 4653 struct kvec iov[2]; in decrypt_raw_data() local [all …]
|
D | link.c | 420 struct kvec iov[2]; in smb3_create_mf_symlink() local 455 iov[1].iov_base = pbuf; in smb3_create_mf_symlink() 456 iov[1].iov_len = CIFS_MF_SYMLINK_FILE_SIZE; in smb3_create_mf_symlink() 458 rc = SMB2_write(xid, &io_parms, pbytes_written, iov, 1); in smb3_create_mf_symlink()
|
D | smb1ops.c | 779 struct kvec *iov, unsigned long nr_segs) in cifs_sync_write() argument 783 return CIFSSMBWrite2(xid, parms, written, iov, nr_segs); in cifs_sync_write() 1073 struct kvec iov[2]; in cifs_make_node() local 1149 iov[1].iov_base = &buf.fi; in cifs_make_node() 1150 iov[1].iov_len = sizeof(struct win_dev); in cifs_make_node() 1156 &bytes_written, iov, 1); in cifs_make_node() 1162 &bytes_written, iov, 1); in cifs_make_node()
|
D | smb2misc.c | 873 struct kvec *iov, int nvec) in smb311_update_preauth_hash() argument 879 hdr = (struct smb2_hdr *)iov[0].iov_base; in smb311_update_preauth_hash() 922 rc = crypto_shash_update(sha512, iov[i].iov_base, iov[i].iov_len); in smb311_update_preauth_hash()
|
/fs/smb/server/ |
D | transport_tcp.c | 36 struct kvec *iov; member 103 kfree(t->iov); in free_transport() 116 static unsigned int kvec_array_init(struct kvec *new, struct kvec *iov, in kvec_array_init() argument 121 while (bytes || !iov->iov_len) { in kvec_array_init() 122 int copy = min(bytes, iov->iov_len); in kvec_array_init() 126 if (iov->iov_len == base) { in kvec_array_init() 127 iov++; in kvec_array_init() 133 memcpy(new, iov, sizeof(*iov) * nr_segs); in kvec_array_init() 150 if (t->iov && nr_segs <= t->nr_iov) in get_conn_iovec() 151 return t->iov; in get_conn_iovec() [all …]
|
D | ksmbd_work.c | 32 work->iov = kcalloc(work->iov_alloc_cnt, sizeof(struct kvec), in ksmbd_alloc_work_struct() 34 if (!work->iov) { in ksmbd_alloc_work_struct() 58 kfree(work->iov); in ksmbd_free_work_struct() 104 work->iov[++work->iov_idx].iov_base = ib; in __ksmbd_iov_pin() 105 work->iov[work->iov_idx].iov_len = ib_len; in __ksmbd_iov_pin() 126 new = krealloc(work->iov, in __ksmbd_iov_pin_rsp() 134 work->iov = new; in __ksmbd_iov_pin_rsp() 139 work->iov[work->iov_idx].iov_base = work->response_buf; in __ksmbd_iov_pin_rsp() 140 *(__be32 *)work->iov[0].iov_base = 0; in __ksmbd_iov_pin_rsp() 141 work->iov[work->iov_idx].iov_len = 4; in __ksmbd_iov_pin_rsp() [all …]
|
D | auth.c | 575 int ksmbd_sign_smb2_pdu(struct ksmbd_conn *conn, char *key, struct kvec *iov, in ksmbd_sign_smb2_pdu() argument 601 iov[i].iov_base, in ksmbd_sign_smb2_pdu() 602 iov[i].iov_len); in ksmbd_sign_smb2_pdu() 626 int ksmbd_sign_smb3_pdu(struct ksmbd_conn *conn, char *key, struct kvec *iov, in ksmbd_sign_smb3_pdu() argument 652 iov[i].iov_base, in ksmbd_sign_smb3_pdu() 653 iov[i].iov_len); in ksmbd_sign_smb3_pdu() 1030 static struct scatterlist *ksmbd_init_sg(struct kvec *iov, unsigned int nvec, in ksmbd_init_sg() argument 1045 unsigned long kaddr = (unsigned long)iov[i + 1].iov_base; in ksmbd_init_sg() 1047 if (is_vmalloc_addr(iov[i + 1].iov_base)) { in ksmbd_init_sg() 1048 nr_entries[i] = ((kaddr + iov[i + 1].iov_len + in ksmbd_init_sg() [all …]
|
D | auth.h | 39 int ksmbd_crypt_message(struct ksmbd_work *work, struct kvec *iov, 55 int ksmbd_sign_smb2_pdu(struct ksmbd_conn *conn, char *key, struct kvec *iov, 57 int ksmbd_sign_smb3_pdu(struct ksmbd_conn *conn, char *key, struct kvec *iov,
|
D | transport_rdma.c | 228 struct kvec *iov, int niov, 1163 struct kvec *iov, int niov, in smb_direct_post_send_data() argument 1177 data_length += iov[i].iov_len; in smb_direct_post_send_data() 1192 iov[i].iov_base, iov[i].iov_len, in smb_direct_post_send_data() 1227 struct kvec *iov, int niovs, int buflen, in smb_direct_writev() argument 1252 buflen += iov[i].iov_len; in smb_direct_writev() 1256 (buflen - iov[i].iov_len); in smb_direct_writev() 1258 &iov[start], i - start, in smb_direct_writev() 1269 (char *)iov[start].iov_base + in smb_direct_writev() 1292 &iov[start], i - start, in smb_direct_writev()
|
D | smb2pdu.c | 398 work->iov[work->iov_idx].iov_len += (new_len - len); in init_chained_smb2_rsp() 479 work->iov[work->iov_idx].iov_len += len; in is_chained_smb2_message() 8349 struct kvec iov[1]; in smb2_check_sign_req() local 8367 iov[0].iov_base = (char *)&hdr->ProtocolId; in smb2_check_sign_req() 8368 iov[0].iov_len = len; in smb2_check_sign_req() 8370 if (ksmbd_sign_smb2_pdu(work->conn, work->sess->sess_key, iov, 1, in smb2_check_sign_req() 8391 struct kvec *iov; in smb2_set_sign_rsp() local 8399 iov = &work->iov[work->iov_idx - 1]; in smb2_set_sign_rsp() 8402 iov = &work->iov[work->iov_idx]; in smb2_set_sign_rsp() 8405 if (!ksmbd_sign_smb2_pdu(work->conn, work->sess->sess_key, iov, n_vec, in smb2_set_sign_rsp() [all …]
|
D | ksmbd_work.h | 41 struct kvec *iov; member
|
D | connection.c | 190 sent = conn->transport->ops->writev(conn->transport, work->iov, in ksmbd_conn_write() 192 get_rfc1002_len(work->iov[0].iov_base) + 4, in ksmbd_conn_write()
|
/fs/fuse/ |
D | ioctl.c | 71 static int fuse_verify_ioctl_iov(struct fuse_conn *fc, struct iovec *iov, in fuse_verify_ioctl_iov() argument 77 for (n = 0; n < count; n++, iov++) { in fuse_verify_ioctl_iov() 78 if (iov->iov_len > (size_t) max) in fuse_verify_ioctl_iov() 80 max -= iov->iov_len; in fuse_verify_ioctl_iov() 216 struct iovec *iov = iov_page; in fuse_do_ioctl() local 218 iov->iov_base = (void __user *)arg; in fuse_do_ioctl() 219 iov->iov_len = _IOC_SIZE(cmd); in fuse_do_ioctl() 222 in_iov = iov; in fuse_do_ioctl() 227 out_iov = iov; in fuse_do_ioctl()
|
/fs/afs/ |
D | rxrpc.c | 299 struct kvec iov[1]; in afs_make_call() local 357 iov[0].iov_base = call->request; in afs_make_call() 358 iov[0].iov_len = call->request_size; in afs_make_call() 362 iov_iter_kvec(&msg.msg_iter, ITER_SOURCE, iov, 1, call->request_size); in afs_make_call() 854 struct kvec iov[1]; in afs_send_simple_reply() local 861 iov[0].iov_base = (void *) buf; in afs_send_simple_reply() 862 iov[0].iov_len = len; in afs_send_simple_reply() 865 iov_iter_kvec(&msg.msg_iter, ITER_SOURCE, iov, 1, len); in afs_send_simple_reply()
|
/fs/ |
D | read_write.c | 406 struct kvec iov = { in __kernel_read() local 427 iov_iter_kvec(&iter, ITER_DEST, &iov, 1, iov.iov_len); in __kernel_read() 531 struct kvec iov = { in __kernel_write() local 536 iov_iter_kvec(&iter, ITER_SOURCE, &iov, 1, iov.iov_len); in __kernel_write() 910 struct iovec *iov = iovstack; in vfs_readv() local 914 ret = import_iovec(ITER_DEST, vec, vlen, ARRAY_SIZE(iovstack), &iov, &iter); in vfs_readv() 917 kfree(iov); in vfs_readv() 927 struct iovec *iov = iovstack; in vfs_writev() local 931 ret = import_iovec(ITER_SOURCE, vec, vlen, ARRAY_SIZE(iovstack), &iov, &iter); in vfs_writev() 936 kfree(iov); in vfs_writev()
|
/fs/dlm/ |
D | lowcomms.c | 913 struct kvec iov; in receive_from_sock() local 935 iov.iov_base = con->rx_buf + con->rx_leftover; in receive_from_sock() 936 iov.iov_len = con->rx_buflen - con->rx_leftover; in receive_from_sock() 940 ret = kernel_recvmsg(con->sock, &msg, &iov, 1, iov.iov_len, in receive_from_sock()
|