Re: [Spice-devel] [PATCH spice-server] spicevmc: Fix g_object_new call for 32 bit machines

2019-09-24 Thread Victor Toso
On Tue, Sep 24, 2019 at 04:00:27PM +0100, Frediano Ziglio wrote: > "self-tokens" property is 64 bit and must be passed as 64 bit on > 32 bit machines to avoid memory corruptions. > This was introduced by 01de3b8922 ("spicevmc: Avoids DoS if > guest device is not able to get data faster enough"), de

[Spice-devel] [PATCH spice-server] spicevmc: Fix g_object_new call for 32 bit machines

2019-09-24 Thread Frediano Ziglio
"self-tokens" property is 64 bit and must be passed as 64 bit on 32 bit machines to avoid memory corruptions. This was introduced by 01de3b8922 ("spicevmc: Avoids DoS if guest device is not able to get data faster enough"), detected by CI. It caused this error (split into multiple lines): (./te

Re: [Spice-devel] [PATCH spice-gtk 2/2] gstreamer: add debug message for each element added to pipeline

2019-09-24 Thread Frediano Ziglio
> > Signed-off-by: Snir Sheriber > --- > > This helps to debug plugins load related issues Why this is not in the commit message? Which kind of issues (this too would be fine in the commit message) ? > --- > src/channel-display-gst.c | 4 > 1 file changed, 4 insertions(+) > > diff --git

Re: [Spice-devel] [PATCH spice-gtk 1/2] gstreamer: Use the element-setup signal instead of deep-element-added

2019-09-24 Thread Frediano Ziglio
> > Its functionally is equivalent to connecting to the deep-element-added > signal, but a bit more convenient > Why is more convenient? If we need "bin" in the future we won't have it. > Signed-off-by: Snir Sheriber > --- > src/channel-display-gst.c | 5 ++--- > 1 file changed, 2 insertions(

[Spice-devel] [PATCH spice-gtk 1/2] gstreamer: Use the element-setup signal instead of deep-element-added

2019-09-24 Thread Snir Sheriber
Its functionally is equivalent to connecting to the deep-element-added signal, but a bit more convenient Signed-off-by: Snir Sheriber --- src/channel-display-gst.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c index

[Spice-devel] [PATCH spice-gtk 2/2] gstreamer: add debug message for each element added to pipeline

2019-09-24 Thread Snir Sheriber
Signed-off-by: Snir Sheriber --- This helps to debug plugins load related issues --- src/channel-display-gst.c | 4 1 file changed, 4 insertions(+) diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c index 437328b..16bfa37 100644 --- a/src/channel-display-gst.c +++ b/src/cha

Re: [Spice-devel] [spice-gtk v1 1/6] Avoid accessing SpiceChannel's internals

2019-09-24 Thread Victor Toso
On Tue, Sep 24, 2019 at 06:27:55AM -0400, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > SpiceChannel provides some internal utility functions that this patch > > takes advantage of: > > > > * spice_channel_get_channel_type() > > * spice_channel_get_channel_id() > > * spice_channel_ge

[Spice-devel] [spice-gtk v2 1/6] Avoid accessing SpiceChannel's internals

2019-09-24 Thread Victor Toso
From: Victor Toso SpiceChannel provides some internal utility functions that this patch takes advantage of: * spice_channel_get_channel_type() * spice_channel_get_channel_id() * spice_channel_get_state() Signed-off-by: Victor Toso --- src/channel-inputs.c | 65 +---

Re: [Spice-devel] [PATCH spice-server 4/4] spicevmc: Avoids DoS if guest device is not able to get data faster enough

2019-09-24 Thread Victor Toso
Hi, On Mon, Jun 17, 2019 at 04:40:11PM +0100, Frediano Ziglio wrote: > This fix half (one direction) of > https://gitlab.freedesktop.org/spice/spice/issues/29. > Specifically if you have attempt to transfer a file from the client > using WebDAV. > Previously the queue to the device was unbound. If

Re: [Spice-devel] [PATCH spice-server v2 1/4] spicevmc: Do not use RedCharDevice pipe items handling

2019-09-24 Thread Victor Toso
Hi, On Tue, Sep 24, 2019 at 08:03:28AM -0400, Frediano Ziglio wrote: > > > > Hi, > > > > On Mon, Jun 17, 2019 at 04:40:08PM +0100, Frediano Ziglio wrote: > > > As we don't use any token there's no reason to not queue directly instead > > > of passing through RedCharDevice. > > > This will make e

Re: [Spice-devel] [PATCH spice-server v2 1/4] spicevmc: Do not use RedCharDevice pipe items handling

2019-09-24 Thread Frediano Ziglio
> > Hi, > > On Mon, Jun 17, 2019 at 04:40:08PM +0100, Frediano Ziglio wrote: > > As we don't use any token there's no reason to not queue directly instead > > of passing through RedCharDevice. > > This will make easier to limit the queue which currently is unlimited. > > > > RedCharDevice flow c

Re: [Spice-devel] [PATCH spice-server 2/4] spicevmc: Avoids DoS if client is not able to get data faster enough

2019-09-24 Thread Victor Toso
On Mon, Jun 17, 2019 at 04:40:09PM +0100, Frediano Ziglio wrote: > This fix half (one direction) of > https://gitlab.freedesktop.org/spice/spice/issues/29. > Specifically if you have attempt to transfer a file to the client > using WebDAV. > Previously the queue to the client was unbound. If client

Re: [Spice-devel] [PATCH spice-server v2 1/4] spicevmc: Do not use RedCharDevice pipe items handling

2019-09-24 Thread Victor Toso
Hi, On Mon, Jun 17, 2019 at 04:40:08PM +0100, Frediano Ziglio wrote: > As we don't use any token there's no reason to not queue directly instead > of passing through RedCharDevice. > This will make easier to limit the queue which currently is unlimited. > > RedCharDevice flow control has some pro

Re: [Spice-devel] Xorg indefinitely hangs in kernelspace

2019-09-24 Thread Jaak Ristioja
On 05.09.19 15:34, Jaak Ristioja wrote: > On 05.09.19 10:14, Gerd Hoffmann wrote: >> On Tue, Aug 06, 2019 at 09:00:10PM +0300, Jaak Ristioja wrote: >>> Hello! >>> >>> I'm writing to report a crash in the QXL / DRM code in the Linux kernel. >>> I originally filed the issue on LaunchPad and more deta

Re: [Spice-devel] [spice-gtk v1 1/6] Avoid accessing SpiceChannel's internals

2019-09-24 Thread Frediano Ziglio
> > From: Victor Toso > > SpiceChannel provides some internal utility functions that this patch > takes advantage of: > > * spice_channel_get_channel_type() > * spice_channel_get_channel_id() > * spice_channel_get_state() > > Signed-off-by: Victor Toso The question is also why all these file

Re: [Spice-devel] [spice-gtk v1 6/6] Introduce SpiceMainChannelMigration

2019-09-24 Thread Victor Toso
Hi, Sorry this commit log is actually horrible :) I'll try to fix a little bit below but I hope review can still be done on the overall idea. On Tue, Sep 24, 2019 at 11:15:02AM +0200, Victor Toso wrote: > From: Victor Toso > > The migration is a complicated feature where there the Virtual > Mac

[Spice-devel] [spice-gtk v1 1/6] Avoid accessing SpiceChannel's internals

2019-09-24 Thread Victor Toso
From: Victor Toso SpiceChannel provides some internal utility functions that this patch takes advantage of: * spice_channel_get_channel_type() * spice_channel_get_channel_id() * spice_channel_get_state() Signed-off-by: Victor Toso --- src/channel-inputs.c | 65 +---

[Spice-devel] [spice-gtk v1 2/6] spice-channel: add internal spice_channel_set_state()

2019-09-24 Thread Victor Toso
From: Victor Toso So we can easily track channel's state changes instead of doing so by accessing its Private structure. Some more checking on the state machine can be later added as well. Signed-off-by: Victor Toso --- src/channel-main.c | 8 src/spice-channel-priv.h | 1 + s

[Spice-devel] [spice-gtk v1 4/6] channel-main: remove redundant if on SpiceSession creation

2019-09-24 Thread Victor Toso
From: Victor Toso As spice_session_set_migration_session() does check with SPICE_IS_SESSION() and would log a critical in case it is NULL, which is better than just silent fail migration Signed-off-by: Victor Toso --- src/channel-main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-

[Spice-devel] [spice-gtk v1 5/6] channel-main: migration: set target session info early

2019-09-24 Thread Victor Toso
From: Victor Toso There is no need to wait till migrate_connect() being called to set information about target host. We create new SpiceSession and can set related info similar place. Moved to a utility function. This is a preparatory patch on refactoring migration code. Signed-off-by: Victor T

[Spice-devel] [spice-gtk v1 0/6] migration object

2019-09-24 Thread Victor Toso
From: Victor Toso Hi, This series goal is to reduce the work done in SpiceMainChannel around migration and move that to a new object, the SpiceMainChannelMigration. The intention is similar to what has been done for the file-transfer feature in the past, to make the role of each object more ass

[Spice-devel] [spice-gtk v1 3/6] usbredir: use g_object_get() for socket access

2019-09-24 Thread Victor Toso
From: Victor Toso Instead of accessing Private of SpiceChannel. Signed-off-by: Victor Toso --- src/channel-usbredir.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c index e407bac..fed9bd4 100644 --- a/src/channel-usb

[Spice-devel] [spice-gtk v1 6/6] Introduce SpiceMainChannelMigration

2019-09-24 Thread Victor Toso
From: Victor Toso The migration is a complicated feature where there the Virtual Machine is its connection details from its host, now to be called source-host, to a new host, now called target-host. For the client, the migration can happen in different ways as supported by spice-protocol. The fo