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:	Fri, 6 Nov 2009 17:40:02 +1030
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Amit Shah <amit.shah@...hat.com>,
	Anthony Liguori <aliguori@...ibm.com>
Cc:	linux-kernel@...r.kernel.org, virtualization@...ux-foundation.org,
	Christian Borntraeger <borntraeger@...ibm.com>,
	"Michael S. Tsirkin" <mst@...hat.com>
Subject: Re: [PATCH v10 1/1] virtio_console: Add support for multiple ports for generic guest and host communication

On Wed, 4 Nov 2009 03:08:39 am Amit Shah wrote:
> Expose multiple char devices ("ports") for simple communication
> between the host userspace and guest.

OK, I've taken the chance to audit this patch.  I started adding patches
until I got overwhelmed.   It's a complete mess and needs a total rewrite :(

This shows the problem with feeding me a complete driver rewrite in one
big hit.  You've combined lots of changes and techniques in here at once:

1) Moved work out of interrupt handlers and into work_struct.
2) Encapsulated the buffer information in a structure.
3) Added an optional header to the buffer(s).
4) Added control messages.
5) Encapsulated the per-port information into a structure.
6) Allocated a static buffer pool of over 4MB (!)
7) Added an ad-hoc throttling mechanism.
8) Added debugfs support.

Less important nitpicks:
1) Don't call a struct list_head 'next', it confused the crap out of me.
   Call it list or some other non-name.
2) Don't call control messages "internal".  Use ONE good name, ie. control.
3) Don't use list_for_each_safe() to get the head entry of a list.  Your
   use is buggy anyway: buf will never be NULL afterwards.

In summary: this is the one we're going to throw away.

Now I'm going to start again, one patch at a time, and see how that works.

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