Re: [Spice-devel] [PATCH spice-common 2/3] Write a small test to test possible crash

2018-05-10 Thread Frediano Ziglio
> > On Mon, 2018-03-19 at 10:06 +, Frediano Ziglio wrote: > > This small test prove a that current generated demarshaller code > > is not safe to integer overflows leading to buffer overflows. > > Actually from a quick look at the protocol it seems that client > > can't cause these overflows b

Re: [Spice-devel] [PATCH spice-server v2] event-loop: Avoid possible compiler warning

2018-05-10 Thread Jonathon Jongsma
On Thu, 2018-05-10 at 17:49 +0100, Frediano Ziglio wrote: > With GCC 8.0.1 (Fedora 28), cast to different function pointer > can lead to warnings, like: > > event-loop.c: In function ‘watch_update_mask’: > event-loop.c:146:42: error: cast between incompatible function > types from ‘gboolean (*

Re: [Spice-devel] [PATCH spice-common 3/3] Avoid integer overflow computing image sizes

2018-05-10 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Mon, 2018-03-19 at 10:06 +, Frediano Ziglio wrote: > Use always 64, sizes can be 32x32. > > Signed-off-by: Frediano Ziglio > --- > python_modules/demarshal.py | 14 ++ > python_modules/marshal.py | 7 +++ > 2 files changed, 9 insertions(+),

Re: [Spice-devel] [PATCH spice-common 2/3] Write a small test to test possible crash

2018-05-10 Thread Jonathon Jongsma
On Mon, 2018-03-19 at 10:06 +, Frediano Ziglio wrote: > This small test prove a that current generated demarshaller code > is not safe to integer overflows leading to buffer overflows. > Actually from a quick look at the protocol it seems that client > can't cause these overflows but server can

Re: [Spice-devel] [PATCH spice-common 3/3] lz: Inline GET_{r, g, b} macros

2018-05-10 Thread Jonathon Jongsma
Acked-by: jonathon Jongsma On Wed, 2018-05-09 at 14:10 +0100, Frediano Ziglio wrote: > With last changes are just used once and are straight forward. > > Signed-off-by: Frediano Ziglio > --- > common/lz_compress_tmpl.c | 13 + > 1 file changed, 1 insertion(+), 12 deletions(-) > >

Re: [Spice-devel] [PATCH spice-common 2/3] lz: Optimise SAME_PIXEL for RGB16

2018-05-10 Thread Jonathon Jongsma
On Thu, 2018-05-10 at 13:03 -0400, Frediano Ziglio wrote: > > > > On Wed, 2018-05-09 at 14:10 +0100, Frediano Ziglio wrote: > > > Do not extract all components and compare one by one, can be > > > easily > > > compared together. > > > > Do you have some data about how performance compares between

Re: [Spice-devel] [PATCH spice-common 0/3] Fix some possible overflows in client

2018-05-10 Thread Frediano Ziglio
> > Can you be a bit more verbose than a simple "ping"? It seems that there > was some discussion (and at least one ACK) on these patches, so it > would be useful if you are more explicit about which bits need > attention. > There were some discussion on 1/3 which was acked but the rest of the s

Re: [Spice-devel] [PATCH spice-common 2/3] lz: Optimise SAME_PIXEL for RGB16

2018-05-10 Thread Frediano Ziglio
> > On Wed, 2018-05-09 at 14:10 +0100, Frediano Ziglio wrote: > > Do not extract all components and compare one by one, can be easily > > compared together. > > Do you have some data about how performance compares between the two > implementations? The new implementation clearly looks more effici

Re: [Spice-devel] [PATCH spice-common 2/3] lz: Optimise SAME_PIXEL for RGB16

2018-05-10 Thread Jonathon Jongsma
On Wed, 2018-05-09 at 14:10 +0100, Frediano Ziglio wrote: > Do not extract all components and compare one by one, can be easily > compared together. Do you have some data about how performance compares between the two implementations? The new implementation clearly looks more efficient, but the co

[Spice-devel] [PATCH spice-server v2] event-loop: Avoid possible compiler warning

2018-05-10 Thread Frediano Ziglio
With GCC 8.0.1 (Fedora 28), cast to different function pointer can lead to warnings, like: event-loop.c: In function ‘watch_update_mask’: event-loop.c:146:42: error: cast between incompatible function types from ‘gboolean (*)(GIOChannel *, GIOCondition, void *)’ {aka ‘int (*)(struct _GIOCha

Re: [Spice-devel] [PATCH spice-server 1/3] event-loop: Avoid possible compiler warning

2018-05-10 Thread Frediano Ziglio
> > On Sun, 2018-05-06 at 12:10 +0100, Frediano Ziglio wrote: > > With GCC 8.0.1 (Fedora 28), cast to different function pointer > > can lead to warnings. > > As g_source_set_callback expect a function pointer which type > > changes based on the type of source (so is expected) silent > > the possib

Re: [Spice-devel] [PATCH spice-common 1/3] lz: Move ENCODE_PIXEL for RGB24 and RGB32 to a common place

2018-05-10 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Wed, 2018-05-09 at 14:10 +0100, Frediano Ziglio wrote: > The macro for both depth is the same, reuse the definition. > > Signed-off-by: Frediano Ziglio > --- > common/lz_compress_tmpl.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/c

Re: [Spice-devel] [PATCH spice-common 0/3] Fix some possible overflows in client

2018-05-10 Thread Jonathon Jongsma
Can you be a bit more verbose than a simple "ping"? It seems that there was some discussion (and at least one ACK) on these patches, so it would be useful if you are more explicit about which bits need attention. On Mon, 2018-05-07 at 05:39 -0400, Frediano Ziglio wrote: > ping > > > > > ping >

Re: [Spice-devel] [PATCH] Revert "usbredir: Disconnect USB device asynchronously"

2018-05-10 Thread Jonathon Jongsma
On Mon, 2018-05-07 at 17:02 +0800, Qiu Wenbo wrote: > This reverts commit 9fbf679453d8dbfe797a738cb536136599d7adab. > > In some cases, remote-viewer will exit before the async function run > in > another thread finish and USB devices redirected to the VM will not > "pop up" to > operation system.

Re: [Spice-devel] [PATCH spice-server 3/3] char-device: Avoid possible invalid function pointer cast

2018-05-10 Thread Jonathon Jongsma
On Sun, 2018-05-06 at 12:10 +0100, Frediano Ziglio wrote: > This is reported by GCC 8.0.1 (Fedora 28). > Instead of doing a possible invalid cast destroy and create the > queue again. > > Signed-off-by: Frediano Ziglio > --- > server/char-device.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 d

Re: [Spice-devel] [PATCH spice-server 2/3] red-channel: Avoid possible invalid function pointer type cast

2018-05-10 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma On Sun, 2018-05-06 at 12:10 +0100, Frediano Ziglio wrote: > Avoid casting function pointer with different argument providing > a proper utility instead. > > Signed-off-by: Frediano Ziglio > --- > server/red-channel.c | 19 ++- > 1 file changed, 14 in

Re: [Spice-devel] [PATCH spice-server 1/3] event-loop: Avoid possible compiler warning

2018-05-10 Thread Jonathon Jongsma
On Sun, 2018-05-06 at 12:10 +0100, Frediano Ziglio wrote: > With GCC 8.0.1 (Fedora 28), cast to different function pointer > can lead to warnings. > As g_source_set_callback expect a function pointer which type > changes based on the type of source (so is expected) silent > the possible warning. C

Re: [Spice-devel] [PATCH spice-common] protocol: Use a typedef to specify stream_id type

2018-05-10 Thread Jonathon Jongsma
On Sat, 2018-05-05 at 16:43 +0100, Frediano Ziglio wrote: > This change does not affect generated code but make source more > readable. Also document in a single location the range of this > type. > > Signed-off-by: Frediano Ziglio > --- > There are no other typedef beside fixed28_4, so the "_t"

Re: [Spice-devel] [PATCH spice-common v2] build: Remove FIXME_SERVER_SMARTCARD hack

2018-05-10 Thread Eduardo Lima (Etrunko)
On 10/05/18 12:19, Eduardo Lima (Etrunko) wrote: > When we remove the hacks in configure.ac and common/Makefile.am, two > errors pop out: > > generated_server_demarshallers.c: In function > ‘parse_msgc_smartcard_reader_add’: > generated_server_demarshallers.c:1985:30: error: ‘mem_size’ undeclared

[Spice-devel] [PATCH spice-common v2] build: Remove FIXME_SERVER_SMARTCARD hack

2018-05-10 Thread Eduardo Lima (Etrunko)
When we remove the hacks in configure.ac and common/Makefile.am, two errors pop out: generated_server_demarshallers.c: In function ‘parse_msgc_smartcard_reader_add’: generated_server_demarshallers.c:1985:30: error: ‘mem_size’ undeclared (first use in this function); did you mean ‘nw_size’? d

Re: [Spice-devel] [PATCH spice-common] build: Remove FIXME_SERVER_SMARTCARD hack

2018-05-10 Thread Eduardo Lima (Etrunko)
On 10/05/18 12:01, Frediano Ziglio wrote: >> >> Ping. >> >> The meson port depends on this patch. I tried the testing procedure >> described in the link below, but could not make it work. Has anyone ever >> made it work? I could use some help here. >> >> Regards, Eduardo. >> >> https://www.spice-sp

Re: [Spice-devel] [PATCH spice-common] build: Remove FIXME_SERVER_SMARTCARD hack

2018-05-10 Thread Frediano Ziglio
> > Ping. > > The meson port depends on this patch. I tried the testing procedure > described in the link below, but could not make it work. Has anyone ever > made it work? I could use some help here. > > Regards, Eduardo. > > https://www.spice-space.org/smartcard-usage.html > > On 02/03/18 12

Re: [Spice-devel] [PATCH v2] miLineArc(): initialize edge1, edge2

2018-05-10 Thread Frediano Ziglio
> > When compiling spice-common with meson/ninja under "release" mode, I get > several compiler warnings about possibly-uninitialized members. For > example: > > ../subprojects/spice-common/common/lines.c: In function ‘miLineArc’: > ../subprojects/spice-common/common/lines.c:2167:17: erro

[Spice-devel] [PATCH v2] miLineArc(): initialize edge1, edge2

2018-05-10 Thread Jonathon Jongsma
When compiling spice-common with meson/ninja under "release" mode, I get several compiler warnings about possibly-uninitialized members. For example: ../subprojects/spice-common/common/lines.c: In function ‘miLineArc’: ../subprojects/spice-common/common/lines.c:2167:17: error: ‘edge2.dx’ m

Re: [Spice-devel] [PATCH spice-common] build: Remove FIXME_SERVER_SMARTCARD hack

2018-05-10 Thread Eduardo Lima (Etrunko)
Ping. The meson port depends on this patch. I tried the testing procedure described in the link below, but could not make it work. Has anyone ever made it work? I could use some help here. Regards, Eduardo. https://www.spice-space.org/smartcard-usage.html On 02/03/18 12:14, Eduardo Lima (Etrunk

Re: [Spice-devel] [spice-space-pages] docs: Update links in README and manual

2018-05-10 Thread Eduardo Lima (Etrunko)
Missing your 'Signed-off-by' tag. Acked-by: Eduardo Lima (Etrunko) On 10/05/18 10:14, Snir Sheriber wrote: > --- > README | 2 +- > docs/manual/manual.txt | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/README b/README > index 4aaf6a7c..f9a0c7fe

Re: [Spice-devel] [PATCH spice-common 1/3] Add support for building with meson/ninja

2018-05-10 Thread Eduardo Lima (Etrunko)
On 10/05/18 07:33, Frediano Ziglio wrote: >> >> Signed-off-by: Eduardo Lima (Etrunko) >> --- >> Makefile.am| 2 + >> common/Makefile.am | 1 + >> common/meson.build | 122 >> docs/.gitignore| 1 + >> docs/Makefile.am | 1 + >> docs/meson.

Re: [Spice-devel] [spice-space-pages] docs: Update links in README and manual

2018-05-10 Thread Snir Sheriber
*** Subject mistake!*** spice server (not spice-space-pages) On 05/10/2018 04:14 PM, Snir Sheriber wrote: --- README | 2 +- docs/manual/manual.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README b/README index 4aaf6a7c..f9a0c7fe 100644 ---

[Spice-devel] [spice-space-pages] docs: Update links in README and manual

2018-05-10 Thread Snir Sheriber
--- README | 2 +- docs/manual/manual.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README b/README index 4aaf6a7c..f9a0c7fe 100644 --- a/README +++ b/README @@ -63,7 +63,7 @@ be reported to the OS vendors' own bug tracker first. The latest SPICE

Re: [Spice-devel] [spice-space-pages] Update git repos and links

2018-05-10 Thread Daniel P . Berrangé
On Thu, May 10, 2018 at 03:48:14PM +0300, Snir Sheriber wrote: > Most of spice related git repositories are now hosted on > gitlab.freedesktop.org/spice > --- > .gitlab-ci.yml | 4 ++-- > developers.rst | 2 +- > download.rst| 26 +- > osx-client.rst | 4 ++-- > s

[Spice-devel] [spice-space-pages] Update git repos and links

2018-05-10 Thread Snir Sheriber
Most of spice related git repositories are now hosted on gitlab.freedesktop.org/spice --- .gitlab-ci.yml | 4 ++-- developers.rst | 2 +- download.rst| 26 +- osx-client.rst | 4 ++-- spice-html5.rst | 4 ++-- usbredir.rst| 4 ++-- 6 files changed, 22 insert

Re: [Spice-devel] [PATCH spice-common 1/3] Add support for building with meson/ninja

2018-05-10 Thread Frediano Ziglio
> > Signed-off-by: Eduardo Lima (Etrunko) > --- > Makefile.am| 2 + > common/Makefile.am | 1 + > common/meson.build | 122 > docs/.gitignore| 1 + > docs/Makefile.am | 1 + > docs/meson.build | 10 +++ > meson.build| 177 > +

Re: [Spice-devel] [RFC spice-gtk v3 1/1] Gstreamer: Use GstVideoOverlay if possible

2018-05-10 Thread Frediano Ziglio
> > Hi, > > > On 05/09/2018 06:39 PM, Frediano Ziglio wrote: > >> Currently when gstreamer is used to decode a full-screen > >> stream sent from the server, the decoding frames are being > >> forced to RBGA format and pushed using appsink to be scaled > >> and rendered to screen. > >> > >> Today

Re: [Spice-devel] [PATCH] miLineArc(): initialize edge1, edge2

2018-05-10 Thread Frediano Ziglio
> > When compiling spice-common with meson/ninja under "release" mode, I get > the following compiler warnings: > > ../subprojects/spice-common/common/lines.c: In function ‘miLineArc’: > ../subprojects/spice-common/common/lines.c:2167:17: error: ‘edge2.dx’ may > be used uninitialized