[Spice-devel] [PATCH] Check client is using unix sockets in dcc_gl_draw_item_new

2016-09-27 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/dcc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/dcc.c b/server/dcc.c index a5a1b40..3d3ac8e 100644 --- a/server/dcc.c +++ b/server/dcc.c @@ -593,7 +593,8 @@ RedPipeItem *dcc_gl_draw_item_new(RedChannelClient *rcc, void

Re: [Spice-devel] [PATCH 1/2] Split RedCharDeviceSmartcard and SmartCardChannelClient

2016-09-27 Thread Frediano Ziglio
> > --- > server/Makefile.am| 2 + > server/smartcard-channel-client.c | 300 +++ > server/smartcard-channel-client.h | 96 ++ > server/smartcard.c| 360 > ++ > server/smartcard.h

Re: [Spice-devel] [PATCH] Check client is using unix sockets in dcc_gl_draw_item_new

2016-09-27 Thread Christophe Fergeau
Isn't this already tested somewhere else before reaching this place? Not really opposed to the patch, but knowing how this can be hit would probably be useful. Christophe On Tue, Sep 27, 2016 at 09:44:16AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/dcc.c | 3 +

Re: [Spice-devel] [PATCH qxl-wddm-dod v5 2/7] Code Analysis fix

2016-09-27 Thread Christophe Fergeau
Hey, A huge part of this patch is adding +__declspec(code_seg("PAGE")) (and removing #pragma code_seg()), which are probably related to this macro, but which are added with no rationale. The shortlog should probably be something different than "code analysis fix", but more somethnig like "Use PAG

Re: [Spice-devel] [PATCH 2/2] Convert RedChannelClient hierarchy to GObject

2016-09-27 Thread Frediano Ziglio
> > Convert the RedChannelClient heirarchy into GObjects. Since the existing > constructors could fail and return NULL, I inherited the base channel > client from GInitable, which introduces a dependency on gio. > > When using private structs with GObject, there's a maximum size of (I > think) 64

Re: [Spice-devel] [PATCH qxl-wddm-dod v5 1/7] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-27 Thread Christophe Fergeau
On Mon, Sep 26, 2016 at 04:00:05PM +0300, Sameeh Jubran wrote: > Disable execution bit on mapping improving security. > > MmMapIoSpaceEx is available only in Windows 10 thus > the macros are used. Hey, looks good to me. Just one question, by default if this is built on a Windows 10 system, I gues

Re: [Spice-devel] [PATCH qxl-wddm-dod v5 1/7] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-27 Thread Dmitry Fleytman
> On 27 Sep 2016, at 12:51 PM, Christophe Fergeau wrote: > > On Mon, Sep 26, 2016 at 04:00:05PM +0300, Sameeh Jubran wrote: >> Disable execution bit on mapping improving security. >> >> MmMapIoSpaceEx is available only in Windows 10 thus >> the macros are used. > > Hey, looks good to me. Just

Re: [Spice-devel] [PATCH qxl-wddm-dod v5 1/7] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-27 Thread Christophe Fergeau
Hey, On Tue, Sep 27, 2016 at 12:57:33PM +0300, Dmitry Fleytman wrote: > > > On 27 Sep 2016, at 12:51 PM, Christophe Fergeau wrote: > > > > On Mon, Sep 26, 2016 at 04:00:05PM +0300, Sameeh Jubran wrote: > >> Disable execution bit on mapping improving security. > >> > >> MmMapIoSpaceEx is availa

Re: [Spice-devel] [PATCH] Check client is using unix sockets in dcc_gl_draw_item_new

2016-09-27 Thread Frediano Ziglio
> > Isn't this already tested somewhere else before reaching this place? Not > really opposed to the patch, but knowing how this can be hit would > probably be useful. > > Christophe > Currently this is simply avoided by the fact that Virgl with 3d means Unix socket. Once you enable (in Qemu) t

Re: [Spice-devel] [PATCH qxl-wddm-dod v5 2/7] Code Analysis fix

2016-09-27 Thread Dmitry Fleytman
> On 27 Sep 2016, at 12:35 PM, Christophe Fergeau wrote: > > Hey, > > A huge part of this patch is adding +__declspec(code_seg("PAGE")) (and > removing #pragma code_seg()), which are probably related to this macro, > but which are added with no rationale. > The shortlog should probably be some

Re: [Spice-devel] [PATCH qxl-wddm-dod v5 1/7] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-27 Thread Dmitry Fleytman
> On 27 Sep 2016, at 13:00 PM, Christophe Fergeau wrote: > > Hey, > > On Tue, Sep 27, 2016 at 12:57:33PM +0300, Dmitry Fleytman wrote: >> >>> On 27 Sep 2016, at 12:51 PM, Christophe Fergeau wrote: >>> >>> On Mon, Sep 26, 2016 at 04:00:05PM +0300, Sameeh Jubran wrote: Disable execution b

Re: [Spice-devel] [PATCH qxl-wddm-dod v5 1/7] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-27 Thread Frediano Ziglio
> > On 27 Sep 2016, at 13:00 PM, Christophe Fergeau < cferg...@redhat.com > > > wrote: > > > Hey, > > > On Tue, Sep 27, 2016 at 12:57:33PM +0300, Dmitry Fleytman wrote: > > > > > On 27 Sep 2016, at 12:51 PM, Christophe Fergeau < cferg...@redhat.com > > > > > wrote: > > > > > > > > > > On

Re: [Spice-devel] [PATCH] Check client is using unix sockets in dcc_gl_draw_item_new

2016-09-27 Thread Christophe Fergeau
On Tue, Sep 27, 2016 at 06:01:28AM -0400, Frediano Ziglio wrote: > > > > Isn't this already tested somewhere else before reaching this place? Not > > really opposed to the patch, but knowing how this can be hit would > > probably be useful. > > > > Christophe > > > > Currently this is simply av

Re: [Spice-devel] [PATCH qxl-wddm-dod v5 2/7] Code Analysis fix

2016-09-27 Thread Christophe Fergeau
On Tue, Sep 27, 2016 at 01:01:22PM +0300, Dmitry Fleytman wrote: > > > On 27 Sep 2016, at 12:35 PM, Christophe Fergeau wrote: > > > > Hey, > > > > A huge part of this patch is adding +__declspec(code_seg("PAGE")) (and > > removing #pragma code_seg()), which are probably related to this macro,

Re: [Spice-devel] [PATCH qxl-wddm-dod v5 1/7] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-27 Thread Christophe Fergeau
On Tue, Sep 27, 2016 at 06:07:46AM -0400, Frediano Ziglio wrote: > > > On 27 Sep 2016, at 13:00 PM, Christophe Fergeau < cferg...@redhat.com > > > > wrote: > > > On Tue, Sep 27, 2016 at 12:57:33PM +0300, Dmitry Fleytman wrote: > > > > > On 27 Sep 2016, at 12:51 PM, Christophe Fergeau < cferg...@red

Re: [Spice-devel] [PATCH 1/3] Generate GTypes for spice-server enums

2016-09-27 Thread Christophe Fergeau
On Mon, Sep 19, 2016 at 10:02:33AM -0500, Jonathon Jongsma wrote: > The GType will be useful to allow these enums to be used as GObject > properties. Acked-by: Christophe Fergeau Christophe signature.asc Description: PGP signature ___ Spice-devel mai

Re: [Spice-devel] [PATCH 03/18] Add small comment for detach_stream

2016-09-27 Thread Christophe Fergeau
On Mon, Sep 26, 2016 at 09:12:36AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/stream.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/server/stream.c b/server/stream.c > index 9d878c8..95ff015 100644 > --- a/server/stream.c > +++ b/server/stream.c

Re: [Spice-devel] [PATCH 06/18] Rename surface argument to surface_cmd

2016-09-27 Thread Christophe Fergeau
On Mon, Sep 26, 2016 at 09:12:39AM +0100, Frediano Ziglio wrote: > Attempt to use consistent naming. > Usually we use surface name for RedSurface so make sure > code reader do not get confused using a different name > for RedSurfaceCmd. Yup, definitely. Or alternatively just "cmd", I'm not sure ho

Re: [Spice-devel] [PATCH 06/18] Rename surface argument to surface_cmd

2016-09-27 Thread Frediano Ziglio
> > On Mon, Sep 26, 2016 at 09:12:39AM +0100, Frediano Ziglio wrote: > > Attempt to use consistent naming. > > Usually we use surface name for RedSurface so make sure > > code reader do not get confused using a different name > > for RedSurfaceCmd. > > Yup, definitely. Or alternatively just "cmd"

Re: [Spice-devel] [PATCH 06/18] Rename surface argument to surface_cmd

2016-09-27 Thread Christophe Fergeau
On Tue, Sep 27, 2016 at 06:42:24AM -0400, Frediano Ziglio wrote: > > > > On Mon, Sep 26, 2016 at 09:12:39AM +0100, Frediano Ziglio wrote: > > > Attempt to use consistent naming. > > > Usually we use surface name for RedSurface so make sure > > > code reader do not get confused using a different na

Re: [Spice-devel] [PATCH 09/18] Be consistent with opaque type

2016-09-27 Thread Christophe Fergeau
On Mon, Sep 26, 2016 at 09:12:42AM +0100, Frediano Ziglio wrote: > vdi_port_read_buf_release is registered passing data as > RedVDIReadBuf*, not RedPipeItem*. Cast opaque to proper > pointer type to avoid the assumption that first field of > RedVDIReadBuf is a RedPipeItem. Well, the idea is that V

Re: [Spice-devel] [PATCH 08/18] Add a comment for marshaller field

2016-09-27 Thread Christophe Fergeau
On Mon, Sep 26, 2016 at 09:12:41AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/red-channel-client-private.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/server/red-channel-client-private.h > b/server/red-channel-client-private.h > index 46d4fca..804

Re: [Spice-devel] [PATCH 11/18] Use mnemonic returning invalid value

2016-09-27 Thread Christophe Fergeau
Acked-by: Christophe Fergeau though I'd use enum value, named constant, ... in the log rather than mnemonic. On Mon, Sep 26, 2016 at 09:12:44AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/spice-bitmap-utils.c | 2 +- > 1 file changed, 1 insertion(+), 1 delet

Re: [Spice-devel] [PATCH 07/18] Rename red_surface to surface

2016-09-27 Thread Christophe Fergeau
Commit log could mention that this can now be used because of the previous commit which did s/surface/surface_cmd (but it's also ok unchanged). Acked-by: Christophe Fergeau On Mon, Sep 26, 2016 at 09:12:40AM +0100, Frediano Ziglio wrote: > Attempt to use consistent naming. > Usually we use surfa

[Spice-devel] [PATCH qxl-wddm-dod v5.1 1/7] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-27 Thread Frediano Ziglio
Disable execution bit on mapping improving security. MmMapIoSpaceEx is available only in Windows 10 thus the macros are used. Based on a patch by Sandy Stutsman Signed-off-by: Sameeh Jubran --- qxldod/QxlDod.cpp | 16 +++-- qxldod/compat.cpp | 52 ++

Re: [Spice-devel] [PATCH 08/18] Add a comment for marshaller field

2016-09-27 Thread Frediano Ziglio
> > On Mon, Sep 26, 2016 at 09:12:41AM +0100, Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio > > --- > > server/red-channel-client-private.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/server/red-channel-client-private.h > > b/server/red-channel-client-private.h >

Re: [Spice-devel] [PATCH 15/18] Avoid to call munmap with invalid size

2016-09-27 Thread Christophe Fergeau
On Mon, Sep 26, 2016 at 09:12:48AM +0100, Frediano Ziglio wrote: > This could have happened if mremap failed. If mremap fails, reds_stat will be set to MAP_FAILED, so munmap will not be called. Christophe > > Signed-off-by: Frediano Ziglio > --- > tools/reds_stat.c | 8 > 1 file cha

Re: [Spice-devel] [PATCH 09/18] Be consistent with opaque type

2016-09-27 Thread Frediano Ziglio
> > On Mon, Sep 26, 2016 at 09:12:42AM +0100, Frediano Ziglio wrote: > > vdi_port_read_buf_release is registered passing data as > > RedVDIReadBuf*, not RedPipeItem*. Cast opaque to proper > > pointer type to avoid the assumption that first field of > > RedVDIReadBuf is a RedPipeItem. > > Well, t

Re: [Spice-devel] [PATCH 06/18] Rename surface argument to surface_cmd

2016-09-27 Thread Frediano Ziglio
> > On Tue, Sep 27, 2016 at 06:42:24AM -0400, Frediano Ziglio wrote: > > > > > > On Mon, Sep 26, 2016 at 09:12:39AM +0100, Frediano Ziglio wrote: > > > > Attempt to use consistent naming. > > > > Usually we use surface name for RedSurface so make sure > > > > code reader do not get confused using

Re: [Spice-devel] [PATCH 03/18] Add small comment for detach_stream

2016-09-27 Thread Frediano Ziglio
> > On Mon, Sep 26, 2016 at 09:12:36AM +0100, Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio > > --- > > server/stream.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/server/stream.c b/server/stream.c > > index 9d878c8..95ff015 100644 > > --- a/server/stream.c > >

[Spice-devel] [PATCH] Rename detach_stream to stream_detach_drawable and removed unused argument

2016-09-27 Thread Frediano Ziglio
This function deal only with Stream. Also the name was misleading and was not clear if it detached the stream from the DisplayChannel. Signed-off-by: Frediano Ziglio --- server/display-channel.c | 2 +- server/stream.c | 14 +++--- server/stream.h | 2 +- 3 files chan

Re: [Spice-devel] [PATCH 13/18] Add reds_stat to compiled software

2016-09-27 Thread Christophe Fergeau
On Mon, Sep 26, 2016 at 09:12:46AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > Makefile.am | 2 +- > configure.ac | 1 + > tools/Makefile.am | 19 +++ > 3 files changed, 21 insertions(+), 1 deletion(-) > create mode 100644 tools/Makefile.am

Re: [Spice-devel] [PATCH 12/18] Remove warnings from reds_stat utility

2016-09-27 Thread Christophe Fergeau
On Mon, Sep 26, 2016 at 09:12:45AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > tools/reds_stat.c | 13 - > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/tools/reds_stat.c b/tools/reds_stat.c > index 5e9705c..07fd732 100644 > --- a/tools/r

Re: [Spice-devel] [PATCH 12/18] Remove warnings from reds_stat utility

2016-09-27 Thread Pavel Grunt
On Tue, 2016-09-27 at 14:49 +0200, Christophe Fergeau wrote: > On Mon, Sep 26, 2016 at 09:12:45AM +0100, Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio > > --- > >  tools/reds_stat.c | 13 - > >  1 file changed, 8 insertions(+), 5 deletions(-) > > > > diff --git a/tools/reds

Re: [Spice-devel] [PATCH 17/18] Removed only written roundtrip_stat field

2016-09-27 Thread Christophe Fergeau
On Mon, Sep 26, 2016 at 09:12:50AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/main-channel-client.c | 3 --- > server/reds-private.h| 1 - > server/reds.c| 13 - > server/stat.h| 1 - > 4 files changed, 18 d

Re: [Spice-devel] [PATCH 06/18] Rename surface argument to surface_cmd

2016-09-27 Thread Christophe Fergeau
On Tue, Sep 27, 2016 at 08:34:51AM -0400, Frediano Ziglio wrote: > > > > On Tue, Sep 27, 2016 at 06:42:24AM -0400, Frediano Ziglio wrote: > > > > > > > > On Mon, Sep 26, 2016 at 09:12:39AM +0100, Frediano Ziglio wrote: > > > > > Attempt to use consistent naming. > > > > > Usually we use surface n

Re: [Spice-devel] [PATCH 12/18] Remove warnings from reds_stat utility

2016-09-27 Thread Christophe Fergeau
On Tue, Sep 27, 2016 at 02:56:44PM +0200, Pavel Grunt wrote: > On Tue, 2016-09-27 at 14:49 +0200, Christophe Fergeau wrote: > > On Mon, Sep 26, 2016 at 09:12:45AM +0100, Frediano Ziglio wrote: > > >  while (1) { > > > -system("clear"); > > > +ignore_result(system("clear")); > >

Re: [Spice-devel] [PATCH 16/18] Removed unused stat field

2016-09-27 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Sep 26, 2016 at 09:12:49AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/cursor-channel.c | 4 > 1 file changed, 4 deletions(-) > > diff --git a/server/cursor-channel.c b/server/cursor-channel.c > index 05b8942..3e1e9f2

Re: [Spice-devel] [PATCH] Rename detach_stream to stream_detach_drawable and removed unused argument

2016-09-27 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Sep 27, 2016 at 01:42:04PM +0100, Frediano Ziglio wrote: > This function deal only with Stream. > Also the name was misleading and was not clear if it detached the stream > from the DisplayChannel. > > Signed-off-by: Frediano Ziglio > --- > server/display-

Re: [Spice-devel] [PATCH 12/18] Remove warnings from reds_stat utility

2016-09-27 Thread Frediano Ziglio
> > On Tue, Sep 27, 2016 at 02:56:44PM +0200, Pavel Grunt wrote: > > On Tue, 2016-09-27 at 14:49 +0200, Christophe Fergeau wrote: > > > On Mon, Sep 26, 2016 at 09:12:45AM +0100, Frediano Ziglio wrote: > > > >  while (1) { > > > > -system("clear"); > > > > +ignore_result(system(

[Spice-devel] [PATCH] Remove warnings from reds_stat utility

2016-09-27 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- tools/reds_stat.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/reds_stat.c b/tools/reds_stat.c index 9aca1ad..3e966d4 100644 --- a/tools/reds_stat.c +++ b/tools/reds_stat.c @@ -24,6 +24,7 @@ #include #include #includ

Re: [Spice-devel] [PATCH 15/18] Avoid to call munmap with invalid size

2016-09-27 Thread Frediano Ziglio
> > On Mon, Sep 26, 2016 at 09:12:48AM +0100, Frediano Ziglio wrote: > > This could have happened if mremap failed. > > If mremap fails, reds_stat will be set to MAP_FAILED, so munmap will > not be called. > > Christophe > You are right, dropped Frediano > > > > Signed-off-by: Frediano Zig

Re: [Spice-devel] [PATCH] SPICE port basic implementation

2016-09-27 Thread Oliver Gutierrez
Ok. Sending. On Mon, Sep 26, 2016 at 2:54 PM, Frediano Ziglio wrote: > > > > --- > > enums.js| 11 +++- > > main.js | 5 +++- > > port.js | 85 > > + > > spice.html | 50 +++--

[Spice-devel] [PATCH 1/2] Fixed trailing whitespaces in several files

2016-09-27 Thread Oliver Gutierrez
--- README | 4 ++-- TODO| 2 +- cursor.js | 2 +- display.js | 36 ++-- enums.js| 2 +- main.js | 2 +- playback.js | 2 +- simulatecursor.js | 6 +++--- spice.css |

[Spice-devel] [PATCH 2/2] SPICE port basic implementation

2016-09-27 Thread Oliver Gutierrez
--- enums.js| 9 ++ main.js | 3 ++ port.js | 85 + spice.html | 10 +++ spice_auto.html | 10 +++ spicemsg.js | 18 utils.js| 7 + 7 files changed, 142 insertions(+) c