lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1417163894.5822.10@smtp.corp.redhat.com>
Date:	Fri, 28 Nov 2014 08:46:14 +0008
From:	Jason Wang <jasowang@...hat.com>
To:	"Michael S. Tsirkin" <mst@...hat.com>
Cc:	linux-kernel@...r.kernel.org, David Miller <davem@...emloft.net>,
	cornelia.huck@...ibm.com, rusty@....ibm.com, nab@...ux-iscsi.org,
	pbonzini@...hat.com, thuth@...ux.vnet.ibm.com,
	dahi@...ux.vnet.ibm.com, kvm@...r.kernel.org,
	virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org
Subject: Re: [PATCH v6 33/46] vhost/net: larger header for virtio 1.0



On Fri, Nov 28, 2014 at 4:10 AM, Michael S. Tsirkin <mst@...hat.com> 
wrote:
> Signed-off-by: Michael S. Tsirkin <mst@...hat.com>
> ---
>  drivers/vhost/net.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
> index cae22f9..1ac58d0 100644
> --- a/drivers/vhost/net.c
> +++ b/drivers/vhost/net.c
> @@ -1027,7 +1027,8 @@ static int vhost_net_set_features(struct 
> vhost_net *n, u64 features)
>  	size_t vhost_hlen, sock_hlen, hdr_len;
>  	int i;
>  
> -	hdr_len = (features & (1 << VIRTIO_NET_F_MRG_RXBUF)) ?
> +	hdr_len = (features & ((1ULL << VIRTIO_NET_F_MRG_RXBUF) |
> +			       (1ULL << VIRTIO_F_VERSION_1))) ?
>  			sizeof(struct virtio_net_hdr_mrg_rxbuf) :
>  			sizeof(struct virtio_net_hdr);
>  	if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) {
> -- 
> MST
> 

Reviewed-by: Jason Wang <jasowang@...hat.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ