search for: iov_base

Displaying 20 results from an estimated 501 matches for "iov_base".

2016 Dec 25
1
System freeze if mount cifs share with option "hard", and samba server is not available
...05:35:56 machine-hostname kernel: [<ffffffff811e3e4e>] SyS_newfstatat+0xe/0x10 Dec 25 05:35:56 machine-hostname kernel: [<ffffffff81645909>] system_call_fastpath+0x16/0x1b (5) enable "cifsFYI", observed cifs.ko keeps printing the logs below: [ 3058.820504] fs/cifs/file.c: 7: iov_base=ffff8800129e6000 iov_len=4096 [ 3058.820506] fs/cifs/file.c: 8: iov_base=ffff88003d4e3000 iov_len=4096 [ 3058.820508] fs/cifs/file.c: 9: iov_base=ffff8800109cb000 iov_len=4096 [ 3058.820510] fs/cifs/file.c: 10: iov_base=ffff88003b56b000 iov_len=4096 [ 3058.820512] fs/cifs/file.c: 11: iov_base=ffff8...
2011 Apr 08
0
[PATCH] Btrfs: check for duplicate iov_base's when doing dio reads
...rw, struct kiocb *io unsigned long nr_segs) { int seg; + int i; size_t size; unsigned long addr; unsigned blocksize_mask = root->sectorsize - 1; @@ -6219,8 +6220,22 @@ static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *io addr = (unsigned long)iov[seg].iov_base; size = iov[seg].iov_len; end += size; - if ((addr & blocksize_mask) || (size & blocksize_mask)) + if ((addr & blocksize_mask) || (size & blocksize_mask)) goto out; + + /* If this is a write we don''t need to check anymore */ + if (rw & WRITE) + continue...
2010 Mar 03
1
[RFC][ PATCH 2/3] vhost-net: handle vnet_hdr processing for MRG_RX_BUF
...struct socket *sock = rcu_dereference(vq->private_data); if (!sock) return; @@ -124,7 +123,6 @@ if (wmem < sock->sk->sk_sndbuf * 2) tx_poll_stop(net); - hdr_size = vq->hdr_size; for (;;) { head.iov_base = (void *)vhost_get_vq_desc(&net->dev, vq, @@ -148,25 +146,45 @@ "out %d, int %d\n", out, in); break; } + if (vq->guest_hlen > vq->sock_hlen) { + if (msg.msg_iov[0].i...
2010 Mar 03
1
[RFC][ PATCH 2/3] vhost-net: handle vnet_hdr processing for MRG_RX_BUF
...struct socket *sock = rcu_dereference(vq->private_data); if (!sock) return; @@ -124,7 +123,6 @@ if (wmem < sock->sk->sk_sndbuf * 2) tx_poll_stop(net); - hdr_size = vq->hdr_size; for (;;) { head.iov_base = (void *)vhost_get_vq_desc(&net->dev, vq, @@ -148,25 +146,45 @@ "out %d, int %d\n", out, in); break; } + if (vq->guest_hlen > vq->sock_hlen) { + if (msg.msg_iov[0].i...
2018 Dec 12
4
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...n) { - virtio_transport_free_pkt(pkt); - vq_err(vq, "Faulted on copying pkt buf\n"); - break; + remain_len = pkt->len; + for (i = 0; i < pkt->nr_vecs; i++) { + int tmp_len; + + tmp_len = min(remain_len, pkt->vec[i].iov_len); + nbytes = copy_to_iter(pkt->vec[i].iov_base, tmp_len, &iov_iter); + if (nbytes != tmp_len) { + virtio_transport_free_pkt(pkt); + vq_err(vq, "Faulted on copying pkt buf\n"); + break; + } + + remain_len -= tmp_len; } vhost_add_used_n(vq, vq->heads, headcount); @@ -341,6 +351,7 @@ static void vhost_transpo...
2018 Dec 12
4
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...n) { - virtio_transport_free_pkt(pkt); - vq_err(vq, "Faulted on copying pkt buf\n"); - break; + remain_len = pkt->len; + for (i = 0; i < pkt->nr_vecs; i++) { + int tmp_len; + + tmp_len = min(remain_len, pkt->vec[i].iov_len); + nbytes = copy_to_iter(pkt->vec[i].iov_base, tmp_len, &iov_iter); + if (nbytes != tmp_len) { + virtio_transport_free_pkt(pkt); + vq_err(vq, "Faulted on copying pkt buf\n"); + break; + } + + remain_len -= tmp_len; } vhost_add_used_n(vq, vq->heads, headcount); @@ -341,6 +351,7 @@ static void vhost_transpo...
2018 Dec 13
2
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...aulted on copying pkt buf\n"); >> - break; >> + remain_len = pkt->len; >> + for (i = 0; i < pkt->nr_vecs; i++) { >> + int tmp_len; >> + >> + tmp_len = min(remain_len, pkt->vec[i].iov_len); >> + nbytes = copy_to_iter(pkt->vec[i].iov_base, tmp_len, &iov_iter); >> + if (nbytes != tmp_len) { >> + virtio_transport_free_pkt(pkt); >> + vq_err(vq, "Faulted on copying pkt buf\n"); >> + break; >> + } >> + >> + remain_len -= tmp_len; >> } >> >> vho...
2018 Dec 13
2
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...aulted on copying pkt buf\n"); >> - break; >> + remain_len = pkt->len; >> + for (i = 0; i < pkt->nr_vecs; i++) { >> + int tmp_len; >> + >> + tmp_len = min(remain_len, pkt->vec[i].iov_len); >> + nbytes = copy_to_iter(pkt->vec[i].iov_base, tmp_len, &iov_iter); >> + if (nbytes != tmp_len) { >> + virtio_transport_free_pkt(pkt); >> + vq_err(vq, "Faulted on copying pkt buf\n"); >> + break; >> + } >> + >> + remain_len -= tmp_len; >> } >> >> vho...
2024 Nov 06
1
Slow reply to "smbclient -NL localhost" : strace
On 06/11/2024 08:04, Michael Tokarev wrote: > Take a closer look at strace.? You've already noticed > the recv() call takes a noticeable time, - find all of > them. > > BTW, in your strace output you omitted some important > pieces, for example, it isn't visible what FD#5 corresponds > to, since you omitted its creation/open. > > The prob might not be the (host)
2024 Nov 06
1
Slow reply to "smbclient -NL localhost" : strace
...e >> entirely. > > Here's the output of "strace --relative-timestamps -o strace.smbclient.log smbclient -NL 127.0.0.1" : > > https://pastebin.com/raw/v3hFY5DB So, as you can see yourself, there are 2 interesting places (adding some context): 0.000442 writev(4, [{iov_base="\0\0\0\204", iov_len=4}, {iov_base="\376SMB@\0\1\0\0\0\0\0\5\0\1\0\20\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0"..., iov_len=64}, {iov_base="9\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\237\1\2\0\0\0\0\0"..., iov_len=56}, {iov_base="s\0r\0v\0s\0v\0c\0", iov_len=12}]...
2015 Feb 04
2
[PATCH v3 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()
...-/* Pop first len bytes from iovec. Return number of segments used. */ -static int move_iovec_hdr(struct iovec *from, struct iovec *to, - size_t len, int iov_count) -{ - int seg = 0; - size_t size; - - while (len && seg < iov_count) { - size = min(from->iov_len, len); - to->iov_base = from->iov_base; - to->iov_len = size; - from->iov_len -= size; - from->iov_base += size; - len -= size; - ++from; - ++to; - ++seg; - } - return seg; -} -/* Copy iovec entries for len bytes from iovec. */ -static void copy_iovec_hdr(const struct iovec *from, struct iovec *to, -...
2015 Feb 04
2
[PATCH v3 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()
...-/* Pop first len bytes from iovec. Return number of segments used. */ -static int move_iovec_hdr(struct iovec *from, struct iovec *to, - size_t len, int iov_count) -{ - int seg = 0; - size_t size; - - while (len && seg < iov_count) { - size = min(from->iov_len, len); - to->iov_base = from->iov_base; - to->iov_len = size; - from->iov_len -= size; - from->iov_base += size; - len -= size; - ++from; - ++to; - ++seg; - } - return seg; -} -/* Copy iovec entries for len bytes from iovec. */ -static void copy_iovec_hdr(const struct iovec *from, struct iovec *to, -...
2018 Dec 12
0
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...> - vq_err(vq, "Faulted on copying pkt buf\n"); > - break; > + remain_len = pkt->len; > + for (i = 0; i < pkt->nr_vecs; i++) { > + int tmp_len; > + > + tmp_len = min(remain_len, pkt->vec[i].iov_len); > + nbytes = copy_to_iter(pkt->vec[i].iov_base, tmp_len, &iov_iter); > + if (nbytes != tmp_len) { > + virtio_transport_free_pkt(pkt); > + vq_err(vq, "Faulted on copying pkt buf\n"); > + break; > + } > + > + remain_len -= tmp_len; > } > > vhost_add_used_n(vq, vq->heads, headcou...
2024 Nov 05
1
Slow reply to "smbclient -NL localhost" : strace
...clock_gettime64(CLOCK_REALTIME, {tv_sec=1730806466, tv_nsec=500839090}) = 0 0.000555 clock_gettime64(CLOCK_REALTIME, {tv_sec=1730806466, tv_nsec=501842685}) = 0 0.000997 epoll_ctl(3, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLERR|EPOLLHUP, data={u32=37735016, u64=37735016}}) = 0 0.000889 writev(5, [{iov_base="\0\0\0\204", iov_len=4}, {iov_base="\376SMB@\0\1\0\0\0\0\0\5\0\1\0\20\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0"..., iov_len=64}, {iov_base="9\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\237\1\2\0\0\0\0\0"..., iov_len=56}, {iov_base="s\0r\0v\0s\0v\0c\0", iov_len=1...
2018 Nov 01
5
[PULL] vhost: cleanups and fixes
On Thu, Nov 1, 2018 at 4:00 PM Kees Cook <keescook at chromium.org> wrote: > > + memset(&rsp, 0, sizeof(rsp)); > + rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED; > + resp = vq->iov[out].iov_base; > + ret = __copy_to_user(resp, &rsp, sizeof(rsp)); > > Is it actually safe to trust that iov_base has passed an earlier > access_ok() check here? Why not just use copy_to_user() instead? Good point. We really should have removed those double-underscore things ages ago. Als...
2018 Nov 01
5
[PULL] vhost: cleanups and fixes
On Thu, Nov 1, 2018 at 4:00 PM Kees Cook <keescook at chromium.org> wrote: > > + memset(&rsp, 0, sizeof(rsp)); > + rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED; > + resp = vq->iov[out].iov_base; > + ret = __copy_to_user(resp, &rsp, sizeof(rsp)); > > Is it actually safe to trust that iov_base has passed an earlier > access_ok() check here? Why not just use copy_to_user() instead? Good point. We really should have removed those double-underscore things ages ago. Als...
2013 Jan 22
5
[QEMU PATCH v5 0/3] virtio-net: fix of ctrl commands
Currently virtio-net code relys on the layout of descriptor, this patchset removed the assumptions and introduced a control command to set mac address. Last patch is a trivial renaming. V2: check guest's iov_len V3: fix of migration compatibility make mac field in config space read-only when new feature is acked V4: add fix of descriptor layout assumptions, trivial rename V5: fix
2013 Jan 22
5
[QEMU PATCH v5 0/3] virtio-net: fix of ctrl commands
Currently virtio-net code relys on the layout of descriptor, this patchset removed the assumptions and introduced a control command to set mac address. Last patch is a trivial renaming. V2: check guest's iov_len V3: fix of migration compatibility make mac field in config space read-only when new feature is acked V4: add fix of descriptor layout assumptions, trivial rename V5: fix
2024 Nov 05
1
Slow reply to "smbclient -NL localhost" : strace
On Tue, 5 Nov 2024 10:36:49 +0100 Gilles via samba <samba at lists.samba.org> wrote: > On 04/11/2024 15:11, Rowland Penny via samba wrote: > > As I said previously, I do not think this has anything to do with > > Samba. In an earlier post, you had this output when you ran the same > > command using 'time': > > > > real 0m12.500s > > user
2018 Dec 13
0
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...> >> - break; > >> + remain_len = pkt->len; > >> + for (i = 0; i < pkt->nr_vecs; i++) { > >> + int tmp_len; > >> + > >> + tmp_len = min(remain_len, pkt->vec[i].iov_len); > >> + nbytes = copy_to_iter(pkt->vec[i].iov_base, tmp_len, &iov_iter); > >> + if (nbytes != tmp_len) { > >> + virtio_transport_free_pkt(pkt); > >> + vq_err(vq, "Faulted on copying pkt buf\n"); > >> + break; > >> + } > >> + > >> + remain_len -= tmp_len; &gt...