qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] spice patch queue
@ 2014-09-02  8:59 Gerd Hoffmann
  2014-09-02  8:59 ` [Qemu-devel] [PULL 1/2] qxl-render: add more sanity checks Gerd Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2014-09-02  8:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Here comes the spice patch queue, pretty small this time, carrying an
additional qxl sanity check and a minor spice display channel tweak.

please pull,
  Gerd

The following changes since commit 8b3030114a449e66c68450acaac4b66f26d91416:

  Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140829' into staging (2014-08-29 15:48:15 +0100)

are available in the git repository at:


  git://anongit.freedesktop.org/spice/qemu tags/pull-spice-20140902-1

for you to fetch changes up to cd56cc6b079f44fbcca3d8a773ae87f7479c6585:

  spice: use console index as display id (2014-09-01 10:19:03 +0200)

----------------------------------------------------------------
sanity check for qxl, minor spice display channel tweak.

----------------------------------------------------------------
Gerd Hoffmann (2):
      qxl-render: add more sanity checks
      spice: use console index as display id

 hw/display/qxl-render.c | 4 +++-
 ui/spice-core.c         | 3 +--
 2 files changed, 4 insertions(+), 3 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 1/2] qxl-render: add more sanity checks
  2014-09-02  8:59 [Qemu-devel] [PULL 0/2] spice patch queue Gerd Hoffmann
@ 2014-09-02  8:59 ` Gerd Hoffmann
  2014-09-02  8:59 ` [Qemu-devel] [PULL 2/2] spice: use console index as display id Gerd Hoffmann
  2014-09-02 10:28 ` [Qemu-devel] [PULL 0/2] spice patch queue Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2014-09-02  8:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, qemu-stable

Damn, the dirty rectangle values are signed integers.  So the checks
added by commit 788fbf042fc6d5aaeab56757e6dad622ac5f0c21 are not good
enough, we also have to make sure they are not negative.

[ Note: There must be something broken in spice-server so we get
  negative values in the first place.  Bug opened:
  https://bugzilla.redhat.com/show_bug.cgi?id=1135372 ]

Cc: qemu-stable@nongnu.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 hw/display/qxl-render.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c
index cc2c2b1..bcc5c37 100644
--- a/hw/display/qxl-render.c
+++ b/hw/display/qxl-render.c
@@ -138,7 +138,9 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl)
         if (qemu_spice_rect_is_empty(qxl->dirty+i)) {
             break;
         }
-        if (qxl->dirty[i].left > qxl->dirty[i].right ||
+        if (qxl->dirty[i].left < 0 ||
+            qxl->dirty[i].top < 0 ||
+            qxl->dirty[i].left > qxl->dirty[i].right ||
             qxl->dirty[i].top > qxl->dirty[i].bottom ||
             qxl->dirty[i].right > qxl->guest_primary.surface.width ||
             qxl->dirty[i].bottom > qxl->guest_primary.surface.height) {
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 2/2] spice: use console index as display id
  2014-09-02  8:59 [Qemu-devel] [PULL 0/2] spice patch queue Gerd Hoffmann
  2014-09-02  8:59 ` [Qemu-devel] [PULL 1/2] qxl-render: add more sanity checks Gerd Hoffmann
@ 2014-09-02  8:59 ` Gerd Hoffmann
  2014-09-02 10:28 ` [Qemu-devel] [PULL 0/2] spice patch queue Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2014-09-02  8:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Anthony Liguori

... instead of maintaining our own numbering.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/spice-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ui/spice-core.c b/ui/spice-core.c
index 1a2fb4b..17a2ed3 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -853,7 +853,6 @@ int qemu_spice_add_interface(SpiceBaseInstance *sin)
 }
 
 static GSList *spice_consoles;
-static int display_id;
 
 bool qemu_spice_have_display_interface(QemuConsole *con)
 {
@@ -868,7 +867,7 @@ int qemu_spice_add_display_interface(QXLInstance *qxlin, QemuConsole *con)
     if (g_slist_find(spice_consoles, con)) {
         return -1;
     }
-    qxlin->id = display_id++;
+    qxlin->id = qemu_console_get_index(con);
     spice_consoles = g_slist_append(spice_consoles, con);
     return qemu_spice_add_interface(&qxlin->base);
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] spice patch queue
  2014-09-02  8:59 [Qemu-devel] [PULL 0/2] spice patch queue Gerd Hoffmann
  2014-09-02  8:59 ` [Qemu-devel] [PULL 1/2] qxl-render: add more sanity checks Gerd Hoffmann
  2014-09-02  8:59 ` [Qemu-devel] [PULL 2/2] spice: use console index as display id Gerd Hoffmann
@ 2014-09-02 10:28 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2014-09-02 10:28 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On 2 September 2014 09:59, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
> Here comes the spice patch queue, pretty small this time, carrying an
> additional qxl sanity check and a minor spice display channel tweak.
>
> please pull,
>   Gerd
>
> The following changes since commit 8b3030114a449e66c68450acaac4b66f26d91416:
>
>   Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140829' into staging (2014-08-29 15:48:15 +0100)
>
> are available in the git repository at:
>
>
>   git://anongit.freedesktop.org/spice/qemu tags/pull-spice-20140902-1
>
> for you to fetch changes up to cd56cc6b079f44fbcca3d8a773ae87f7479c6585:
>
>   spice: use console index as display id (2014-09-01 10:19:03 +0200)
>
> ----------------------------------------------------------------
> sanity check for qxl, minor spice display channel tweak.
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-02 10:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-02  8:59 [Qemu-devel] [PULL 0/2] spice patch queue Gerd Hoffmann
2014-09-02  8:59 ` [Qemu-devel] [PULL 1/2] qxl-render: add more sanity checks Gerd Hoffmann
2014-09-02  8:59 ` [Qemu-devel] [PULL 2/2] spice: use console index as display id Gerd Hoffmann
2014-09-02 10:28 ` [Qemu-devel] [PULL 0/2] spice patch queue Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).