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]
Date:	Thu, 17 Sep 2009 16:57:01 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Amit Shah <amit.shah@...hat.com>
Cc:	Markus Armbruster <armbru@...hat.com>,
	Anthony Liguori <anthony@...emonkey.ws>,
	linux-kernel@...r.kernel.org,
	virtualization@...ts.linux-foundation.org, greg@...ah.com
Subject: Re: [PATCH] virtio_console: Add support for multiple ports for
 generic guest and host communication

> Alan, I'm not sure how many ports at a time people would want to use so
> allocating one major device for this seems OK?

We have very large minor number ranges now so one dynamic major should do
you for a while yet. Probably forever but thats always asking for a
"640K.." moment ;)


> +static ssize_t fill_readbuf(struct virtio_console_port *port,
> +			    char *out_buf, size_t out_count, bool to_user)
> +{

Save yourself serious grief - and the FIXME pain noted below - unless you
are shipping huge objects use a bounce buffer and kill off the to_user
stuff - modern CPUs are so fast doing cache transfers it really isn't
worth the suffering for small stuff.

> +			ret = copy_to_user(out_buf + out_offset,
> +					   buf->buf + buf->offset,
> +					   copy_size);
> +			/* FIXME: Deal with ret != 0 */
--
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