[Spice-devel] [PATCH spice-common 4/4] codegen: Check validity of array members

2019-08-13 Thread Frediano Ziglio
Check that combination of fields for an array does not lead to unsafe code. check_valid method came from generate_c_declaration with some more check and it's use in demarshaller to validate the array if the structure is not generated. Signed-off-by: Frediano Ziglio ---

Re: [Spice-devel] [spice-common PATCH 2/2] test-marshallers.proto: ArrayMessage: make space for name

2019-08-13 Thread Uri Lublin
On 8/11/19 1:02 PM, Frediano Ziglio wrote: Do it by adding @end tag. Without it 'name' is a non-allocated pointer. Signed-off-by: Uri Lublin --- Is there a better way to do it ? Is not clear what you are trying to achieve with this patch. The problem is currently name is defined as a

[Spice-devel] [spice-common PATCH] test-marshallers.proto: ArrayMessage: make space for name

2019-08-13 Thread Uri Lublin
Do it by adding @end tag. Without it the allocated memory has no space for 'name'. Also fix SpiceMsgMainArrayMessage tests/test-marshallers.h, replacing int8_t* name with int8_t name[]. This makes name an "in-structure" array with no pre-defined size instead of a pointer. The size is defined by

[Spice-devel] [PATCH spice-common 1/4] codegen: Use has_end_attr instead of has_attr("end")

2019-08-13 Thread Frediano Ziglio
Just style, they do the same thing, but is more coherent with the rest of the code. Signed-off-by: Frediano Ziglio --- python_modules/demarshal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_modules/demarshal.py b/python_modules/demarshal.py index d3147b7..6d8dbdd

[Spice-devel] [PATCH spice-common 2/4] codegen: Add a check for C structure fields

2019-08-13 Thread Frediano Ziglio
This check make sure that output fields for member with @end (arrays) are declared as empty arrays in output C structure. This avoids output fields to be declared as pointer or other invalid types. The check is a compile time check so no code in object file is generated. Signed-off-by: Frediano

[Spice-devel] [PATCH spice-common 3/4] codegen: Exit with error on error generating C structures

2019-08-13 Thread Frediano Ziglio
This was some left-over during development of C structure generations (the single structure generation was skipped). Signed-off-by: Frediano Ziglio --- spice_codegen.py | 1 + 1 file changed, 1 insertion(+) diff --git a/spice_codegen.py b/spice_codegen.py index 0532d6f..d3a1bf5 100755 ---

Re: [Spice-devel] [PATCH spice-common 1/4] codegen: Use has_end_attr instead of has_attr("end")

2019-08-13 Thread Uri Lublin
On 8/13/19 7:56 PM, Frediano Ziglio wrote: Just style, they do the same thing, but is more coherent with the rest of the code. Signed-off-by: Frediano Ziglio Ack. Uri. --- python_modules/demarshal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Spice-devel] [spice-gtk v3 5/9] usb-redir: extend USB backend to support emulated devices

2019-08-13 Thread Yuri Benditovich
On Tue, Aug 13, 2019 at 2:59 PM Frediano Ziglio wrote: > > > > > Redirection of emulated devices requires special approach, > > as usbredirhost can't be used for that (it works only with > > libusb devices). For emulated devices we create instance of > > usbredirparser that implements USB

Re: [Spice-devel] [spice-common PATCH] test-marshallers.proto: ArrayMessage: make space for name

2019-08-13 Thread Frediano Ziglio
> > Do it by adding @end tag. > Without it the allocated memory has no space for 'name'. > > Also fix SpiceMsgMainArrayMessage tests/test-marshallers.h, > replacing int8_t* name with int8_t name[]. name[0] ? > This makes name an "in-structure" array with no pre-defined size > instead of a

Re: [Spice-devel] [Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node

2019-08-13 Thread Thierry Reding
On Mon, Aug 05, 2019 at 04:01:10PM +0200, Gerd Hoffmann wrote: > Drop vma_node from ttm_buffer_object, use the gem struct > (base.vma_node) instead. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +- >

Re: [Spice-devel] [PATCH spice-common 3/4] codegen: Exit with error on error generating C structures

2019-08-13 Thread Uri Lublin
On 8/13/19 7:56 PM, Frediano Ziglio wrote: This was some left-over during development of C structure generations (the single structure generation was skipped). Signed-off-by: Frediano Ziglio Ack. Uri. --- spice_codegen.py | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [Spice-devel] [PATCH v3 spice-streaming-agent] gst-plugin: Shorten template declarations

2019-08-13 Thread Frediano Ziglio
> > The typeUPtr templates are very similar except for the unref-function. > This patch is replacing the templates with a macro which also accepts > an unref-function and is using this macro to define all typeUPtr types. > > Signed-off-by: Snir Sheriber > --- > > -Update commit message >

[Spice-devel] [PATCH spice-protocol] qxl_dev: Add comment to QXLQUICData->data field

2019-08-13 Thread Frediano Ziglio
Recently a bug using this structure was fixed. The bug involved understand the usage of this field so add some note on the field for future reference. Signed-off-by: Frediano Ziglio --- spice/qxl_dev.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h

Re: [Spice-devel] [spice-gtk v3 8/9] usb-redir: enable redirection of emulated CD drive

2019-08-13 Thread Frediano Ziglio
> > Add implementation of emulated device to build. > Now it is possible to create emulated CD devices. > > Signed-off-by: Yuri Benditovich Would be better to compile only if needed, like https://gitlab.freedesktop.org/fziglio/spice-gtk/commit/f74443390902335a0233bb32e1d94507e5b9f5f4 ? >

Re: [Spice-devel] [PATCH spice-html5] Review the webm audio track header and remove the fixmes.

2019-08-13 Thread Jeremy White
On 8/11/19 4:32 AM, Frediano Ziglio wrote: Hi, why this was not merged ? I completely missed the ack at the time. I do think the patch is fundamentally correct and an improvement.  This one arguably deserves a reprise of the audit I performed at the time to ensure that the results are

Re: [Spice-devel] [spice-gtk v3 5/9] usb-redir: extend USB backend to support emulated devices

2019-08-13 Thread Frediano Ziglio
> > Redirection of emulated devices requires special approach, > as usbredirhost can't be used for that (it works only with > libusb devices). For emulated devices we create instance of > usbredirparser that implements USB redirection protocol. Make sense. Actually usbredirhost internally uses a

[Spice-devel] [PATCH spice-gtk v2] build: Replace "join_paths" with "/" operator

2019-08-13 Thread Frediano Ziglio
Supported by Meson 0.49 (required by Spice-GTK). New syntax is shorter and is recommended in https://mesonbuild.com/Release-notes-for-0-49-0.html ("Joining paths with /"). Signed-off-by: Frediano Ziglio --- doc/reference/meson.build | 18 +- man/meson.build | 2 +-

Re: [Spice-devel] [PATCH spice-gtk 2/2] build: Replace "join_paths" with "/" operator

2019-08-13 Thread Uri Lublin
On 7/31/19 10:27 AM, Frediano Ziglio wrote: Supported by Meson 0.49. New syntax is shorter. as recommended, in https://mesonbuild.com/Release-notes-for-0-49-0.html ("Joining paths with /"), But, is it too new ? I see for example that RHEL-7 has Meson 0.45. Oh, but Meson 0.49 is already