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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131206145145.29d204f9@nehalam.linuxnetplumber.net>
Date:	Fri, 6 Dec 2013 14:51:45 -0800
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	vyasevic@...hat.com
Cc:	Alex Williamson <alex.williamson@...com>,
	Rusty Russell <rusty@...tcorp.com.au>,
	"Michael S. Tsirkin" <mst@...hat.com>, netdev@...r.kernel.org
Subject: Re: [RFC] virtio_net: multicast address list never sent to host

On Fri, 06 Dec 2013 09:38:35 -0500
Vlad Yasevich <vyasevic@...hat.com> wrote:

> > -		sgs[out_num++] = out;
> > -	if (in)
> > -		sgs[out_num + in_num++] = in;
> > +	while (out_cnt-- > 0)
> > +		sgs[out_num++] = out++;  
> 
> I think we can skip sg_count and just use
>         while ((sg = sg_next(out)) != NULL)
>                 sgs[out_num++] = sg;
> 
> And we can probably do this loop for both 'in' and 'out' pointers.
> 
> -vlad


That won't work because callers pass a list with a single element,
as in:

> static int virtnet_set_mac_address(struct net_device *dev, void *p)
> {
> 	struct virtnet_info *vi = netdev_priv(dev);
> 	struct virtio_device *vdev = vi->vdev;
> 	int ret;
> 	struct sockaddr *addr = p;
> 	struct scatterlist sg;
> 
> 	ret = eth_prepare_mac_addr_change(dev, p);
> 	if (ret)
> 		return ret;
> 
> 	if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR)) {
> 		sg_init_one(&sg, addr->sa_data, dev->addr_len);
> 		if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_MAC,
> 					  VIRTIO_NET_CTRL_MAC_ADDR_SET,
> 					  &sg, NULL)) {
> 			dev_warn(&vdev->dev,
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ