Re: [PATCH] vhost: return EINVAL if iovecs size does not match the message size

2018-12-16 Thread Michael S. Tsirkin
On Sat, Dec 15, 2018 at 11:46:11AM -0800, David Miller wrote: > From: Pavel Tikhomirov > Date: Thu, 13 Dec 2018 17:53:50 +0300 > > > We've failed to copy and process vhost_iotlb_msg so let userspace at > > least know about it. For instance before these patch the code below runs > > without any er

Re: [PATCH] vhost: return EINVAL if iovecs size does not match the message size

2018-12-15 Thread David Miller
From: Pavel Tikhomirov Date: Thu, 13 Dec 2018 17:53:50 +0300 > We've failed to copy and process vhost_iotlb_msg so let userspace at > least know about it. For instance before these patch the code below runs > without any error: ... > Signed-off-by: Pavel Tikhomirov Michael, will you be taking

Re: [PATCH] vhost: return EINVAL if iovecs size does not match the message size

2018-12-13 Thread Pavel Tikhomirov
On 12/13/2018 10:55 PM, Michael S. Tsirkin wrote: > On Thu, Dec 13, 2018 at 05:53:50PM +0300, Pavel Tikhomirov wrote: >> We've failed to copy and process vhost_iotlb_msg so let userspace at >> least know about it. For instance before these patch the code below runs >> without any error: >> >> int m

Re: [PATCH] vhost: return EINVAL if iovecs size does not match the message size

2018-12-13 Thread Michael S. Tsirkin
On Thu, Dec 13, 2018 at 05:53:50PM +0300, Pavel Tikhomirov wrote: > We've failed to copy and process vhost_iotlb_msg so let userspace at > least know about it. For instance before these patch the code below runs > without any error: > > int main() > { > struct vhost_msg msg; > struct iovec iov

[PATCH] vhost: return EINVAL if iovecs size does not match the message size

2018-12-13 Thread Pavel Tikhomirov
We've failed to copy and process vhost_iotlb_msg so let userspace at least know about it. For instance before these patch the code below runs without any error: int main() { struct vhost_msg msg; struct iovec iov; int fd; fd = open("/dev/vhost-net", O_RDWR); if (fd == -1) { perror("