Re: [Spice-devel] [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP.

2015-07-01 Thread Daniel P. Berrange
On Tue, Jun 30, 2015 at 04:44:10PM -0500, Jeremy White wrote: This module uses the usbredir protocol and user space tools, which are used by the SPICE project. Signed-off-by: Jeremy White jwh...@codeweavers.com [snip] diff --git a/drivers/usb/usbredir/Kconfig b/drivers/usb/usbredir/Kconfig

Re: [Spice-devel] [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP.

2015-07-01 Thread Jeremy White
Assuming that's correct, then this seems to imply that the socket has raw plain text data being sent/received, and thus precludes the possibility of running any security protocol like TLS unless the kernel wants to have an impl of the TLS protocol. Good point. For completeness, I'll note

Re: [Spice-devel] [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP.

2015-07-01 Thread Hans de Goede
Hi, On 01-07-15 20:31, Jeremy White wrote: Assuming that's correct, then this seems to imply that the socket has raw plain text data being sent/received, and thus precludes the possibility of running any security protocol like TLS unless the kernel wants to have an impl of the TLS protocol.

Re: [Spice-devel] [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP.

2015-07-01 Thread Greg KH
On Wed, Jul 01, 2015 at 10:55:49AM -0500, Jeremy White wrote: On 07/01/2015 12:44 AM, Greg KH wrote: On Tue, Jun 30, 2015 at 10:34:25PM -0500, Jeremy White wrote: 1. Is the basic premise reasonable? Is Hans correct in asserting that an alternate USB over IP module will be considered?

Re: [Spice-devel] [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP.

2015-07-01 Thread Hans de Goede
Hi, On 01-07-15 18:13, Greg KH wrote: On Wed, Jul 01, 2015 at 10:55:49AM -0500, Jeremy White wrote: On 07/01/2015 12:44 AM, Greg KH wrote: On Tue, Jun 30, 2015 at 10:34:25PM -0500, Jeremy White wrote: 1. Is the basic premise reasonable? Is Hans correct in asserting that an alternate USB

Re: [Spice-devel] [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP.

2015-07-01 Thread Greg KH
On Tue, Jun 30, 2015 at 04:44:10PM -0500, Jeremy White wrote: This module uses the usbredir protocol and user space tools, which are used by the SPICE project. Signed-off-by: Jeremy White jwh...@codeweavers.com --- MAINTAINERS |6 + drivers/usb/Kconfig

Re: [Spice-devel] [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP.

2015-07-01 Thread Greg KH
On Tue, Jun 30, 2015 at 10:34:25PM -0500, Jeremy White wrote: It's pointless to post a patch that you know has problems with it (i.e. it's not even in proper kernel coding style), as it will never be reviewed or even looked at. Thanks for the reply, and I'm sorry for the clumsy ask. I

[Spice-devel] [spice-common PATCH 1/2] ppc: Add macros for color byte ordering

2015-07-01 Thread Lukas Venhoda
When using image compression on PowerPC architecture, colors are in wrong order ARGB - BGRA. This commit introduces macros, that will change the color order according to machine endianness. --- common/pixman_utils.h | 10 ++ 1 file changed, 10 insertions(+) diff --git

[Spice-devel] [spice-common PATCH 2/2] ppc: Fix colors on ppc when using QUIC

2015-07-01 Thread Lukas Venhoda
Fixes color order on PowerPC when using QUIC image compression. --- common/canvas_base.c | 6 +++--- common/canvas_utils.c | 12 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/canvas_base.c b/common/canvas_base.c index 6f48340..31f3cef 100644 ---

[Spice-devel] [PATCH 08/33] codegen: Remove old ptr32 attribute

2015-07-01 Thread Frediano Ziglio
This attribute is not use in code. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/ptypes.py | 4 1 file changed, 4 deletions(-) diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py index 3a307ed..f94fd24 100644 --- a/python_modules/ptypes.py +++

[Spice-devel] [PATCH 01/33] codegen: Import six module before first use

2015-07-01 Thread Frediano Ziglio
The module was used in the initial try/except so make sure it is already imported. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/spice_parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python_modules/spice_parser.py

[Spice-devel] [PATCH 07/33] codegen: Do some check on attributes

2015-07-01 Thread Frediano Ziglio
Verify that the attribute is known. This could help for instance to avoid some future typo mistake. Also we have a list of attributes we can comment. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/ptypes.py | 69 1 file

[Spice-devel] [PATCH 13/33] Decorate writer class to make easier ifdef/endif handling

2015-07-01 Thread Frediano Ziglio
I'm generating code for dissector from demarshaller. Make simple to hangle ifdef/endif not having to check manually attribute. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 18 ++ 1 file changed, 18 insertions(+) diff --git

[Spice-devel] [PATCH 16/33] Allows to specify descriptions for enumerations

2015-07-01 Thread Frediano Ziglio
These descriptions will be used to show in wireshark dissector. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/ptypes.py | 16 python_modules/spice_parser.py | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git

[Spice-devel] [PATCH 09/33] Start adding code to generate wireshark dissector

2015-07-01 Thread Frediano Ziglio
Added a stub dissector.py code. Added file to Makefiles. Add option to call dissector and code to call it. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- common/Makefile.am | 1 + python_modules/Makefile.am | 1 + python_modules/dissector.py | 14 ++

[Spice-devel] [PATCH 10/33] Allows to specify C type for index variable

2015-07-01 Thread Frediano Ziglio
This to prepare to generate wireshark dissector which use glib types instead of new C ones (for compatibility with some compiler). Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/codegen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[Spice-devel] [PATCH 15/33] Allows to specify some new attributes for wireshark

2015-07-01 Thread Frediano Ziglio
To make output more useful fields from the protocol should have additional information like description, name, type and so on. List of attributes added: - ws_desc, just a simple description - ws_name name of the field. See below - ws allow to specify a description and a name. Useful as easy to

[Spice-devel] [PATCH 02/33] codegen: Simplify if/else blocks

2015-07-01 Thread Frediano Ziglio
Blocks was mainly the same, reduce code. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/marshal.py | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/python_modules/marshal.py b/python_modules/marshal.py index

[Spice-devel] [PATCH 05/33] codegen: Remove duplicate variable initialization

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/spice_parser.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python_modules/spice_parser.py b/python_modules/spice_parser.py index 80b559b..97af8b2 100644 --- a/python_modules/spice_parser.py +++

[Spice-devel] [PATCH 03/33] codegen: Fix typo in variable name

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/codegen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_modules/codegen.py b/python_modules/codegen.py index f324498..55500b7 100644 --- a/python_modules/codegen.py +++ b/python_modules/codegen.py

[Spice-devel] [PATCH 18/33] Change code generated index type

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 9971140..598cc3b 100644 --- a/python_modules/dissector.py +++ b/python_modules/dissector.py @@

[Spice-devel] [PATCH 12/33] Add new_ett function to be able to create new trees

2015-07-01 Thread Frediano Ziglio
Use an array to declare tree items instead of allocating it statically. This save a bit of memory and it also generate smaller code to read. A tree in wireshark represent an item which could be expanded. Possibly wireshark is using these registrations to save expansion state in the user interface.

[Spice-devel] [PATCH 28/33] Handle pointers

2015-07-01 Thread Frediano Ziglio
Read the pointer and if not 0 create a function to parse it and call it. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 49 + 1 file changed, 49 insertions(+) diff --git a/python_modules/dissector.py

[Spice-devel] [PATCH 25/33] Handle array

2015-07-01 Thread Frediano Ziglio
If just data increment the pointer if not handle the items with a loop. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py

[Spice-devel] [PATCH 29/33] Handle base fields

2015-07-01 Thread Frediano Ziglio
Add fields to base tree (so basically there is no tree). Names is now generated from container + member name. The check for duplicate is not that strong, should check if same field is defined with same attributes. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py

[Spice-devel] [PATCH 14/33] Generate scheleton for messages and channels

2015-07-01 Thread Frediano Ziglio
Messages are not generated as stub. Code partially from demarshaller. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 138 +++- 1 file changed, 137 insertions(+), 1 deletion(-) diff --git a/python_modules/dissector.py

[Spice-devel] [PATCH 17/33] Decorate protocol file with attributes for wireshark

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- spice.proto | 414 1 file changed, 218 insertions(+), 196 deletions(-) diff --git a/spice.proto b/spice.proto index 2889802..0bcb421 100644 --- a/spice.proto +++ b/spice.proto @@

[Spice-devel] [PATCH 27/33] Implement ws_inline attribute

2015-07-01 Thread Frediano Ziglio
This attribute allow structure to be aligned instead of be contained in a separate function. This is helpful as variable are declared in the function so allows other member to reference to a nested structure. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 11

[Spice-devel] [PATCH 23/33] Read array size

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 50 +++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index cb07ab6..4db2f3c 100644 ---

[Spice-devel] [PATCH 32/33] Use a class to register wireshark fields

2015-07-01 Thread Frediano Ziglio
Allow to reuse code and check better if field was already registered Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 59 + 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/python_modules/dissector.py

[Spice-devel] [PATCH 30/33] Allow to override default values generated for the fields

2015-07-01 Thread Frediano Ziglio
ws_type override the type (BOOLEAN - FT_BOOLEAN). ws_base override the base (DEC - BASE_HEX). ws_desc override the description. ws allow to specify description and name for wireshark. Name is important as allows filters. Having a single attribute with 2 values allows to quickly specify the main

[Spice-devel] [PATCH 33/33] Handle flags

2015-07-01 Thread Frediano Ziglio
Instead of only show the hexadecimal value show all bits. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 77 ++--- 1 file changed, 73 insertions(+), 4 deletions(-) diff --git a/python_modules/dissector.py

[Spice-devel] [PATCH 11/33] Generate some definition for dissector

2015-07-01 Thread Frediano Ziglio
Generate global definitions. Generate function to registers various dissector components. For the moment the field array is empty bu we save some global to be able to register new ones. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 69

[Spice-devel] [PATCH 24/33] Generate code to output parse structure

2015-07-01 Thread Frediano Ziglio
Write a function and call it to be able to reuse it. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 20 1 file changed, 20 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 4db2f3c..c9331cd 100644

[Spice-devel] [PATCH 04/33] codegen: Optimize code indentation avoiding loop

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/codegen.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python_modules/codegen.py b/python_modules/codegen.py index 55500b7..02ffdb9 100644 --- a/python_modules/codegen.py +++ b/python_modules/codegen.py

[Spice-devel] [PATCH 26/33] Handle switch

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 6e9f0d6..f18b5b4 100644 ---

[Spice-devel] [PATCH 31/33] Allow to specify 'CHANNEL' as type

2015-07-01 Thread Frediano Ziglio
Type will be mapped to an enumerator containing all channel types. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index

[Spice-devel] [PATCH 20/33] Parse containers

2015-07-01 Thread Frediano Ziglio
Parse all members of the containers Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 19 +++ 1 file changed, 19 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index bd68262b..47d4031 100644 ---

[Spice-devel] [PATCH 22/33] Read values from primitive fields

2015-07-01 Thread Frediano Ziglio
Store into references for future usage. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 32 1 file changed, 32 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 707eae9..cb07ab6 100644

[Spice-devel] [PATCH 21/33] Write function to write members

2015-07-01 Thread Frediano Ziglio
Check members are all of a giver type and call stubs for each type. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 50 +++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/python_modules/dissector.py

[Spice-devel] [PATCH 06/33] codegen: Reuse code to fix attribute from prototype file

2015-07-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/ptypes.py | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py index d031d09..845fa73 100644 --- a/python_modules/ptypes.py

[Spice-devel] [PATCH 19/33] Add code to handle destination variable

2015-07-01 Thread Frediano Ziglio
Add some classes to be able to store retrieved data from structure and messages. The idea is to generate code dynamically when variable are readed. Signed-off-by: Frediano Ziglio fzig...@redhat.com --- python_modules/dissector.py | 101 1 file

Re: [Spice-devel] [PATCH] Make monitors config debug output more clear

2015-07-01 Thread Christophe Fergeau
On Tue, Jun 30, 2015 at 12:26:38PM -0500, Jonathon Jongsma wrote: Indicate whether the monitors config debug output is from sending or receiving new monitors configuration. You can tell this by looking at which channel is involved (main vs display), but making it more explicit is helpful for