Re: [Spice-devel] [PATCH spice-streaming-agent 1/3] Ensure that plugins cannot bypass version check

2018-04-20 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Thu, Apr 19, 2018 at 05:48:33PM +0100, Frediano Ziglio wrote: > From: Christophe de Dinechin > > This change addresses two issues related to plugin version checking: > > 1. It is possible for plugins to bypass version checking or do it wrong &g

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-20 Thread Christophe Fergeau
On Fri, Apr 20, 2018 at 10:10:17AM +0200, Christophe de Dinechin wrote: > There is no easy way to test if a method is there. There is, however, > an easy way to test if a C entry point is there in a shared library. > This is the difference between your scenario and mine. In mine, I can > explicitly

Re: [Spice-devel] [PATCH spice-streaming-agent 2/3] Change numbering schema

2018-04-19 Thread Christophe Fergeau
On Wed, Apr 18, 2018 at 12:47:42PM +0100, Frediano Ziglio wrote: > From: Christophe de Dinechin > > A major.minor numbering scheme is not ideal for ABI checks. > In particular, it makes it difficult to react to an incompatibility > that was detected post release. > > [More info] > > The major.m

Re: [Spice-devel] [PATCH spice-streaming-agent 1/3] Ensure that plugins cannot bypass version check

2018-04-19 Thread Christophe Fergeau
On Wed, Apr 18, 2018 at 12:47:41PM +0100, Frediano Ziglio wrote: > From: Christophe de Dinechin > > This change addresses two issues related to plugin version checking: > > 1. It is possible for plugins to bypass version checking or do it wrong >(as a matter of fact, the mjpeg fallback sets

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-18 Thread Christophe Fergeau
On Tue, Apr 17, 2018 at 06:39:05PM +0200, Christophe de Dinechin wrote: > When does this kind of scenario happen? Imagine we added support for > loading/unloading plugins. Version 13 adds a new interface to unload > plugins, and a new “unloadable plugin” entry point. Therefore, > starting with vers

Re: [Spice-devel] [PATCH spice-gtk] build: Generate correct version when spice-gtk is a submodule

2018-04-18 Thread Christophe Fergeau
Hey, This script comes from https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=build-aux/git-version-gen;h=6d073fcaddd827a396af4c52f1bf00bdd84a9f66;hb=HEAD where this issue might already be fixed, the line that you changed seems to be replaced by: elif test "`git log -1 --pretty=format:x

[Spice-devel] [spice-server v2 7/9] qxl: Release QXL resource in red_put_message

2018-04-17 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 6 -- server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index b0c47cfeb..a5e363579 100644 --- a/server

[Spice-devel] [spice-server v2 9/9] qxl: Improve 'red' and 'qxl' argument names

2018-04-17 Thread Christophe Fergeau
's quite easy to wonder what a 'red' is if you are not familiar with the convention. This commit adds a suffix to each of these 'red'/'qxl' variables so that it's clearer what they are referring to. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c |

[Spice-devel] [spice-server v2 1/9] qxl: Remove red_put_blend()

2018-04-17 Thread Christophe Fergeau
SpiceBlend is a typedef to SpiceCopy, and red_put_blend() and red_put_copy() are identical, so we can add a #define red_put_blend red_put_copy similar to the one we already have for red_get_blend. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 7 +-- 1 file changed, 1

[Spice-devel] [spice-server v2 5/9] qxl: Fix guest resources release in red_put_drawable()

2018-04-17 Thread Christophe Fergeau
gned-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index cc6a8b51d..ccb01d92d 100644 --- a/server/red-parse-qxl.c +++ b/server/red-parse-qxl.c @@ -1012,7

[Spice-devel] [spice-server v2 3/9] qxl: Move red_drawable_unref/red_drawable_new

2018-04-17 Thread Christophe Fergeau
RedDrawable really is a RedDrawCmd which is parsed by red-parse-qxl.h This commit moves them close to the other functions creating/unref'ing QXL commands parsed by red-parse-qxl.h Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 21 + server/red-parse-

[Spice-devel] [spice-server v2 2/9] qxl: Remove 'blackness' and 'invers' put/get methods

2018-04-17 Thread Christophe Fergeau
SpiceWhiteness/SpiceBlackness/SpiceInvers are 3 typedef for the same type, no need to have 3 identical red_put_xxx/red_get_xxx methods. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 25 - 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a

[Spice-devel] [spice-server v2 4/9] qxl: Make red_{get, put}_drawable static

2018-04-17 Thread Christophe Fergeau
Rather than needing to call red_drawable_new() and then initialize it with red_get_drawable(), we can improve slightly red_drawable new so that red_drawable_{new,ref,unref} is all which is used by code out of red-parse-qxl.c. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 17

[Spice-devel] [spice-server v2 8/9] qxl: Release QXL resources in red_put_update_cmd

2018-04-17 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 11 +++ server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index a5e363579..afd136e43 100644 --- a

[Spice-devel] [spice-server v2 6/9] qxl: Add red_cursor_cmd_new and red_cursor_cmd_free helpers

2018-04-17 Thread Christophe Fergeau
Currently, the cursor channel is allocating RedCursorCmd instances itself, and then calling into red-parse-qxl.h to initialize it, and doing something similar when releasing the data. This commit moves this common code to red-parse-qxl.[ch] Signed-off-by: Christophe Fergeau --- server/cursor

[Spice-devel] [spice-server v2 0/9] qxl: Move more guest resource release to red-parse-qxl

2018-04-17 Thread Christophe Fergeau
-parse-qxl. Changes since v1: - moved renaming patch to the end, and made it much more extensive - added a new patch unifying identical methods - reworked 'qxl: Fix guest resources release in red_put_drawable()' so that it's similar to the cursor changes Christophe Christophe F

Re: [Spice-devel] [spice-server 04/10] qxl: Fix guest resources release in red_put_drawable()

2018-04-17 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 06:51:52PM +0300, Uri Lublin wrote: > On 04/16/2018 01:13 PM, Christophe Fergeau wrote: > > At the moment, we'll unconditionally release the guest QXL resources in > > red_put_drawable() even if red_get_drawable() failed and did not > > initialize

Re: [Spice-devel] [PATCH spice-server 3/3] common-graphics-channel: Use manual flushing on stream to decrease packet fragmentation

2018-04-17 Thread Christophe Fergeau
ent_watch_update_mask(rcc, SPICE_WATCH_EVENT_READ); > +/* channel has no pending data to send so now we can flush data in > + * order to avoid data stall into buffers in case of manual > + * flushing > + */

Re: [Spice-devel] [PATCH spice-server v2] ci: Workaround bug in Valgrind detecting memcpy instead of memmove

2018-04-17 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Apr 17, 2018 at 11:19:16AM +0100, Frediano Ziglio wrote: > Due to a bug in current packaged Valgrind in the CI (1:3.13.0-13.fc27) > check-valgrind is failing with: > > ==17986== Source and destination overlap in memcpy_chk(0x72c060, 0x72c068, 3

Re: [Spice-devel] [spice-server 05/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_cursor_cmd()

2018-04-17 Thread Christophe Fergeau
an initial patch changing all of these if you prefer. > > > > Christophe > > > > I would personally keep red and qxl and add a qxl_instance. Fwiw, here is what renaming everything would look like. Quite some churn indeed :( From 22a4eb242a7b5da0c37a5ebf9aaf8156be423785

Re: [Spice-devel] [PATCH spice-server] ci: Workaround bug in Valgrind detecting memcpy instead of memmove

2018-04-17 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 02:07:57PM -0400, Frediano Ziglio wrote: > > > > On Mon, Apr 16, 2018 at 05:02:33PM +0100, Frediano Ziglio wrote: > > > Due to a bug in current packaged Valgrind check-valgrind is failing > > > with: > > > > > > ==17986== Source and destination overlap in memcpy_chk(0x72c0

Re: [Spice-devel] [PATCH spice-server] ci: Workaround bug in Valgrind detecting memcpy instead of memmove

2018-04-16 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 05:02:33PM +0100, Frediano Ziglio wrote: > Due to a bug in current packaged Valgrind check-valgrind is failing > with: > > ==17986== Source and destination overlap in memcpy_chk(0x72c060, 0x72c068, 33) > ==17986==at 0x4C344F0: __memcpy_chk (vg_replace_strmem.c:1581) > =

[Spice-devel] [spice-server] Slight simplification of red_channel_client_push() logic

2018-04-16 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-channel-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/red-channel-client.c b/server/red-channel-client.c index f154c5c63..d46c299c2 100644 --- a/server/red-channel-client.c +++ b/server/red-channel

Re: [Spice-devel] [spice-server 04/10] qxl: Fix guest resources release in red_put_drawable()

2018-04-16 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 07:25:19AM -0400, Frediano Ziglio wrote: > > > > At the moment, we'll unconditionally release the guest QXL resources in > > red_put_drawable() even if red_get_drawable() failed and did not > > initialize drawable->release_info_ext properly. > > This commit checks the QXLRe

Re: [Spice-devel] [spice-server 05/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_cursor_cmd()

2018-04-16 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 06:58:18AM -0400, Frediano Ziglio wrote: > Don't like this, lot of structures in this file use "qxl", for coherence > I would change all or nothing but changing all would mean a lot of changes > with not much value Imo 'red' and 'qxl' are not very good names, I'd prefer to

[Spice-devel] [spice-server 08/10] qxl: Release QXL resource in red_put_message

2018-04-16 Thread Christophe Fergeau
--- server/red-parse-qxl.c | 6 -- server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index 5408cfa5a..d7ae53804 100644 --- a/server/red-parse-qxl.c +++ b/server/red-pars

[Spice-devel] [spice-server 10/10] qxl: Release QXL resources in red_put_update_cmd

2018-04-16 Thread Christophe Fergeau
--- server/red-parse-qxl.c | 10 +++--- server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index d4a7decd3..313cd1bfb 100644 --- a/server/red-parse-qxl.c +++ b/server/

[Spice-devel] [spice-server 00/10] qxl: Move more guest resource release to red-parse-qxl

2018-04-16 Thread Christophe Fergeau
Hey, Currently, after parsing a QXL command through red-parse-qxl, the code which got the command has to tell red-parse-qxl when it no longer needs the command, but also to remember to release the command QXL resources itself. This series moves this 'release resource' logic to red-parse-qxl. Chri

[Spice-devel] [spice-server 04/10] qxl: Fix guest resources release in red_put_drawable()

2018-04-16 Thread Christophe Fergeau
At the moment, we'll unconditionally release the guest QXL resources in red_put_drawable() even if red_get_drawable() failed and did not initialize drawable->release_info_ext properly. This commit checks the QXLReleaseInfo in release_info_ext is non-0 before attempting to release it. --- server/re

[Spice-devel] [spice-server 03/10] qxl: Make red_{get, put}_drawable static

2018-04-16 Thread Christophe Fergeau
Rather than needing to call red_drawable_new() and then initialize it with red_get_drawable(), we can improve slightly red_drawable new so that red_drawable_{new,ref,unref} is all which is used by code out of red-parse-qxl.c. --- server/red-parse-qxl.c | 17 - server/red-parse-qxl.

[Spice-devel] [spice-server 06/10] qxl: Add red_cursor_cmd_new and red_cursor_cmd_free helpers

2018-04-16 Thread Christophe Fergeau
Currently, the cursor channel is allocating RedCursorCmd instances itself, and then calling into red-parse-qxl.h to initialize it, and doing something similar when releasing the data. This commit moves this common code to red-parse-qxl.[ch] --- server/cursor-channel.c | 6 +- server/

[Spice-devel] [spice-server 09/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_update_cmd

2018-04-16 Thread Christophe Fergeau
This is in preparation for next commit. --- server/red-parse-qxl.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index d7ae53804..d4a7decd3 100644 --- a/server/red-parse-qxl.c +++ b/server/red-parse-qxl.c @@ -1258,

[Spice-devel] [spice-server 05/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_cursor_cmd()

2018-04-16 Thread Christophe Fergeau
This is in preparation for next commit --- server/red-parse-qxl.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index 80746ecbb..c08d18160 100644 --- a/server/red-parse-qxl.c +++ b/server/red-parse-qxl.c @

[Spice-devel] [spice-server 01/10] qxl: Remove red_put_blend()

2018-04-16 Thread Christophe Fergeau
SpiceBlend is a typedef to SpiceCopy, and red_put_blend() and red_put_copy() are identical, so we can add a #define red_put_blend red_put_copy similar to the one we already have for red_get_blend. --- server/red-parse-qxl.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/

[Spice-devel] [spice-server 07/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_message

2018-04-16 Thread Christophe Fergeau
This is in preparation for next commit. --- server/red-parse-qxl.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index eb80ba81b..5408cfa5a 100644 --- a/server/red-parse-qxl.c +++ b/server/red-parse-qxl.c @@ -12

[Spice-devel] [spice-server 02/10] qxl: Move red_drawable_unref/red_drawable_new

2018-04-16 Thread Christophe Fergeau
RedDrawable really is a RedDrawCmd which is parsed by red-parse-qxl.h This commit moves them close to the other functions creating/unref'ing QXL commands parsed by red-parse-qxl.h --- server/red-parse-qxl.c | 21 + server/red-parse-qxl.h | 2 ++ server/red-worker.c| 20 ---

Re: [Spice-devel] [PATCH spice-gtk 3/4] gio-coroutine: Remove only assigned self field

2018-04-16 Thread Christophe Fergeau
Alternatively, this could come first in the series, with the nice side-effect of fixing that GSource inheritance issue that you mentioned ;) With the order that you chose, this allows to make the fix more obvious, and to better document why it was not a problem (by luck). On Fri, Apr 13, 2018 at 0

Re: [Spice-devel] [PATCH spice-gtk 0/4] Miscellaneous small patches

2018-04-16 Thread Christophe Fergeau
For the series Acked-by: Christophe Fergeau but see my comment on 1/4 On Fri, Apr 13, 2018 at 03:49:15PM +0100, Frediano Ziglio wrote: > Frediano Ziglio (4): > gio-coroutine: Fix C inheritance > gio-coroutine: Make waitFuncs static > gio-coroutine: Remove only assigne

Re: [Spice-devel] [PATCH spice-gtk 1/4] gio-coroutine: Fix C inheritance

2018-04-16 Thread Christophe Fergeau
pice-gtk set GConditiionWaitSource::self. So this ends up all working even though this is wrong. Acked-by: Christophe Fergeau but I'd add more details to the log Christophe > > Signed-off-by: Frediano Ziglio > --- > src/gio-coroutine.c | 2 +- > 1 file changed, 1 insertion(+), 1 delet

Re: [Spice-devel] [spice-server 2/2] cursor: Rename cursor_marshall to red_marshall_cursor_command

2018-04-13 Thread Christophe Fergeau
On Thu, Apr 12, 2018 at 11:09:39AM +0200, Christophe Fergeau wrote: > On Wed, Apr 11, 2018 at 01:16:57PM -0400, Frediano Ziglio wrote: > > > > > > The name is more consistent with red_marshall_cursor_init. > > > --- > > > server/cursor-channel.c | 8 -

Re: [Spice-devel] [PATCH spice-server 3/3] common-graphics-channel: use manual flushing on stream to decrease packet fragmentation

2018-04-12 Thread Christophe Fergeau
On Tue, Jan 16, 2018 at 02:18:15PM +, Frediano Ziglio wrote: > In order to use new TCP_CORK feature disable auto flush. 'the new TCP_CORK feature, disable auto flush' Might be worth explaining in the commit log why you disable auto_flush only for RedCommonGraphicsChannel. > > Signed-off-by:

Re: [Spice-devel] [PATCH spice-server 2/3] stream: implements flush using TCP_CORK

2018-04-12 Thread Christophe Fergeau
RedStream *stream, const void > *in_buf, size_t n) > > bool red_stream_set_auto_flush(RedStream *s, bool enable) > { > -return enable; > +if (s->priv->use_cork == !enable) { Might be slightly more readable if 'enable' is renamed to 'auto_flush' Acked-by: Christophe Fergeau signature.asc Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-server 1/3] stream: implement interface for manual flush

2018-04-12 Thread Christophe Fergeau
ata are written. This is the default. > + * If not set you should call red_stream_flush to force 'If not set, you should ...' > + * data to be sent. Failing to call red_stream_flush on a > + * manual flush stream could lead to latency. > + * Disabling auto flush can

Re: [Spice-devel] [spice-server 1/2] cursor: Delay release of QXL guest cursor resources

2018-04-12 Thread Christophe Fergeau
> > > > This version of the fix is based on a suggestion from Frediano Ziglio. > > > > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1540919 > > > > > > > > Signed-off-by: Christophe Fergeau > > > > --- > > > > serve

Re: [Spice-devel] [spice-server 2/2] cursor: Rename cursor_marshall to red_marshall_cursor_command

2018-04-12 Thread Christophe Fergeau
On Wed, Apr 11, 2018 at 01:16:57PM -0400, Frediano Ziglio wrote: > > > > The name is more consistent with red_marshall_cursor_init. > > --- > > server/cursor-channel.c | 8 > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > Why command (so red_marshall_cursor) ? > The item is

Re: [Spice-devel] [spice-server 1/2] cursor: Delay release of QXL guest cursor resources

2018-04-12 Thread Christophe Fergeau
s to the pre-1c6e7cf7 behaviour to avoid a regression > > while QEMU is being fixed. > > > > This version of the fix is based on a suggestion from Frediano Ziglio. > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1540919 > > > > Signed-off-by: Christop

[Spice-devel] [spice-server 1/2] cursor: Delay release of QXL guest cursor resources

2018-04-11 Thread Christophe Fergeau
Ziglio. https://bugzilla.redhat.com/show_bug.cgi?id=1540919 Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 3 +++ server/red-parse-qxl.h | 1 + server/red-worker.c| 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/red-parse-qxl.c b/server/red-pa

[Spice-devel] [spice-server 2/2] cursor: Rename cursor_marshall to red_marshall_cursor_command

2018-04-11 Thread Christophe Fergeau
The name is more consistent with red_marshall_cursor_init. --- server/cursor-channel.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/cursor-channel.c b/server/cursor-channel.c index 522261e3f..a549c5fe0 100644 --- a/server/cursor-channel.c +++ b/server/cursor-c

Re: [Spice-devel] [spice-server] cursor: Delay release of QXL guest cursor resources

2018-04-10 Thread Christophe Fergeau
gt; > Christophe > > > > > > > When do you plan to remove this patch from spice-server? > > > > > On Thu, Apr 05, 2018 at 10:36:27AM +0200, Christophe Fergeau wrote: > > > > There's an implicit API/ABI contract between QEMU and SPICE that SPICE &

Re: [Spice-devel] [spice-gtk v1 2/2] channel-usbredir: Fix crash on channel-up

2018-04-10 Thread Christophe Fergeau
On Tue, Apr 10, 2018 at 02:17:45PM +0200, Victor Toso wrote: > Hi, > > On Tue, Apr 10, 2018 at 01:37:05PM +0200, Victor Toso wrote: > > Hi, > > > > On Tue, Apr 10, 2018 at 12:41:16PM +0200, Christophe Fergeau wrote: > > > On Fri, Apr 06, 2018 at 09:59:44AM +0

Re: [Spice-devel] [PATCH spice-server] red-parse-qxl: Remove unused device_data field

2018-04-10 Thread Christophe Fergeau
; --- a/server/red-parse-qxl.h > +++ b/server/red-parse-qxl.h > @@ -113,7 +113,6 @@ typedef struct RedCursorCmd { > } trail; > SpicePoint16 position; > } u; > -uint8_t *device_data; > } RedCursorCmd; Acked-by: Christophe Fergeau it's present in the

Re: [Spice-devel] [spice-server] cursor: Delay release of QXL guest cursor resources

2018-04-10 Thread Christophe Fergeau
grade both at once or not, spice-server will have the same behaviour as in the 0.12 branch. Christophe On Thu, Apr 05, 2018 at 10:36:27AM +0200, Christophe Fergeau wrote: > There's an implicit API/ABI contract between QEMU and SPICE that SPICE > will keep the guest QXL resources aliv

Re: [Spice-devel] [spice-gtk v1 2/2] channel-usbredir: Fix crash on channel-up

2018-04-10 Thread Christophe Fergeau
On Fri, Apr 06, 2018 at 09:59:44AM +0200, Victor Toso wrote: > From: Victor Toso > > By adding a guard to not handle channel-up on SpiceUsbredirChannel in > case struct usbredirhost wasn't initialized yet. Same guard is in > place for the generic usbredir_handle_msg() function to avoid handling >

Re: [Spice-devel] [PATCH spice-streaming-agent] ci: Add make package

2018-04-09 Thread Christophe Fergeau
On Mon, Apr 09, 2018 at 10:53:34AM +0300, Snir Sheriber wrote: > make is no longer installed by default in fedora:latest Sure, Acked-by: Christophe Fergeau though make/gcc-c++ should also come from 'dnf builddep spice-streaming-agent' if this is no longer installed by default

Re: [Spice-devel] [PATCH spice-streaming-agent] Use pkg-config to find jpeg library if available

2018-04-06 Thread Christophe Fergeau
found])) +]) AC_SUBST(JPEG_LIBS) dnl === Acked-by: Christophe Fergeau On Fri, Apr 06, 2018 at 07:41:22AM +0100, Frediano Ziglio wrote: > Newer libraries provide pkg-config module for libjpeg, attempt > to use it,

Re: [Spice-devel] [PATCH spice-streaming-agent] Revert "build: Use pkgconfig to detect libjpeg"

2018-04-06 Thread Christophe Fergeau
Ah I thought this was done already, but yeah, Acked-by: Christophe Fergeau On Thu, Apr 05, 2018 at 06:03:15PM +0100, Frediano Ziglio wrote: > This reverts commit 5240f212ed364d5139f30810b14884f8e2c03535. > RHEL 7 does not provide a pkg-config module for libjpeg. > > Signed-off-

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-05 Thread Christophe Fergeau
On Fri, Mar 23, 2018 at 01:05:23PM +0100, Christophe de Dinechin wrote: > 3. Major.minor numbering scheme > > The major.minor numbering scheme initially selected makes it harder > to fixes cases where an incompatibility was detected after release. I'm still of the opinion that we should break ABI

Re: [Spice-devel] [spice-server] cursor: Consistently use g_memdup() for cursor data

2018-04-05 Thread Christophe Fergeau
On Thu, Apr 05, 2018 at 10:55:13AM +0200, Christophe Fergeau wrote: > On Thu, Apr 05, 2018 at 04:43:17AM -0400, Frediano Ziglio wrote: > > > > > > Currently, red-parse-qxl.c open codes g_memdup() when it needs to > > > > "open codes" ? > >

Re: [Spice-devel] [spice-server] cursor: Consistently use g_memdup() for cursor data

2018-04-05 Thread Christophe Fergeau
On Thu, Apr 05, 2018 at 04:43:17AM -0400, Frediano Ziglio wrote: > > > > Currently, red-parse-qxl.c open codes g_memdup() when it needs to > > "open codes" ? > well, currently uses g_malloc+memcpy which can be rewritten with > g_memdup. Yes, doing this can be seen as reimplementing g_memdup, whi

[Spice-devel] [spice-server] cursor: Delay release of QXL guest cursor resources

2018-04-05 Thread Christophe Fergeau
the proper fix would be in QEMU so that spice-server does not need to have that kind of knowledge regarding QEMU internal implementation, this commit reverts to the pre-1c6e7cf7 behaviour to avoid a regression while QEMU is being fixed. https://bugzilla.redhat.com/show_bug.cgi?id=1540919 Signed-off

[Spice-devel] [spice-server] cursor: Consistently use g_memdup() for cursor data

2018-04-05 Thread Christophe Fergeau
Currently, red-parse-qxl.c open codes g_memdup() when it needs to duplicate the cursor data, while red-stream-device.c does this using spice_memdup(). This commit makes use of g_memdup() in both cases so that this memory is consistently allocated through glib. Signed-off-by: Christophe Fergeau

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-29 Thread Christophe Fergeau
On Thu, Mar 29, 2018 at 10:36:06AM +0200, Christophe de Dinechin wrote: > > > > On 29 Mar 2018, at 10:05, Christophe Fergeau wrote: > > > > On Wed, Mar 28, 2018 at 05:54:21PM +0200, Christophe de Dinechin wrote: > >>> With that said, I find the cur

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-29 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 05:35:35PM +0200, Christophe de Dinechin wrote: > > On 28 Mar 2018, at 17:04, Christophe Fergeau wrote: > > The part I'm missing is how you extract this limited number of full > > strings that we'll need to translate into a po file (or equi

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-29 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 05:54:21PM +0200, Christophe de Dinechin wrote: > > With that said, I find the current "ODR" portion of the commit log > > misleading, it's easy to get the impression that after this change, we > > won't have any ODR problem anymore (this is what I initially thought!). > >

Re: [Spice-devel] [PATCH 0/2] Make plugin version checking more robust

2018-03-28 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 06:06:19PM +0200, Christophe de Dinechin wrote: > > If my task is to "move version check to the agent", do I _have_ to change > > the semantics of the version check? No. > > Of course you have to. There is no “PluginVersionIsCompatible” > anymore, etc, so the version number

Re: [Spice-devel] [PATCH 0/2] Make plugin version checking more robust

2018-03-28 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 10:47:27AM +0200, Christophe de Dinechin wrote: > > What matters in my opinion is that we decide to break it, once we've > > made that decision, the number of commits which are going to make ABI > > breaking changes is less important. > > Introducing “subtle” changes such a

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-28 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 11:10:36AM +0200, Christophe de Dinechin wrote: > > > > On 26 Mar 2018, at 19:06, Christophe Fergeau wrote: > > > > On Fri, Mar 23, 2018 at 01:05:23PM +0100, Christophe de Dinechin wrote: > >> 2. ODR-related problems > >> >

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-28 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 02:44:56PM +0200, Christophe de Dinechin wrote: > In my proposal, that message is built in format_message with something like: > > int written = snprintf(buffer, size, "%s writing %s for file ‘%s'", > what(), operation, filename.c_str()); > return append_strerr

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-28 Thread Christophe Fergeau
> Do you have something against requiring string constants in English for our > error messages? > > Is it so difficult to understand that if I have: > > WriteError(“can’t write”, “header”, filename) > WriteError(“can’t write”, “boson”, filename) > > I can localize all the combinatio

Re: [Spice-devel] [PATCH spice-server 1/2] Add support for building with meson

2018-03-27 Thread Christophe Fergeau
On Tue, Mar 27, 2018 at 09:57:35AM -0300, Eduardo Lima (Etrunko) wrote: > On 27/03/18 09:51, Christophe Fergeau wrote: > > On Tue, Mar 27, 2018 at 08:53:06AM -0300, Eduardo Lima (Etrunko) wrote: > >> No, I think it should work, but this .wrap file is useful the first time &g

Re: [Spice-devel] [PATCH spice-server 1/2] Add support for building with meson

2018-03-27 Thread Christophe Fergeau
On Tue, Mar 27, 2018 at 08:53:06AM -0300, Eduardo Lima (Etrunko) wrote: > No, I think it should work, but this .wrap file is useful the first time > user clones the repository, it will fetch spice-common automatically. Hmm, but is this 'subproject' command going to handle git submodule updates pro

Re: [Spice-devel] [PATCH spice-server 1/2] Add support for building with meson

2018-03-27 Thread Christophe Fergeau
Couple of notes for people trying this, On Thu, Mar 22, 2018 at 02:18:20PM -0300, Eduardo Lima (Etrunko) wrote: > diff --git a/meson.build b/meson.build > new file mode 100644 > index ..f373e662 > --- /dev/null > +++ b/meson.build > @@ -0,0 +1,175 @@ > +# > +# project definition > +# > +#

Re: [Spice-devel] [PATCH 0/2] Make plugin version checking more robust

2018-03-27 Thread Christophe Fergeau
On Tue, Mar 27, 2018 at 10:28:24AM +0200, Christophe de Dinechin wrote: > > > > On 27 Mar 2018, at 10:12, Christophe Fergeau wrote: > > > > With the right patch attached this time.. ;) I've only compile-tested > > this as this really is just a proof

Re: [Spice-devel] [PATCH 0/2] Make plugin version checking more robust

2018-03-27 Thread Christophe Fergeau
With the right patch attached this time.. ;) I've only compile-tested this as this really is just a proof of concept at this point. Christophe On Mon, Mar 26, 2018 at 06:47:08PM +0200, Christophe Fergeau wrote: > On Mon, Mar 26, 2018 at 11:27:19AM +0200, Christophe de Dinech

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-26 Thread Christophe Fergeau
On Fri, Mar 23, 2018 at 01:05:23PM +0100, Christophe de Dinechin wrote: > 2. ODR-related problems > > The C++ One Definition Rule (ODR) states that all translation units > must see the same definitions. In the current code, when we call > Agent::PluginVersionIsCompatible from the plugin, it is an

Re: [Spice-devel] [PATCH 0/2] Make plugin version checking more robust

2018-03-26 Thread Christophe Fergeau
On Mon, Mar 26, 2018 at 11:27:19AM +0200, Christophe de Dinechin wrote: > > > > On 26 Mar 2018, at 11:25, Christophe Fergeau wrote: > > > > Hey, > > > > On Fri, Mar 23, 2018 at 01:05:22PM +0100, Christophe de Dinechin wrote: > >> From: Christop

Re: [Spice-devel] [PATCH 0/2] Make plugin version checking more robust

2018-03-26 Thread Christophe Fergeau
Hey, On Fri, Mar 23, 2018 at 01:05:22PM +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > Ensure that plugin version checking cannot be bypassed. > Implement version checking without violating the C++ ODR. > Improve ABI version numbering when incompatibilites are detected p

Re: [Spice-devel] [PATCH spice-server v2] stream-channel: Send the full frame in a single message

2018-03-16 Thread Christophe Fergeau
Hey, For some reason, I was finding this quite hard to review until I split it in some preparation patch with no behaviour change followed by the actual changes, see the attachement for how I split things, though some small details might be wrong. On Wed, Mar 07, 2018 at 12:01:49PM +, Fredian

Re: [Spice-devel] [PATCH spice-server 1/2] Change ENABLE_EXTRA_CHECKS statements to #ifdef

2018-03-15 Thread Christophe Fergeau
On Tue, Mar 13, 2018 at 10:37:46AM -0300, Eduardo Lima (Etrunko) wrote: > On 13/03/18 04:21, Frediano Ziglio wrote: > >> > >> This patch makes it clear that this is a configure switch and not a > >> variable defined somewhere else in the code. > >> > > > > The code is intended that way to make the

[Spice-devel] [spice-gtk] build: Remove SPICE_GTK_LOCALEDIR

2018-03-15 Thread Christophe Fergeau
This became obsolete after 93b213e 'spicy-*: Remove translation support' Signed-off-by: Christophe Fergeau --- configure.ac| 3 --- src/Makefile.am | 1 - 2 files changed, 4 deletions(-) diff --git a/configure.ac b/configure.ac index 2a14055b..17799c1a 100644 --- a/configur

Re: [Spice-devel] [PATCH spice-server 1/3] ci: Add glib-networking package

2018-03-14 Thread Christophe Fergeau
for the series, Acked-by: Christophe Fergeau On Tue, Mar 13, 2018 at 10:12:56PM +, Frediano Ziglio wrote: > This is required by the new test-listen test to connect using > TLS. > > Signed-off-by: Frediano Ziglio > --- > .gitlab-ci.yml | 2 +- > 1 file changed, 1 ins

Re: [Spice-devel] [PATCH v2] Use scancode instead of keycode names

2018-03-12 Thread Christophe Fergeau
p”) which differs to distinguish > between “xfree86” and “evdev” when the there is no keycode name. extra "the" here, apart from that, looks good to me, thanks a lot for fixing this! I'll push this in spice-gtk this week. Acked-by: Christophe Fergeau Christophe > > Signed-of

[Spice-devel] [spice-server v2 1/7] reds: Close sockets when failing to watch them

2018-03-12 Thread Christophe Fergeau
spice-server instance. Signed-off-by: Christophe Fergeau --- server/reds.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/server/reds.c b/server/reds.c index 73c9ec20f..415d570fa 100644 --- a/server/reds.c +++ b/server/reds.c @@ -2607,6 +26

[Spice-devel] [spice-server v2 2/7] build: Bump glib version

2018-03-12 Thread Christophe Fergeau
From spice-gtk b312ca08 commit: "At the moment: - Fedora 26 has 2.52 - Fedora 25 has 2.50 - Fedora 24 has 2.48 - CentOS 7 has 2.46 - Debian 9 has 2.50" RHEL6 only have 2.28, but glib 2.32 is only used in a test case at the moment. Signed-off-by: Christop

[Spice-devel] [spice-server v2 6/7] test-listen: Add TLS test

2018-03-12 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/tests/test-listen.c | 106 +++-- 1 file changed, 103 insertions(+), 3 deletions(-) diff --git a/server/tests/test-listen.c b/server/tests/test-listen.c index 7843c9b67..77a185abf 100644 --- a/server/tests/test

[Spice-devel] [spice-server v2 4/7] test-listen: Add test case for port/address configuration

2018-03-12 Thread Christophe Fergeau
Unix sockets, TLS sockets, ... Signed-off-by: Christophe Fergeau --- server/tests/Makefile.am | 1 + server/tests/test-listen.c | 191 + 2 files changed, 192 insertions(+) create mode 100644 server/tests/test-listen.c diff --git a/server/tests/Makefile

[Spice-devel] [spice-server v2 3/7] tests: basic-event-loop: Silence debug message

2018-03-12 Thread Christophe Fergeau
There is currently a debug printf which is always shown when a mainloop event is triggered. This is unlikely to be useful unless one is debugging the event loop code. Signed-off-by: Christophe Fergeau --- server/tests/basic-event-loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Spice-devel] [spice-server v2 5/7] test-listen: Add event loop helpers

2018-03-12 Thread Christophe Fergeau
These factor a bit of common code, and more importantly, help with freeing all event loop related data at the end of each test. Signed-off-by: Christophe Fergeau --- server/tests/test-listen.c | 118 +++-- 1 file changed, 83 insertions(+), 35 deletions

[Spice-devel] [spice-server v2 7/7] test-listen: Add Unix socket test

2018-03-12 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- configure.ac | 3 +++ server/tests/Makefile.am | 4 +++- server/tests/test-listen.c | 38 +++--- 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index bcd4bb4d5

[Spice-devel] [spice-server v2 0/7] Add test-listen test case

2018-03-12 Thread Christophe Fergeau
While working on some bug/new feature for SPICE, I added a test case for our spice_server_set_port/_set_tls/... API. While the work I did this for still needs some work, this test case should be good enough on its own. Christophe Christophe Fergeau (7): reds: Close sockets when failing to

Re: [Spice-devel] [PATCH spice-server] red-record-qxl: fix clang warning

2018-03-12 Thread Christophe Fergeau
Ok, Acked-by: Christophe Fergeau On Mon, Mar 12, 2018 at 12:33:47PM +, Frediano Ziglio wrote: > Fix clang warning: > > red-record-qxl.c:893:13: error: variable 'fd_in' is used uninitialized > whenever 'if' condition is false [-Werror,-Wsometimes-uninitializ

Re: [Spice-devel] [spice-server 4/8] test-listen: Add test case port/address configuration

2018-03-12 Thread Christophe Fergeau
On Fri, Mar 09, 2018 at 06:36:24AM -0500, Frediano Ziglio wrote: > > +static void test_connect_plain(void) > > +{ > > +GThread *thread; > > +int result; > > + > > +/* server */ > > +SpiceServer *server = spice_server_new(); > > +core = basic_event_loop_init(); > > +spice_ser

Re: [Spice-devel] [PATCH spice-protocol 2/2] macros: Use Visual C++ built-ins for byte swapping if available

2018-03-09 Thread Christophe Fergeau
WAP16(val) _byteswap_ushort(val) > +# define SPICE_BYTESWAP32(val) _byteswap_ulong(val) > +# define SPICE_BYTESWAP64(val) _byteswap_uint64(val) I don't even know if they are going to be used? The only potential user would be the QXL drivers, and they don't seem to be using that macro. Not

Re: [Spice-devel] [PATCH spice-protocol 1/2] macros: Use GCC built-ins to swap bytes

2018-03-09 Thread Christophe Fergeau
ery happy to see that ! Acked-by: Christophe Fergeau signature.asc Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [spice-server v3] reds: Close sockets when failing to watch them

2018-03-09 Thread Christophe Fergeau
On Thu, Mar 08, 2018 at 03:54:56PM +0200, Uri Lublin wrote: > On 03/08/2018 03:23 PM, Christophe Fergeau wrote: > > Currently if we fail to set up the watch waiting for accept() to be > > called on the socket, we still keep the network socket(s) open even if we > > are not go

Re: [Spice-devel] [PATCH spice-server] ci: Fix compiling of some functions

2018-03-09 Thread Christophe Fergeau
gt; stream-device.c:182:1: error: the frame size of 32992 bytes is larger than > 20460 bytes [-Werror=frame-larger-than=] > > Allow larger stack on "makecheck" to avoid this issue. Acked-by: Christophe Fergeau > > Signed-off-by: Frediano Ziglio > --- > .g

Re: [Spice-devel] [PATCH 09/22] Move read, write, handle and locking into the 'Stream' class

2018-03-08 Thread Christophe Fergeau
On Thu, Mar 01, 2018 at 08:52:50PM +0100, Christophe de Dinechin wrote: > > > > On 1 Mar 2018, at 11:59, Frediano Ziglio wrote: > > > >> > >> From: Christophe de Dinechin > >> > >> The 'Stream' class is designed to abstract file I/O. In a subsequent > >> patch, message formatting will be iso

Re: [Spice-devel] [spice-server v2] reds: Close sockets when failing to watch them

2018-03-08 Thread Christophe Fergeau
On Thu, Mar 08, 2018 at 05:50:29AM -0500, Frediano Ziglio wrote: > > > > Currently if we fail to set up the watch waiting for accept() to be > > called on the socket, we still keep the network socket(s) open even if we > > are not going to be able to use it. This commit makes sure it's closed a >

[Spice-devel] [spice-server v3] reds: Close sockets when failing to watch them

2018-03-08 Thread Christophe Fergeau
Currently if we fail to set up the watch waiting for accept() to be called on the socket, we still keep the network socket(s) open even if we are not going to be able to use it. This commit makes sure it's closed a set to -1 when such a failure occurs rather than having a half initialized spice-ser

Re: [Spice-devel] [PATCH 06/22] Get rid of C-style memset initializations, use C++ style aggregates

2018-03-08 Thread Christophe Fergeau
On Thu, Mar 08, 2018 at 05:39:48AM -0500, Frediano Ziglio wrote: > > > There are however still some issues: > > > - the syntax is using C++20 while we state we use C++11 syntax, this > > > is basically using C compatibility extensions. I just tried and for > > > instance this code is not accepted

<    4   5   6   7   8   9   10   11   12   13   >