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] [day] [month] [year] [list]
Date:	Tue, 3 Feb 2009 13:24:00 +1030
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Alex Williamson <alex.williamson@...com>
Cc:	markmc@...hat.com, netdev@...r.kernel.org, kvm@...r.kernel.org,
	Jens Axboe <jens.axboe@...cle.com>
Subject: Re: [PATCH v3 2/4] virtio_net: Add a set_rx_mode interface

On Tuesday 03 February 2009 08:04:07 Alex Williamson wrote:
> Hi Rusty,
> 
> On Mon, 2009-02-02 at 20:22 +1030, Rusty Russell wrote:
> > 	static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd,
> >                                 struct scatterlist *out, struct scatterlist *in);
... 
> I think the caller still ends up passing the counts of out and in
> entries here or else we have to walk the lists in send_command().
> Doable, but doesn't seem to be common practice that I can find.

Yes, I've frequently expressed unhappiness with the API.  I lost that debate
and it doesn't seem fruitful to return to it.

It's not speed-critical, so just iterate.  I refuse to make *my* APIs suck.

> We
> should also then clear the termination once we copy the sg[] into our
> own, but functions to do that don't seem to exist (need an
> sg_unmark_end()).

Ideally we would chain them, but the caller would have to allocate an extra
sg element.

Implement sg_unmark_end() in a separate patch; be sure to CC Jens.

> I had avoided anything that would call
> sg_init_table() on the caller provided sg[] to avoid that problem, does
> it need to be addressed?

I don't think so: those args should in fact be const struct scatterlist *.

Thanks,
Rusty.
--
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