From fce154908482198f7f6d7048cf9f8cdf609b00ba Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 05 2015 13:13:11 +0000 Subject: import spice-0.12.4-9.el7 --- diff --git a/SOURCES/0020-Fix-crash-when-clearing-surface-memory.patch b/SOURCES/0020-Fix-crash-when-clearing-surface-memory.patch new file mode 100644 index 0000000..20d2102 --- /dev/null +++ b/SOURCES/0020-Fix-crash-when-clearing-surface-memory.patch @@ -0,0 +1,34 @@ +From 1898f3949cf75422aa1fedba40c429b28d8d6b67 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= +Date: Wed, 6 Aug 2014 18:34:56 +0200 +Subject: [PATCH spice] Fix crash when clearing surface memory + +The beginning of the surface data needs to be computed correctly if the +stride is negative, otherwise, it should point already to the beginning +of the surface data. This bug seems to exists since 4a208b (0.5.2) + +https://bugzilla.redhat.com/show_bug.cgi?id=1029646 +--- + server/red_worker.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/server/red_worker.c b/server/red_worker.c +index 6bdad93..35a1a04 100644 +--- a/server/red_worker.c ++++ b/server/red_worker.c +@@ -9470,7 +9470,11 @@ static inline void red_create_surface(RedWorker *worker, uint32_t surface_id, ui + surface->context.stride = stride; + surface->context.line_0 = line_0; + if (!data_is_valid) { +- memset((char *)line_0 + (int32_t)(stride * (height - 1)), 0, height*abs(stride)); ++ char *data = line_0; ++ if (stride < 0) { ++ data -= abs(stride) * (height - 1); ++ } ++ memset(data, 0, height*abs(stride)); + } + surface->create.info = NULL; + surface->destroy.info = NULL; +-- +1.9.3 + diff --git a/SOURCES/0020-migration-Don-t-assert-if-MIGRATE_DATA-comes-before-.patch b/SOURCES/0020-migration-Don-t-assert-if-MIGRATE_DATA-comes-before-.patch deleted file mode 100644 index 911e93d..0000000 --- a/SOURCES/0020-migration-Don-t-assert-if-MIGRATE_DATA-comes-before-.patch +++ /dev/null @@ -1,166 +0,0 @@ -From 8d0555da371d489ccb158b113493547bb1d585d6 Mon Sep 17 00:00:00 2001 -From: Uri Lublin -Date: Wed, 16 Jul 2014 17:02:04 +0300 -Subject: [PATCH] migration: Don't assert() if MIGRATE_DATA comes before - attaching the agent - -During seamless migration, after switching host, if a client was connected -during the migration, it will have data to send back to the new -qemu/spice-server instance. This is handled through MIGRATE_DATA messages. -SPICE char devices use such MIGRATE_DATA messages to restore their state. - -However, the MIGRATE_DATA message can arrive any time after the new qemu -instance has started, this can happen before or after the SPICE char -devices have been created. In order to handle this, if the migrate data -arrives early, it's stored in reds->agent_state.mig_data, and -attach_to_red_agent() will restore the agent state as appropriate. - -Unfortunately this does not work as expected, for main -channel (agent messages). -If attach_to_red_agent() is called before the MIGRATE_DATA -message reaches the server, all goes well, -but if MIGRATE_DATA reaches the server before -attach_to_red_agent() gets called, then some assert() gets -triggered in spice_char_device_state_restore(): - -((null):32507): Spice-ERROR **: char_device.c:937:spice_char_device_state_restore: assertion `dev->num_clients == 1 && dev->wait_for_migrate_data' failed -Thread 3 (Thread 0x7f406b543700 (LWP 32543)): -Thread 2 (Thread 0x7f40697ff700 (LWP 32586)): -Thread 1 (Thread 0x7f4079b45a40 (LWP 32507)): - -When restoring state, a client must already be added to the -spice-char-device. -What happens is that a client is not being added to the char-device -when when MIGRATE_DATA arrives first, which leaves both -dev->num_clients and dev->wait_for_migrate_data value at 0. - -This commit changes the logic in spice_server_char_device_add_interface(), -such that if there is migrate data pending in reds->agent_state.mig_data -but no client was added to the spice-char-device yet, -then first the client is added to the device by calling -spice_char_device_client_add(), and only then the state is restored. - -=== How to Reproduce -To reproduce, add delays to the migration connection between -qmeu-kvm on the source host (SRC) and on the destination (DST). - -Specifically I added a man in the middle DLY host between -migration ports from SRC to DST. - -+-----+ +-----+ +-----+ -| SRC |--> | DLY | --> | DST | -+-----+ +-----+ +-----+ - -DLY listens on port P1 (e.g. 4444) and DST listens on port -PINCOMING (e.g. 4444, from qemu-kvm '-incoming' command line option) - -Precondition: make sure port P1 on DLY is accessible in iptables. -Option 1: use ssh tcp port forwarding -On DLY host run ssh: - ssh DLY:P1:DST:PINCOMING DST -Then use the following migration command (on qemu-kvm monitor): - client_migrate_info spice DST PSPICE - migrate -d tcp:DLY:P1 - -Option 2: Use a simple proxy program that forwards -packets from SRC to DST while adding some delays. -The program runs on DLY, listens to port D1, upon -accept connects to DST:PINCOMING and forward all -packets from DLY:D1 to DST:PINCOMING. -Then use the same migrate command as in option 1: - client_migrate_info spice DST PSPICE - migrate -d tcp:DLY:P1 - -=== How to Reproduce Ends - -This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1035184 - -Based-on-a-patch-by: Christophe Fergeau -(cherry picked from commit 2d1c00a659cd1b3998f5d1f90fc5ee6abb7519bb) ---- - server/reds.c | 39 ++++++++++++++++++++++++++++----------- - 1 file changed, 28 insertions(+), 11 deletions(-) - -diff --git a/server/reds.c b/server/reds.c -index 7b7f262..8013fdf 100644 ---- a/server/reds.c -+++ b/server/reds.c -@@ -1373,6 +1373,7 @@ int reds_handle_migrate_data(MainChannelClient *mcc, SpiceMigrateDataMain *mig_d - { - VDIPortState *agent_state = &reds->agent_state; - -+ spice_debug("main-channel: got migrate data"); - /* - * Now that the client has switched to the target server, if main_channel - * controls the mm-time, we update the client's mm-time. -@@ -1394,15 +1395,18 @@ int reds_handle_migrate_data(MainChannelClient *mcc, SpiceMigrateDataMain *mig_d - main_channel_push_agent_disconnected(reds->main_channel); - main_channel_push_agent_connected(reds->main_channel); - } else { -+ spice_debug("restoring state from mig_data"); - return reds_agent_state_restore(mig_data); - } - } - } else { - /* restore agent starte when the agent gets attached */ -+ spice_debug("saving mig_data"); - spice_assert(agent_state->plug_generation == 0); - agent_state->mig_data = spice_memdup(mig_data, size); - } - } else { -+ spice_debug("agent was not attached on the source host"); - if (vdagent) { - /* spice_char_device_client_remove disables waiting for migration data */ - spice_char_device_client_remove(agent_state->base, -@@ -3588,17 +3592,15 @@ static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin) - state->read_filter.discard_all = FALSE; - reds->agent_state.plug_generation++; - -- if (reds->agent_state.mig_data) { -- spice_assert(reds->agent_state.plug_generation == 1); -- reds_agent_state_restore(reds->agent_state.mig_data); -- free(reds->agent_state.mig_data); -- reds->agent_state.mig_data = NULL; -- } else if (!red_channel_waits_for_migrate_data(&reds->main_channel->base)) { -- /* we will assoicate the client with the char device, upon reds_on_main_agent_start, -- * in response to MSGC_AGENT_START */ -- main_channel_push_agent_connected(reds->main_channel); -- } else { -- spice_debug("waiting for migration data"); -+ if (reds->agent_state.mig_data || -+ red_channel_waits_for_migrate_data(&reds->main_channel->base)) { -+ /* Migration in progress (code is running on the destination host): -+ * 1. Add the client to spice char device, if it was not already added. -+ * 2.a If this (qemu-kvm state load side of migration) happens first -+ * then wait for spice migration data to arrive. Otherwise -+ * 2.b If this happens second ==> we already have spice migrate data -+ * then restore state -+ */ - if (!spice_char_device_client_exists(reds->agent_state.base, reds_get_client())) { - int client_added; - -@@ -3614,9 +3616,24 @@ static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin) - spice_warning("failed to add client to agent"); - reds_disconnect(); - } -+ } - -+ if (reds->agent_state.mig_data) { -+ spice_debug("restoring state from stored migration data"); -+ spice_assert(reds->agent_state.plug_generation == 1); -+ reds_agent_state_restore(reds->agent_state.mig_data); -+ free(reds->agent_state.mig_data); -+ reds->agent_state.mig_data = NULL; - } -+ else { -+ spice_debug("waiting for migration data"); -+ } -+ } else { -+ /* we will associate the client with the char device, upon reds_on_main_agent_start, -+ * in response to MSGC_AGENT_START */ -+ main_channel_push_agent_connected(reds->main_channel); - } -+ - return state->base; - } - diff --git a/SOURCES/0021-Fix-assert-in-mjpeg_encoder_adjust_params_to_bit_rat.patch b/SOURCES/0021-Fix-assert-in-mjpeg_encoder_adjust_params_to_bit_rat.patch new file mode 100644 index 0000000..3aff4b9 --- /dev/null +++ b/SOURCES/0021-Fix-assert-in-mjpeg_encoder_adjust_params_to_bit_rat.patch @@ -0,0 +1,32 @@ +From 44944a574df0b6cbfd01b7ec8c55ce83e4b78156 Mon Sep 17 00:00:00 2001 +From: Jonathon Jongsma +Date: Fri, 30 May 2014 13:45:02 -0500 +Subject: [PATCH] Fix assert in mjpeg_encoder_adjust_params_to_bit_rate() + +If mjpeg_encoder_reset_quality() is called with the same quality as currently +set, it will not reset last_enc_size but not reset num_recent_enc_frames, +violating some assumptions in _adjust_params_to_bit_rate(). To avoid aborting +the server, simply return early from this function. + +Resolves: rhbz#1070028 +(cherry picked from commit 284cca2a5ebc98257275585083321a7100fb89b3) +--- + server/mjpeg_encoder.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c +index 04b244e..223fe64 100644 +--- a/server/mjpeg_encoder.c ++++ b/server/mjpeg_encoder.c +@@ -624,7 +624,10 @@ static void mjpeg_encoder_adjust_params_to_bit_rate(MJpegEncoder *encoder) + return; + } + +- spice_assert(rate_control->num_recent_enc_frames); ++ if (!rate_control->num_recent_enc_frames) { ++ spice_debug("No recent encoded frames"); ++ return; ++ } + + if (rate_control->num_recent_enc_frames < MJPEG_AVERAGE_SIZE_WINDOW && + rate_control->num_recent_enc_frames < rate_control->fps) { diff --git a/SOURCES/0022-reds-lookup-corresponding-channel-id.patch b/SOURCES/0022-reds-lookup-corresponding-channel-id.patch new file mode 100644 index 0000000..e2c092d --- /dev/null +++ b/SOURCES/0022-reds-lookup-corresponding-channel-id.patch @@ -0,0 +1,32 @@ +From 6be22cda720b42feb7760ebddb68e4cee96f259a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= +Date: Mon, 18 Nov 2013 11:28:25 +0100 +Subject: [PATCH] reds: lookup corresponding channel id + +In reds_send_link_ack(), lookup the channel with the same id as the link +message. + +The bug was found during code review a while ago. + +A reproducer bug was later reported: +https://bugzilla.redhat.com/show_bug.cgi?id=1058625 + +(cherry picked from commit a434543eb1243db1e52ca6a4e0cdfb425c277e56) +--- + server/reds.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/server/reds.c b/server/reds.c +index 7b7f262..464552a 100644 +--- a/server/reds.c ++++ b/server/reds.c +@@ -1459,7 +1459,8 @@ static int reds_send_link_ack(RedLinkInfo *link) + + ack.error = SPICE_LINK_ERR_OK; + +- channel = reds_find_channel(link->link_mess->channel_type, 0); ++ channel = reds_find_channel(link->link_mess->channel_type, ++ link->link_mess->channel_id); + if (!channel) { + spice_assert(link->link_mess->channel_type == SPICE_CHANNEL_MAIN); + spice_assert(reds->main_channel); diff --git a/SOURCES/0023-dispatcher-lower-a-monitor-config-warning-to-a-debug.patch b/SOURCES/0023-dispatcher-lower-a-monitor-config-warning-to-a-debug.patch new file mode 100644 index 0000000..0de2a85 --- /dev/null +++ b/SOURCES/0023-dispatcher-lower-a-monitor-config-warning-to-a-debug.patch @@ -0,0 +1,30 @@ +From 88f46c8de8d42c4e364169f59cd9bd64b1954bd4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= +Date: Fri, 29 Aug 2014 13:14:08 +0200 +Subject: [PATCH] dispatcher: lower a monitor-config warning to a debug level + +Some QXLInterface implementations might not have or succeed +with client_monitors_config(). Thus, lower warning to debug +level. + +https://bugzilla.redhat.com/show_bug.cgi?id=1119220 +(cherry picked from commit 5972452b287a7b1831411595896e69db2ea991ac) +--- + server/red_dispatcher.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c +index ef47c28..2ebde63 100644 +--- a/server/red_dispatcher.c ++++ b/server/red_dispatcher.c +@@ -330,8 +330,8 @@ void red_dispatcher_client_monitors_config(VDAgentMonitorsConfig *monitors_confi + if (!now->qxl->st->qif->client_monitors_config || + !now->qxl->st->qif->client_monitors_config(now->qxl, + monitors_config)) { +- spice_warning("spice bug: QXLInterface::client_monitors_config" +- " failed/missing unexpectedly\n"); ++ /* this is a normal condition, some qemu devices might not implement it */ ++ spice_debug("QXLInterface::client_monitors_config failed\n"); + } + now = now->next; + } diff --git a/SOURCES/0024-mjpeg-Don-t-warn-on-unsupported-image-formats.patch b/SOURCES/0024-mjpeg-Don-t-warn-on-unsupported-image-formats.patch new file mode 100644 index 0000000..3cb811c --- /dev/null +++ b/SOURCES/0024-mjpeg-Don-t-warn-on-unsupported-image-formats.patch @@ -0,0 +1,33 @@ +From 64b5ae4531fb64595b9f23500ded79c3ce0bde9f Mon Sep 17 00:00:00 2001 +From: Christophe Fergeau +Date: Wed, 26 Feb 2014 15:40:55 +0100 +Subject: [PATCH] mjpeg: Don't warn on unsupported image formats + +When trying to start mjpeg compression mode, mjpeg_encoder_start_frame() +tests the image format as its only able to compress 24/32bpp images. On +images with lower bit depths, we return MJPEG_ENCODER_FRAME_UNSUPPORTED to +indicate this is not a format we can compress. However, this return goes +with a spice_warning("unsupported format"). As the rest of the code can +cope with this unsupported format by not doing mjpeg compression, it's +nicer to downgrade this spice_warning() to spice_debug(). + +This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1070028 + +(cherry picked from commit 67be56ad8a6b10a5307939a700115d6be3fb8433) +--- + server/mjpeg_encoder.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c +index 223fe64..ea9f3af 100644 +--- a/server/mjpeg_encoder.c ++++ b/server/mjpeg_encoder.c +@@ -799,7 +799,7 @@ int mjpeg_encoder_start_frame(MJpegEncoder *encoder, SpiceBitmapFmt format, + #endif + break; + default: +- spice_warning("unsupported format %d", format); ++ spice_debug("unsupported format %d", format); + return MJPEG_ENCODER_FRAME_UNSUPPORTED; + } + diff --git a/SOURCES/0025-server-Don-t-dump-the-bitmap-when-the-format-is-inva.patch b/SOURCES/0025-server-Don-t-dump-the-bitmap-when-the-format-is-inva.patch new file mode 100644 index 0000000..94206a7 --- /dev/null +++ b/SOURCES/0025-server-Don-t-dump-the-bitmap-when-the-format-is-inva.patch @@ -0,0 +1,27 @@ +From 987f7fdd952d8ba481df4d39bc87aaaa8fd77b90 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= +Date: Mon, 1 Sep 2014 00:38:36 +0200 +Subject: [PATCH] server: Don't dump the bitmap when the format is invalid + +Caught by covscan: +spice/server/spice_bitmap_utils.c:54: var_decl: Declaring variable "n_pixel_bits" without initializer. +spice/server/spice_bitmap_utils.c:106: uninit_use: Using uninitialized value "n_pixel_bits". + +Resolves: rhbz#885717 +(cherry picked from commit 94edda22553ba351c869b58cd984a79cfc6c2180) +--- + server/red_worker.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/server/red_worker.c b/server/red_worker.c +index d7962c5..945f4f1 100644 +--- a/server/red_worker.c ++++ b/server/red_worker.c +@@ -12296,6 +12296,7 @@ static void dump_bitmap(RedWorker *worker, SpiceBitmap *bitmap, uint32_t group_i + break; + default: + spice_error("invalid bitmap format %u", bitmap->format); ++ return; + } + + if (!rgb) { diff --git a/SOURCES/0026-Fix-Wunused-parameter.patch b/SOURCES/0026-Fix-Wunused-parameter.patch new file mode 100644 index 0000000..baeecea --- /dev/null +++ b/SOURCES/0026-Fix-Wunused-parameter.patch @@ -0,0 +1,327 @@ +From 19a48c295bb2e0cb546a4cd9ad8582c4ab26c7d4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= +Date: Mon, 1 Sep 2014 13:24:55 +0200 +Subject: [PATCH] Fix -Wunused-parameter + +(cherry picked from commit 5ea7de3bccafa21963548abcb5b7061de4c59910) +--- + server/tests/test_display_base.c | 37 +++++++++++++++++--------- + server/tests/test_display_base.h | 1 + + server/tests/test_display_no_ssl.c | 2 +- + server/tests/test_display_resolution_changes.c | 3 ++- + server/tests/test_display_width_stride.c | 9 ++++--- + server/tests/test_empty_success.c | 24 +++++++++++------ + server/tests/test_playback.c | 2 +- + server/tests/test_vdagent.c | 13 ++++++--- + 8 files changed, 60 insertions(+), 31 deletions(-) + +diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c +index 20c0e47..602691b 100644 +--- a/server/tests/test_display_base.c ++++ b/server/tests/test_display_base.c +@@ -64,7 +64,7 @@ static int rects = 16; //number of rects that will be draw + static int has_automated_tests = 0; //automated test flag + + __attribute__((noreturn)) +-static void sigchld_handler(int signal_num) // wait for the child process and exit ++static void sigchld_handler(SPICE_GNUC_UNUSED int signal_num) // wait for the child process and exit + { + int status; + wait(&status); +@@ -412,19 +412,22 @@ static void attache_worker(QXLInstance *qin, QXLWorker *_qxl_worker) + test->qxl_worker->start(test->qxl_worker); + } + +-static void set_compression_level(QXLInstance *qin, int level) ++static void set_compression_level(SPICE_GNUC_UNUSED QXLInstance *qin, ++ SPICE_GNUC_UNUSED int level) + { + printf("%s\n", __func__); + } + +-static void set_mm_time(QXLInstance *qin, uint32_t mm_time) ++static void set_mm_time(SPICE_GNUC_UNUSED QXLInstance *qin, ++ SPICE_GNUC_UNUSED uint32_t mm_time) + { + } + + // we now have a secondary surface + #define MAX_SURFACE_NUM 2 + +-static void get_init_info(QXLInstance *qin, QXLDevInitInfo *info) ++static void get_init_info(SPICE_GNUC_UNUSED QXLInstance *qin, ++ QXLDevInitInfo *info) + { + memset(info, 0, sizeof(*info)); + info->num_memslots = 1; +@@ -467,7 +470,8 @@ static int get_num_commands(void) + } + + // called from spice_server thread (i.e. red_worker thread) +-static int get_command(QXLInstance *qin, struct QXLCommandExt *ext) ++static int get_command(SPICE_GNUC_UNUSED QXLInstance *qin, ++ struct QXLCommandExt *ext) + { + if (get_num_commands() == 0) { + return FALSE; +@@ -617,7 +621,8 @@ static void do_wakeup(void *opaque) + test->qxl_worker->wakeup(test->qxl_worker); + } + +-static void release_resource(QXLInstance *qin, struct QXLReleaseInfoExt release_info) ++static void release_resource(SPICE_GNUC_UNUSED QXLInstance *qin, ++ struct QXLReleaseInfoExt release_info) + { + QXLCommandExt *ext = (QXLCommandExt*)(unsigned long)release_info.info->id; + //printf("%s\n", __func__); +@@ -713,24 +718,25 @@ static int get_cursor_command(QXLInstance *qin, struct QXLCommandExt *ext) + return TRUE; + } + +-static int req_cursor_notification(QXLInstance *qin) ++static int req_cursor_notification(SPICE_GNUC_UNUSED QXLInstance *qin) + { + printf("%s\n", __func__); + return TRUE; + } + +-static void notify_update(QXLInstance *qin, uint32_t update_id) ++static void notify_update(SPICE_GNUC_UNUSED QXLInstance *qin, ++ SPICE_GNUC_UNUSED uint32_t update_id) + { + printf("%s\n", __func__); + } + +-static int flush_resources(QXLInstance *qin) ++static int flush_resources(SPICE_GNUC_UNUSED QXLInstance *qin) + { + printf("%s\n", __func__); + return TRUE; + } + +-static int client_monitors_config(QXLInstance *qin, ++static int client_monitors_config(SPICE_GNUC_UNUSED QXLInstance *qin, + VDAgentMonitorsConfig *monitors_config) + { + if (!monitors_config) { +@@ -786,19 +792,24 @@ void test_add_display_interface(Test* test) + spice_server_add_interface(test->server, &test->qxl_instance.base); + } + +-static int vmc_write(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len) ++static int vmc_write(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, ++ SPICE_GNUC_UNUSED const uint8_t *buf, ++ int len) + { + printf("%s: %d\n", __func__, len); + return len; + } + +-static int vmc_read(SpiceCharDeviceInstance *sin, uint8_t *buf, int len) ++static int vmc_read(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, ++ SPICE_GNUC_UNUSED uint8_t *buf, ++ int len) + { + printf("%s: %d\n", __func__, len); + return 0; + } + +-static void vmc_state(SpiceCharDeviceInstance *sin, int connected) ++static void vmc_state(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, ++ int connected) + { + printf("%s: %d\n", __func__, connected); + } +diff --git a/server/tests/test_display_base.h b/server/tests/test_display_base.h +index d2823a7..0a58186 100644 +--- a/server/tests/test_display_base.h ++++ b/server/tests/test_display_base.h +@@ -2,6 +2,7 @@ + #define __TEST_DISPLAY_BASE_H__ + + #include ++#include + #include "basic_event_loop.h" + + #define COUNT(x) ((sizeof(x)/sizeof(x[0]))) +diff --git a/server/tests/test_display_no_ssl.c b/server/tests/test_display_no_ssl.c +index 83ab3dc..89b4796 100644 +--- a/server/tests/test_display_no_ssl.c ++++ b/server/tests/test_display_no_ssl.c +@@ -17,7 +17,7 @@ void show_channels(SpiceServer *server); + + int ping_ms = 100; + +-void pinger(void *opaque) ++void pinger(SPICE_GNUC_UNUSED void *opaque) + { + // show_channels is not thread safe - fails if disconnections / connections occur + //show_channels(server); +diff --git a/server/tests/test_display_resolution_changes.c b/server/tests/test_display_resolution_changes.c +index 4767ea9..c492653 100644 +--- a/server/tests/test_display_resolution_changes.c ++++ b/server/tests/test_display_resolution_changes.c +@@ -22,7 +22,8 @@ void pinger(void *opaque) + test->core->timer_start(ping_timer, ping_ms); + } + +-void set_primary_params(Test *test, Command *command) ++void set_primary_params(SPICE_GNUC_UNUSED Test *test, ++ Command *command) + { + #if 0 + static int toggle = 0; +diff --git a/server/tests/test_display_width_stride.c b/server/tests/test_display_width_stride.c +index f938373..a071e74 100644 +--- a/server/tests/test_display_width_stride.c ++++ b/server/tests/test_display_width_stride.c +@@ -25,7 +25,8 @@ void pinger(void *opaque) + static int g_surface_id = 1; + static uint8_t *g_surface_data; + +-void set_draw_parameters(Test *test, Command *command) ++void set_draw_parameters(SPICE_GNUC_UNUSED Test *test, ++ Command *command) + { + static int count = 17; + CommandDrawSolid *solid = &command->solid; +@@ -38,7 +39,8 @@ void set_draw_parameters(Test *test, Command *command) + count++; + } + +-void set_surface_params(Test *test, Command *command) ++void set_surface_params(SPICE_GNUC_UNUSED Test *test, ++ Command *command) + { + CommandCreateSurface *create = &command->create_surface; + +@@ -54,7 +56,8 @@ void set_surface_params(Test *test, Command *command) + create->data = g_surface_data; + } + +-void set_destroy_parameters(Test *test, Command *command) ++void set_destroy_parameters(SPICE_GNUC_UNUSED Test *test, ++ SPICE_GNUC_UNUSED Command *command) + { + if (g_surface_data) { + free(g_surface_data); +diff --git a/server/tests/test_empty_success.c b/server/tests/test_empty_success.c +index 0176a52..6a3bb55 100644 +--- a/server/tests/test_empty_success.c ++++ b/server/tests/test_empty_success.c +@@ -3,44 +3,52 @@ + #include + + #include ++#include + + struct SpiceTimer { + int a,b; + }; + +-SpiceTimer* timer_add(SpiceTimerFunc func, void *opaque) ++SpiceTimer* timer_add(SPICE_GNUC_UNUSED SpiceTimerFunc func, ++ SPICE_GNUC_UNUSED void *opaque) + { + static struct SpiceTimer t = {0,}; + + return &t; + } + +-void timer_start(SpiceTimer *timer, uint32_t ms) ++void timer_start(SPICE_GNUC_UNUSED SpiceTimer *timer, ++ SPICE_GNUC_UNUSED uint32_t ms) + { + } + +-void timer_cancel(SpiceTimer *timer) ++void timer_cancel(SPICE_GNUC_UNUSED SpiceTimer *timer) + { + } + +-void timer_remove(SpiceTimer *timer) ++void timer_remove(SPICE_GNUC_UNUSED SpiceTimer *timer) + { + } + +-SpiceWatch *watch_add(int fd, int event_mask, SpiceWatchFunc func, void *opaque) ++SpiceWatch *watch_add(SPICE_GNUC_UNUSED int fd, ++ SPICE_GNUC_UNUSED int event_mask, ++ SPICE_GNUC_UNUSED SpiceWatchFunc func, ++ SPICE_GNUC_UNUSED void *opaque) + { + return NULL; + } + +-void watch_update_mask(SpiceWatch *watch, int event_mask) ++void watch_update_mask(SPICE_GNUC_UNUSED SpiceWatch *watch, ++ SPICE_GNUC_UNUSED int event_mask) + { + } + +-void watch_remove(SpiceWatch *watch) ++void watch_remove(SPICE_GNUC_UNUSED SpiceWatch *watch) + { + } + +-void channel_event(int event, SpiceChannelEventInfo *info) ++void channel_event(SPICE_GNUC_UNUSED int event, ++ SPICE_GNUC_UNUSED SpiceChannelEventInfo *info) + { + } + +diff --git a/server/tests/test_playback.c b/server/tests/test_playback.c +index ed1b766..1e82c43 100644 +--- a/server/tests/test_playback.c ++++ b/server/tests/test_playback.c +@@ -45,7 +45,7 @@ static void get_frame(void) + : 100; + } + +-void playback_timer_cb(void *opaque) ++void playback_timer_cb(SPICE_GNUC_UNUSED void *opaque) + { + static int t = 0; + static uint64_t last_sent_usec = 0; +diff --git a/server/tests/test_vdagent.c b/server/tests/test_vdagent.c +index af33145..7a56c2a 100644 +--- a/server/tests/test_vdagent.c ++++ b/server/tests/test_vdagent.c +@@ -20,7 +20,7 @@ int ping_ms = 100; + #define MIN(a, b) ((a) > (b) ? (b) : (a)) + #endif + +-void pinger(void *opaque) ++void pinger(SPICE_GNUC_UNUSED void *opaque) + { + // show_channels is not thread safe - fails if disconnections / connections occur + //show_channels(server); +@@ -29,12 +29,16 @@ void pinger(void *opaque) + } + + +-static int vmc_write(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len) ++static int vmc_write(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, ++ SPICE_GNUC_UNUSED const uint8_t *buf, ++ int len) + { + return len; + } + +-static int vmc_read(SpiceCharDeviceInstance *sin, uint8_t *buf, int len) ++static int vmc_read(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, ++ uint8_t *buf, ++ int len) + { + static uint8_t c = 0; + static uint8_t message[2048]; +@@ -70,7 +74,8 @@ static int vmc_read(SpiceCharDeviceInstance *sin, uint8_t *buf, int len) + return ret; + } + +-static void vmc_state(SpiceCharDeviceInstance *sin, int connected) ++static void vmc_state(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, ++ SPICE_GNUC_UNUSED int connected) + { + } + diff --git a/SOURCES/0027-Fix-Wunused-value.patch b/SOURCES/0027-Fix-Wunused-value.patch new file mode 100644 index 0000000..0b647ab --- /dev/null +++ b/SOURCES/0027-Fix-Wunused-value.patch @@ -0,0 +1,23 @@ +From 267d95198b1672f7aac49b607db99d7727f2094b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= +Date: Mon, 1 Sep 2014 13:34:42 +0200 +Subject: [PATCH] Fix -Wunused-value + +(cherry picked from commit 79e5a52d0553b07c0e8ca5a894c5d371a07a8964) +--- + server/tests/test_display_streaming.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/server/tests/test_display_streaming.c b/server/tests/test_display_streaming.c +index b66d870..b8bdf52 100644 +--- a/server/tests/test_display_streaming.c ++++ b/server/tests/test_display_streaming.c +@@ -103,7 +103,7 @@ static void create_clipped_frame(Test *test, Command *command, int clipping_fact + cmd->bitmap = malloc(width*height*4); + memset(cmd->bitmap, 0xff, width*height*4); + dst = (uint32_t *)(cmd->bitmap + cur_line*width*4); +- for (cur_line; cur_line < end_line; cur_line++) { ++ for (; cur_line < end_line; cur_line++) { + int col; + for (col = 0; col < width; col++, dst++) { + *dst = 0x00FF00; diff --git a/SOURCES/0028-Fix-Wsign.patch b/SOURCES/0028-Fix-Wsign.patch new file mode 100644 index 0000000..75ec46f --- /dev/null +++ b/SOURCES/0028-Fix-Wsign.patch @@ -0,0 +1,46 @@ +From a40ecb73678a1d35348c19c7ba8a69b987b410e4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= +Date: Mon, 1 Sep 2014 13:42:48 +0200 +Subject: [PATCH] Fix -Wsign + +(cherry picked from commit 08b3e1d8f187fb371d9ade2f69670378e3e409f5) +--- + server/tests/test_display_base.c | 4 ++-- + server/tests/test_playback.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c +index 602691b..6765a07 100644 +--- a/server/tests/test_display_base.c ++++ b/server/tests/test_display_base.c +@@ -215,7 +215,7 @@ static SimpleSpiceUpdate *test_spice_create_update_solid(uint32_t surface_id, QX + uint32_t *dst; + uint32_t bw; + uint32_t bh; +- int i; ++ uint32_t i; + + bw = bbox.right - bbox.left; + bh = bbox.bottom - bbox.top; +@@ -451,7 +451,7 @@ struct QXLCommandExt* commands[1024]; + + static void push_command(QXLCommandExt *ext) + { +- ASSERT(commands_end - commands_start < COMMANDS_SIZE); ++ ASSERT(commands_end - commands_start < (int) COMMANDS_SIZE); + commands[commands_end % COMMANDS_SIZE] = ext; + commands_end++; + } +diff --git a/server/tests/test_playback.c b/server/tests/test_playback.c +index 1e82c43..f712f7b 100644 +--- a/server/tests/test_playback.c ++++ b/server/tests/test_playback.c +@@ -50,7 +50,7 @@ void playback_timer_cb(SPICE_GNUC_UNUSED void *opaque) + static int t = 0; + static uint64_t last_sent_usec = 0; + static uint64_t samples_to_send; +- int i; ++ uint32_t i; + struct timeval cur; + uint64_t cur_usec; + uint32_t *test_frame; diff --git a/SOURCES/0029-Fix-Wswitch.patch b/SOURCES/0029-Fix-Wswitch.patch new file mode 100644 index 0000000..056468d --- /dev/null +++ b/SOURCES/0029-Fix-Wswitch.patch @@ -0,0 +1,23 @@ +From 7187bf54171f8f9b80acbb19ff2237e2ffaa997a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= +Date: Mon, 1 Sep 2014 13:45:49 +0200 +Subject: [PATCH] Fix -Wswitch + +(cherry picked from commit 4bf5fd35c4ece8a9100e5cec18b4b75fbaf82d35) +--- + server/tests/test_display_base.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c +index 6765a07..1125b56 100644 +--- a/server/tests/test_display_base.c ++++ b/server/tests/test_display_base.c +@@ -552,6 +552,8 @@ static void produce_command(Test *test) + update = test_spice_create_update_solid(command->solid.surface_id, + command->solid.bbox, command->solid.color); + break; ++ default: /* Just to shut up GCC warning (-Wswitch) */ ++ break; + } + push_command(&update->ext); + break; diff --git a/SOURCES/0030-Fix-Wformat.patch b/SOURCES/0030-Fix-Wformat.patch new file mode 100644 index 0000000..dcbb19d --- /dev/null +++ b/SOURCES/0030-Fix-Wformat.patch @@ -0,0 +1,23 @@ +From b66767e3d0ac1bab80b7bbca3d75728188bab7b5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= +Date: Mon, 1 Sep 2014 13:52:16 +0200 +Subject: [PATCH] Fix -Wformat + +(cherry picked from commit 63180f6ce3266d3b9b6c7319a0aec1f0d4ee7fe3) +--- + server/tests/basic_event_loop.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/server/tests/basic_event_loop.c b/server/tests/basic_event_loop.c +index c6f6698..79a4523 100644 +--- a/server/tests/basic_event_loop.c ++++ b/server/tests/basic_event_loop.c +@@ -115,7 +115,7 @@ static void watch_remove(SpiceWatch *watch) + + static void channel_event(int event, SpiceChannelEventInfo *info) + { +- DPRINTF(0, "channel event con, type, id, event: %ld, %d, %d, %d", ++ DPRINTF(0, "channel event con, type, id, event: %d, %d, %d, %d", + info->connection_id, info->type, info->id, event); + } + diff --git a/SOURCES/0031-Fix-Wnonnull.patch b/SOURCES/0031-Fix-Wnonnull.patch new file mode 100644 index 0000000..9d0acaa --- /dev/null +++ b/SOURCES/0031-Fix-Wnonnull.patch @@ -0,0 +1,27 @@ +From fa6453dd041eb414d7aec38d2706d68317b94130 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= +Date: Mon, 1 Sep 2014 13:55:56 +0200 +Subject: [PATCH] Fix -Wnonnull + +(cherry picked from commit fb938c210ac507acb747c4c5126db7e6b12889fa) +--- + server/tests/test_display_base.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c +index 1125b56..01eaf9f 100644 +--- a/server/tests/test_display_base.c ++++ b/server/tests/test_display_base.c +@@ -88,10 +88,11 @@ static void regression_test(void) + pid = fork(); + if (pid == 0) { + char buf[PATH_MAX]; ++ char *argv[] = { NULL }; + char *envp[] = {buf, NULL}; + + snprintf(buf, sizeof(buf), "PATH=%s", getenv("PATH")); +- execve("regression_test.py", NULL, envp); ++ execve("regression_test.py", argv, envp); + } else if (pid > 0) { + return; + } diff --git a/SOURCES/0032-Fix-Wmissing-field-initializers.patch b/SOURCES/0032-Fix-Wmissing-field-initializers.patch new file mode 100644 index 0000000..04f8a9f --- /dev/null +++ b/SOURCES/0032-Fix-Wmissing-field-initializers.patch @@ -0,0 +1,155 @@ +From 51d0a8d322b5c380a01df4776e55fae580dda3af Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= +Date: Mon, 1 Sep 2014 14:19:52 +0200 +Subject: [PATCH] Fix -Wmissing-field-initializers + +(cherry picked from commit b76e561d82796bd2bccc57be962fc5fba0141da6) +--- + server/tests/test_display_base.c | 15 ++++++--------- + server/tests/test_display_resolution_changes.c | 4 ++-- + server/tests/test_display_width_stride.c | 22 +++++++++++----------- + server/tests/test_playback.c | 12 ++++++------ + server/tests/test_vdagent.c | 15 ++++++--------- + 5 files changed, 31 insertions(+), 37 deletions(-) + +diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c +index 01eaf9f..bfe9991 100644 +--- a/server/tests/test_display_base.c ++++ b/server/tests/test_display_base.c +@@ -817,19 +817,16 @@ static void vmc_state(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, + printf("%s: %d\n", __func__, connected); + } + +-static SpiceCharDeviceInterface vdagent_sif = { +- .base.type = SPICE_INTERFACE_CHAR_DEVICE, +- .base.description = "test spice virtual channel char device", +- .base.major_version = SPICE_INTERFACE_CHAR_DEVICE_MAJOR, +- .base.minor_version = SPICE_INTERFACE_CHAR_DEVICE_MINOR, +- .state = vmc_state, +- .write = vmc_write, +- .read = vmc_read, ++static SpiceBaseInterface base = { ++ .type = SPICE_INTERFACE_CHAR_DEVICE, ++ .description = "test spice virtual channel char device", ++ .major_version = SPICE_INTERFACE_CHAR_DEVICE_MAJOR, ++ .minor_version = SPICE_INTERFACE_CHAR_DEVICE_MINOR, + }; + + SpiceCharDeviceInstance vdagent_sin = { + .base = { +- .sif = &vdagent_sif.base, ++ .sif = &base, + }, + .subtype = "vdagent", + }; +diff --git a/server/tests/test_display_resolution_changes.c b/server/tests/test_display_resolution_changes.c +index c492653..e351e99 100644 +--- a/server/tests/test_display_resolution_changes.c ++++ b/server/tests/test_display_resolution_changes.c +@@ -45,8 +45,8 @@ void set_primary_params(SPICE_GNUC_UNUSED Test *test, + } + + static Command commands[] = { +- {DESTROY_PRIMARY, NULL}, +- {CREATE_PRIMARY, set_primary_params}, ++ {DESTROY_PRIMARY, NULL, .cb_opaque = NULL,}, ++ {CREATE_PRIMARY, set_primary_params, .cb_opaque = NULL}, + }; + + int main(void) +diff --git a/server/tests/test_display_width_stride.c b/server/tests/test_display_width_stride.c +index a071e74..77d3c12 100644 +--- a/server/tests/test_display_width_stride.c ++++ b/server/tests/test_display_width_stride.c +@@ -66,17 +66,17 @@ void set_destroy_parameters(SPICE_GNUC_UNUSED Test *test, + } + + static Command commands[] = { +- {SIMPLE_CREATE_SURFACE, set_surface_params}, +- {SIMPLE_DRAW_SOLID, set_draw_parameters}, +- {SIMPLE_DRAW_SOLID, set_draw_parameters}, +- {SIMPLE_DRAW_SOLID, set_draw_parameters}, +- {SIMPLE_DRAW_SOLID, set_draw_parameters}, +- {SIMPLE_DRAW_SOLID, set_draw_parameters}, +- {SIMPLE_DRAW_SOLID, set_draw_parameters}, +- {SIMPLE_DRAW_SOLID, set_draw_parameters}, +- {SIMPLE_DRAW_SOLID, set_draw_parameters}, +- {SIMPLE_DRAW_SOLID, set_draw_parameters}, +- {SIMPLE_DESTROY_SURFACE, set_destroy_parameters}, ++ {SIMPLE_CREATE_SURFACE, set_surface_params, .cb_opaque = NULL}, ++ {SIMPLE_DRAW_SOLID, set_draw_parameters, .cb_opaque = NULL}, ++ {SIMPLE_DRAW_SOLID, set_draw_parameters, .cb_opaque = NULL}, ++ {SIMPLE_DRAW_SOLID, set_draw_parameters, .cb_opaque = NULL}, ++ {SIMPLE_DRAW_SOLID, set_draw_parameters, .cb_opaque = NULL}, ++ {SIMPLE_DRAW_SOLID, set_draw_parameters, .cb_opaque = NULL}, ++ {SIMPLE_DRAW_SOLID, set_draw_parameters, .cb_opaque = NULL}, ++ {SIMPLE_DRAW_SOLID, set_draw_parameters, .cb_opaque = NULL}, ++ {SIMPLE_DRAW_SOLID, set_draw_parameters, .cb_opaque = NULL}, ++ {SIMPLE_DRAW_SOLID, set_draw_parameters, .cb_opaque = NULL}, ++ {SIMPLE_DESTROY_SURFACE, set_destroy_parameters, .cb_opaque = NULL}, + }; + + void on_client_connected(Test *test) +diff --git a/server/tests/test_playback.c b/server/tests/test_playback.c +index f712f7b..a6c3d7e 100644 +--- a/server/tests/test_playback.c ++++ b/server/tests/test_playback.c +@@ -21,11 +21,11 @@ + + SpicePlaybackInstance playback_instance; + +-static const SpicePlaybackInterface playback_sif = { +- .base.type = SPICE_INTERFACE_PLAYBACK, +- .base.description = "test playback", +- .base.major_version = SPICE_INTERFACE_PLAYBACK_MAJOR, +- .base.minor_version = SPICE_INTERFACE_PLAYBACK_MINOR, ++static const SpiceBaseInterface base = { ++ .type = SPICE_INTERFACE_PLAYBACK, ++ .description = "test playback", ++ .major_version = SPICE_INTERFACE_PLAYBACK_MAJOR, ++ .minor_version = SPICE_INTERFACE_PLAYBACK_MINOR, + }; + + uint32_t *frame; +@@ -99,7 +99,7 @@ int main(void) + spice_server_set_noauth(server); + spice_server_init(server, core); + +- playback_instance.base.sif = &playback_sif.base; ++ playback_instance.base.sif = &base; + spice_server_add_interface(server, &playback_instance.base); + spice_server_playback_start(&playback_instance); + +diff --git a/server/tests/test_vdagent.c b/server/tests/test_vdagent.c +index 7a56c2a..191ad05 100644 +--- a/server/tests/test_vdagent.c ++++ b/server/tests/test_vdagent.c +@@ -79,14 +79,11 @@ static void vmc_state(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, + { + } + +-static SpiceCharDeviceInterface vmc_interface = { +- .base.type = SPICE_INTERFACE_CHAR_DEVICE, +- .base.description = "test spice virtual channel char device", +- .base.major_version = SPICE_INTERFACE_CHAR_DEVICE_MAJOR, +- .base.minor_version = SPICE_INTERFACE_CHAR_DEVICE_MINOR, +- .state = vmc_state, +- .write = vmc_write, +- .read = vmc_read, ++static SpiceBaseInterface base = { ++ .type = SPICE_INTERFACE_CHAR_DEVICE, ++ .description = "test spice virtual channel char device", ++ .major_version = SPICE_INTERFACE_CHAR_DEVICE_MAJOR, ++ .minor_version = SPICE_INTERFACE_CHAR_DEVICE_MINOR, + }; + + SpiceCharDeviceInstance vmc_instance = { +@@ -100,7 +97,7 @@ int main(void) + core = basic_event_loop_init(); + test = test_new(core); + +- vmc_instance.base.sif = &vmc_interface.base; ++ vmc_instance.base.sif = &base; + spice_server_add_interface(test->server, &vmc_instance.base); + + ping_timer = core->timer_add(pinger, NULL); diff --git a/SOURCES/0033-Fix-Wunused-function.patch b/SOURCES/0033-Fix-Wunused-function.patch new file mode 100644 index 0000000..4dc134a --- /dev/null +++ b/SOURCES/0033-Fix-Wunused-function.patch @@ -0,0 +1,106 @@ +From da9c55f936266b1fb5d4ee55d25ccfcb70e14ef3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= +Date: Mon, 1 Sep 2014 15:06:54 +0200 +Subject: [PATCH] Fix -Wunused-function + +(cherry picked from commit 93b4f4050c57bd851292e4cee884888cee56fc31) +--- + server/tests/test_display_base.c | 22 ----------------- + server/tests/test_vdagent.c | 51 ---------------------------------------- + 2 files changed, 73 deletions(-) + +diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c +index bfe9991..36b4fc1 100644 +--- a/server/tests/test_display_base.c ++++ b/server/tests/test_display_base.c +@@ -795,28 +795,6 @@ void test_add_display_interface(Test* test) + spice_server_add_interface(test->server, &test->qxl_instance.base); + } + +-static int vmc_write(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, +- SPICE_GNUC_UNUSED const uint8_t *buf, +- int len) +-{ +- printf("%s: %d\n", __func__, len); +- return len; +-} +- +-static int vmc_read(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, +- SPICE_GNUC_UNUSED uint8_t *buf, +- int len) +-{ +- printf("%s: %d\n", __func__, len); +- return 0; +-} +- +-static void vmc_state(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, +- int connected) +-{ +- printf("%s: %d\n", __func__, connected); +-} +- + static SpiceBaseInterface base = { + .type = SPICE_INTERFACE_CHAR_DEVICE, + .description = "test spice virtual channel char device", +diff --git a/server/tests/test_vdagent.c b/server/tests/test_vdagent.c +index 191ad05..22153b6 100644 +--- a/server/tests/test_vdagent.c ++++ b/server/tests/test_vdagent.c +@@ -28,57 +28,6 @@ void pinger(SPICE_GNUC_UNUSED void *opaque) + core->timer_start(ping_timer, ping_ms); + } + +- +-static int vmc_write(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, +- SPICE_GNUC_UNUSED const uint8_t *buf, +- int len) +-{ +- return len; +-} +- +-static int vmc_read(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, +- uint8_t *buf, +- int len) +-{ +- static uint8_t c = 0; +- static uint8_t message[2048]; +- static unsigned pos = 0; +- static unsigned message_size; +- int ret; +- +- if (pos == 0) { +- VDIChunkHeader *hdr = (VDIChunkHeader *)message; +- VDAgentMessage *msg = (VDAgentMessage *)&hdr[1]; +- uint8_t *p = message; +- int size = sizeof(message); +- message_size = size; +- /* fill in message */ +- hdr->port = VDP_SERVER_PORT; +- hdr->size = message_size - sizeof(VDIChunkHeader); +- msg->protocol = VD_AGENT_PROTOCOL; +- msg->type = VD_AGENT_END_MESSAGE; +- msg->opaque = 0; +- msg->size = message_size - sizeof(VDIChunkHeader) - sizeof(VDAgentMessage); +- size -= sizeof(VDIChunkHeader) + sizeof(VDAgentMessage); +- p += sizeof(VDIChunkHeader) + sizeof(VDAgentMessage); +- for (; size; --size, ++p, ++c) +- *p = c; +- } +- ret = MIN(message_size - pos, len); +- memcpy(buf, &message[pos], ret); +- pos += ret; +- if (pos == message_size) { +- pos = 0; +- } +- //printf("vmc_read %d (ret %d)\n", len, ret); +- return ret; +-} +- +-static void vmc_state(SPICE_GNUC_UNUSED SpiceCharDeviceInstance *sin, +- SPICE_GNUC_UNUSED int connected) +-{ +-} +- + static SpiceBaseInterface base = { + .type = SPICE_INTERFACE_CHAR_DEVICE, + .description = "test spice virtual channel char device", diff --git a/SOURCES/0034-Validate-surface-bounding-box-before-using-it.patch b/SOURCES/0034-Validate-surface-bounding-box-before-using-it.patch new file mode 100644 index 0000000..0a0c061 --- /dev/null +++ b/SOURCES/0034-Validate-surface-bounding-box-before-using-it.patch @@ -0,0 +1,66 @@ +From 0d7971739587df80c82efaf3cc7932875b5e8c43 Mon Sep 17 00:00:00 2001 +From: Christophe Fergeau +Date: Tue, 9 Sep 2014 18:00:30 +0200 +Subject: [PATCH] Validate surface bounding box before using it + +It's possible for a buggy guest driver to pass invalid bounding box +dimensions in QXL commands, which would then cause spice-server to +segfault. This patch checks the size of the bounding box of the QXL +command right after it has been parsed. + +This fixes rhbz#1135372 + +(cherry picked from commit e270edcbfd958d764e84cdbca6d403ff24fef610) +--- + server/red_worker.c | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +diff --git a/server/red_worker.c b/server/red_worker.c +index 945f4f1..9e6a6ad 100644 +--- a/server/red_worker.c ++++ b/server/red_worker.c +@@ -1272,6 +1272,33 @@ static inline void __validate_surface(RedWorker *worker, uint32_t surface_id) + spice_warn_if(surface_id >= worker->n_surfaces); + } + ++static int validate_drawable_bbox(RedWorker *worker, RedDrawable *drawable) ++{ ++ DrawContext *context; ++ uint32_t surface_id = drawable->surface_id; ++ ++ /* surface_id must be validated before calling into ++ * validate_drawable_bbox ++ */ ++ __validate_surface(worker, surface_id); ++ context = &worker->surfaces[surface_id].context; ++ ++ if (drawable->bbox.top < 0) ++ return FALSE; ++ if (drawable->bbox.left < 0) ++ return FALSE; ++ if (drawable->bbox.bottom < 0) ++ return FALSE; ++ if (drawable->bbox.right < 0) ++ return FALSE; ++ if (drawable->bbox.bottom > context->height) ++ return FALSE; ++ if (drawable->bbox.right > context->width) ++ return FALSE; ++ ++ return TRUE; ++} ++ + static inline int validate_surface(RedWorker *worker, uint32_t surface_id) + { + spice_warn_if(surface_id >= worker->n_surfaces); +@@ -4117,6 +4144,10 @@ static Drawable *get_drawable(RedWorker *worker, uint8_t effect, RedDrawable *re + VALIDATE_SURFACE_RETVAL(worker, drawable->surfaces_dest[x], NULL) + } + } ++ if (!validate_drawable_bbox(worker, red_drawable)) { ++ rendering_incorrect(__func__); ++ return NULL; ++ } + ring_init(&drawable->pipes); + ring_init(&drawable->glz_ring); + diff --git a/SOURCES/0035-migration-Don-t-assert-if-MIGRATE_DATA-comes-before-.patch b/SOURCES/0035-migration-Don-t-assert-if-MIGRATE_DATA-comes-before-.patch new file mode 100644 index 0000000..fc3b0f9 --- /dev/null +++ b/SOURCES/0035-migration-Don-t-assert-if-MIGRATE_DATA-comes-before-.patch @@ -0,0 +1,166 @@ +From 3bd625a0c183e6c729b2fcbd934b36de14ce4a2f Mon Sep 17 00:00:00 2001 +From: Uri Lublin +Date: Wed, 16 Jul 2014 17:02:04 +0300 +Subject: [PATCH] migration: Don't assert() if MIGRATE_DATA comes before + attaching the agent + +During seamless migration, after switching host, if a client was connected +during the migration, it will have data to send back to the new +qemu/spice-server instance. This is handled through MIGRATE_DATA messages. +SPICE char devices use such MIGRATE_DATA messages to restore their state. + +However, the MIGRATE_DATA message can arrive any time after the new qemu +instance has started, this can happen before or after the SPICE char +devices have been created. In order to handle this, if the migrate data +arrives early, it's stored in reds->agent_state.mig_data, and +attach_to_red_agent() will restore the agent state as appropriate. + +Unfortunately this does not work as expected, for main +channel (agent messages). +If attach_to_red_agent() is called before the MIGRATE_DATA +message reaches the server, all goes well, +but if MIGRATE_DATA reaches the server before +attach_to_red_agent() gets called, then some assert() gets +triggered in spice_char_device_state_restore(): + +((null):32507): Spice-ERROR **: char_device.c:937:spice_char_device_state_restore: assertion `dev->num_clients == 1 && dev->wait_for_migrate_data' failed +Thread 3 (Thread 0x7f406b543700 (LWP 32543)): +Thread 2 (Thread 0x7f40697ff700 (LWP 32586)): +Thread 1 (Thread 0x7f4079b45a40 (LWP 32507)): + +When restoring state, a client must already be added to the +spice-char-device. +What happens is that a client is not being added to the char-device +when when MIGRATE_DATA arrives first, which leaves both +dev->num_clients and dev->wait_for_migrate_data value at 0. + +This commit changes the logic in spice_server_char_device_add_interface(), +such that if there is migrate data pending in reds->agent_state.mig_data +but no client was added to the spice-char-device yet, +then first the client is added to the device by calling +spice_char_device_client_add(), and only then the state is restored. + +=== How to Reproduce +To reproduce, add delays to the migration connection between +qmeu-kvm on the source host (SRC) and on the destination (DST). + +Specifically I added a man in the middle DLY host between +migration ports from SRC to DST. + ++-----+ +-----+ +-----+ +| SRC |--> | DLY | --> | DST | ++-----+ +-----+ +-----+ + +DLY listens on port P1 (e.g. 4444) and DST listens on port +PINCOMING (e.g. 4444, from qemu-kvm '-incoming' command line option) + +Precondition: make sure port P1 on DLY is accessible in iptables. +Option 1: use ssh tcp port forwarding +On DLY host run ssh: + ssh DLY:P1:DST:PINCOMING DST +Then use the following migration command (on qemu-kvm monitor): + client_migrate_info spice DST PSPICE + migrate -d tcp:DLY:P1 + +Option 2: Use a simple proxy program that forwards +packets from SRC to DST while adding some delays. +The program runs on DLY, listens to port D1, upon +accept connects to DST:PINCOMING and forward all +packets from DLY:D1 to DST:PINCOMING. +Then use the same migrate command as in option 1: + client_migrate_info spice DST PSPICE + migrate -d tcp:DLY:P1 + +=== How to Reproduce Ends + +This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1035184 + +Based-on-a-patch-by: Christophe Fergeau +(cherry picked from commit 2d1c00a659cd1b3998f5d1f90fc5ee6abb7519bb) +--- + server/reds.c | 39 ++++++++++++++++++++++++++++----------- + 1 file changed, 28 insertions(+), 11 deletions(-) + +diff --git a/server/reds.c b/server/reds.c +index 464552a..06e9a3e 100644 +--- a/server/reds.c ++++ b/server/reds.c +@@ -1373,6 +1373,7 @@ int reds_handle_migrate_data(MainChannelClient *mcc, SpiceMigrateDataMain *mig_d + { + VDIPortState *agent_state = &reds->agent_state; + ++ spice_debug("main-channel: got migrate data"); + /* + * Now that the client has switched to the target server, if main_channel + * controls the mm-time, we update the client's mm-time. +@@ -1394,15 +1395,18 @@ int reds_handle_migrate_data(MainChannelClient *mcc, SpiceMigrateDataMain *mig_d + main_channel_push_agent_disconnected(reds->main_channel); + main_channel_push_agent_connected(reds->main_channel); + } else { ++ spice_debug("restoring state from mig_data"); + return reds_agent_state_restore(mig_data); + } + } + } else { + /* restore agent starte when the agent gets attached */ ++ spice_debug("saving mig_data"); + spice_assert(agent_state->plug_generation == 0); + agent_state->mig_data = spice_memdup(mig_data, size); + } + } else { ++ spice_debug("agent was not attached on the source host"); + if (vdagent) { + /* spice_char_device_client_remove disables waiting for migration data */ + spice_char_device_client_remove(agent_state->base, +@@ -3589,17 +3593,15 @@ static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin) + state->read_filter.discard_all = FALSE; + reds->agent_state.plug_generation++; + +- if (reds->agent_state.mig_data) { +- spice_assert(reds->agent_state.plug_generation == 1); +- reds_agent_state_restore(reds->agent_state.mig_data); +- free(reds->agent_state.mig_data); +- reds->agent_state.mig_data = NULL; +- } else if (!red_channel_waits_for_migrate_data(&reds->main_channel->base)) { +- /* we will assoicate the client with the char device, upon reds_on_main_agent_start, +- * in response to MSGC_AGENT_START */ +- main_channel_push_agent_connected(reds->main_channel); +- } else { +- spice_debug("waiting for migration data"); ++ if (reds->agent_state.mig_data || ++ red_channel_waits_for_migrate_data(&reds->main_channel->base)) { ++ /* Migration in progress (code is running on the destination host): ++ * 1. Add the client to spice char device, if it was not already added. ++ * 2.a If this (qemu-kvm state load side of migration) happens first ++ * then wait for spice migration data to arrive. Otherwise ++ * 2.b If this happens second ==> we already have spice migrate data ++ * then restore state ++ */ + if (!spice_char_device_client_exists(reds->agent_state.base, reds_get_client())) { + int client_added; + +@@ -3615,9 +3617,24 @@ static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin) + spice_warning("failed to add client to agent"); + reds_disconnect(); + } ++ } + ++ if (reds->agent_state.mig_data) { ++ spice_debug("restoring state from stored migration data"); ++ spice_assert(reds->agent_state.plug_generation == 1); ++ reds_agent_state_restore(reds->agent_state.mig_data); ++ free(reds->agent_state.mig_data); ++ reds->agent_state.mig_data = NULL; + } ++ else { ++ spice_debug("waiting for migration data"); ++ } ++ } else { ++ /* we will associate the client with the char device, upon reds_on_main_agent_start, ++ * in response to MSGC_AGENT_START */ ++ main_channel_push_agent_connected(reds->main_channel); + } ++ + return state->base; + } + diff --git a/SOURCES/0036-server-fix-crash-when-restarting-VM-with-old-client.patch b/SOURCES/0036-server-fix-crash-when-restarting-VM-with-old-client.patch new file mode 100644 index 0000000..589aeea --- /dev/null +++ b/SOURCES/0036-server-fix-crash-when-restarting-VM-with-old-client.patch @@ -0,0 +1,70 @@ +From beb9b9a776e20a992edde78722356ecbdee9893a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= +Date: Thu, 9 Oct 2014 17:23:06 +0200 +Subject: [PATCH] server: fix crash when restarting VM with old client + +The server will reset the vdagent char device when the client does not +implement SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS. This will nullify +dev->sin and the following crash will be reached on restart: + + #0 0x00007fb05aa264a1 in spice_char_device_write_to_device (dev=dev@entry=0x7fb066ae5d30) at char_device.c:443 + #1 0x00007fb05aa27137 in spice_char_device_write_to_device (dev=0x7fb066ae5d30) at char_device.c:436 + #2 spice_char_device_start (dev=0x7fb066ae5d30) at char_device.c:798 + #3 0x00007fb05aa6a981 in spice_server_vm_start (s=) at reds.c:3795 + #4 0x00007fb0644b7f89 in qdev_reset_one (dev=, opaque=) at hw/core/qdev.c:241 + #5 0x00007fb0644b7918 in qbus_walk_children (bus=0x7fb06661e870, pre_devfn=0x0, pre_busfn=0x0, + post_devfn=0x7fb0644b7f80 , post_busfn=0x7fb0644b6350 , opaque=0x0) + at hw/core/qdev.c:422 + #6 0x00007fb0644b7848 in qdev_walk_children (dev=0x7fb0665f47a0, pre_devfn=0x0, pre_busfn=0x0, + post_devfn=0x7fb0644b7f80 , post_busfn=0x7fb0644b6350 , opaque=0x0) + at hw/core/qdev.c:456 + #7 0x00007fb0644b7918 in qbus_walk_children (bus=0x7fb06647cde0, pre_devfn=0x0, pre_busfn=0x0, + post_devfn=0x7fb0644b7f80 , post_busfn=0x7fb0644b6350 , opaque=0x0) + at hw/core/qdev.c:422 + #8 0x00007fb0644399fd in qemu_devices_reset () at vl.c:1830 + +After restart, qemu will reset the device instance (sin) when virtio +port is opened: + + #0 spice_char_device_state_reset_dev_instance (state=0x7fe4873876d0, sin=sin@entry=0x7fe486fb0c68) + at char_device.c:667 + #1 0x00007fe47b277516 in attach_to_red_agent (sin=0x7fe486fb0c68) at reds.c:2838 + #2 spice_server_char_device_add_interface (sin=0x7fe486fb0c68, s=0x7fe486fb2e60) at reds.c:2962 + #3 spice_server_add_interface (s=0x7fe486fb2e60, sin=0x7fe486fb0c68) at reds.c:3104 + #4 0x00007fe484c69e57 in vmc_register_interface (scd=0x7fe486fb0c60) at spice-qemu-char.c:123 + #5 0x00007fe484ce96b4 in set_guest_connected (port=, guest_connected=1) + at hw/char/virtio-console.c:89 + #6 0x00007fe484ba70ed in handle_control_message (len=8, buf=0x7fe486fbdf70, vser=0x7fe48739ae98) + at /usr/src/debug/qemu-2.1.0/hw/char/virtio-serial-bus.c:382 + +Let's ignore the call to spice_char_device_{write,read}_to_device() when +dev->sin is NULL, similary to other conditions, such as dev->running. + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1145919 +(cherry picked from commit 4639817f0eb26316894cc83b43a736bdd72f9018) +--- + server/char_device.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/server/char_device.c b/server/char_device.c +index 660a788..6d2339e 100644 +--- a/server/char_device.c ++++ b/server/char_device.c +@@ -283,7 +283,7 @@ static int spice_char_device_read_from_device(SpiceCharDeviceState *dev) + uint64_t max_send_tokens; + int did_read = FALSE; + +- if (!dev->running || dev->wait_for_migrate_data) { ++ if (!dev->running || dev->wait_for_migrate_data || !dev->sin) { + return FALSE; + } + +@@ -433,7 +433,7 @@ static int spice_char_device_write_to_device(SpiceCharDeviceState *dev) + int total = 0; + int n; + +- if (!dev->running || dev->wait_for_migrate_data) { ++ if (!dev->running || dev->wait_for_migrate_data || !dev->sin) { + return 0; + } + diff --git a/SOURCES/0037-Use-TLS-version-1.0-or-better.patch b/SOURCES/0037-Use-TLS-version-1.0-or-better.patch new file mode 100644 index 0000000..7b16924 --- /dev/null +++ b/SOURCES/0037-Use-TLS-version-1.0-or-better.patch @@ -0,0 +1,45 @@ +From 4fc9ba5f27dd4c04441d38c893ee962da01baf80 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?David=20Ja=C5=A1a?= +Date: Wed, 27 Nov 2013 17:45:49 +0100 +Subject: [PATCH spice] Use TLS version 1.0 or better + +When creating a TLS socket, both spice-server and spice-gtk currently +call SSL_CTX_new(TLSv1_method()). The TLSv1_method() function set the +protocol version to TLS 1.0 exclusively. The correct way to support +multiple protocol versions is to call SSLv23_method() in spite of its +scary name. This method will enable all SSL/TLS protocol versions. The +protocol suite may be further narrowed down by setting respective +SSL_OP_NO_ options of SSL context. This possibility is +used in this patch in order to block use of SSLv3 that is enabled by +default in openssl for client sockets as of now but spice has never used +it. +--- + server/reds.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/server/reds.c b/server/reds.c +index 2a0002b..d79732c 100644 +--- a/server/reds.c ++++ b/server/reds.c +@@ -3221,6 +3221,8 @@ static int reds_init_ssl(void) + SSL_METHOD *ssl_method; + #endif + int return_code; ++ /* When some other SSL/TLS version becomes obsolete, add it to this ++ * variable. */ + long ssl_options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3; + + /* Global system initialization*/ +@@ -3228,7 +3230,8 @@ static int reds_init_ssl(void) + SSL_load_error_strings(); + + /* Create our context*/ +- ssl_method = TLSv1_method(); ++ /* SSLv23_method() handles TLSv1.x in addition to SSLv2/v3 */ ++ ssl_method = SSLv23_method(); + reds->ctx = SSL_CTX_new(ssl_method); + if (!reds->ctx) { + spice_warning("Could not allocate new SSL context"); +-- +2.1.0 + diff --git a/SPECS/spice.spec b/SPECS/spice.spec index 1efa7f9..e982bdd 100644 --- a/SPECS/spice.spec +++ b/SPECS/spice.spec @@ -1,6 +1,6 @@ Name: spice Version: 0.12.4 -Release: 5%{?dist}.1 +Release: 9%{?dist} Summary: Implements the SPICE protocol Group: User Interface/Desktops License: LGPLv2+ @@ -25,7 +25,24 @@ Patch16: 0016-spice_timer_queue-don-t-call-timers-repeatedly.patch Patch17: 0017-red_channel-add-on_input-callback-for-tracing-incomi.patch Patch18: 0018-red_channel-add-option-to-monitor-whether-a-channel-.patch Patch19: 0019-main_channel-monitoring-client-connection-status.patch -Patch20: 0020-migration-Don-t-assert-if-MIGRATE_DATA-comes-before-.patch +Patch20: 0020-Fix-crash-when-clearing-surface-memory.patch +Patch21: 0021-Fix-assert-in-mjpeg_encoder_adjust_params_to_bit_rat.patch +Patch22: 0022-reds-lookup-corresponding-channel-id.patch +Patch23: 0023-dispatcher-lower-a-monitor-config-warning-to-a-debug.patch +Patch24: 0024-mjpeg-Don-t-warn-on-unsupported-image-formats.patch +Patch25: 0025-server-Don-t-dump-the-bitmap-when-the-format-is-inva.patch +Patch26: 0026-Fix-Wunused-parameter.patch +Patch27: 0027-Fix-Wunused-value.patch +Patch28: 0028-Fix-Wsign.patch +Patch29: 0029-Fix-Wswitch.patch +Patch30: 0030-Fix-Wformat.patch +Patch31: 0031-Fix-Wnonnull.patch +Patch32: 0032-Fix-Wmissing-field-initializers.patch +Patch33: 0033-Fix-Wunused-function.patch +Patch34: 0034-Validate-surface-bounding-box-before-using-it.patch +Patch35: 0035-migration-Don-t-assert-if-MIGRATE_DATA-comes-before-.patch +Patch36: 0036-server-fix-crash-when-restarting-VM-with-old-client.patch +Patch37: 0037-Use-TLS-version-1.0-or-better.patch # https://bugzilla.redhat.com/show_bug.cgi?id=613529 %if 0%{?rhel} @@ -101,6 +118,23 @@ using spice-server, you will need to install spice-server-devel. %patch18 -p1 %patch19 -p1 %patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 %build @@ -131,9 +165,34 @@ mkdir -p %{buildroot}%{_libexecdir} %changelog -* Fri Nov 21 2014 Christophe Fergeau 0.12.4-5.1 -- Fix random crash during migration when a client is connected - Resolves: rhbz#1121016 +* Mon Jan 05 2015 Marc-Andre Lureau 0.12.4-9 +- Allow recent TLS/SSL methods, block SSLv2/SSLv3. Resolves: rhbz#1175540 + +* Tue Oct 21 2014 Christophe Fergeau 0.12.4-8 +- Fix defects reported by Coverity + Resolves: rhbz#885717 +- Validate surface bounding box sent from QXL driver + Resolves: rhbz#1052856 +- Fix assertion sometimes happening during migration while a client is + connected + Resolves: rhbz#1035184 +- Fix crash when restarting VM with old client + Resolves: rhbz#1145919 + +* Thu Sep 18 2014 Christophe Fergeau 0.12.4-7 +- Fix assert in mjpeg_encoder_adjust_params_to_bit_rate() + Resolves: rhbz#1086823 +- Fix "Spice-ERROR **: reds.c:1464:reds_send_link_ack: assertion + `link->link_mess->channel_type == SPICE_CHANNEL_MAIN' failed" assertion + Resolves: rhbz#1058625 +- Lower a monitor-config warning to debug level + Resolves: rhbz#1119220 +- mjpeg: Don't warn on unsupported image formats + Resolves: rhbz#1070028 + +* Thu Aug 07 2014 Marc-Andre Lureau 0.12.4-6 +- Fix invalid surface clearing + Resolves: rhbz#1029646 * Wed Jan 29 2014 Christophe Fergeau 0.12.4-5 - Fix qemu crash during migration with reboot @@ -141,9 +200,6 @@ mkdir -p %{buildroot}%{_libexecdir} - Monitor whether the client is alive Resolves: rhbz#1016790 -* Fri Dec 27 2013 Daniel Mach - 0.12.4-4 -- Mass rebuild 2013-12-27 - * Tue Oct 15 2013 Christophe Fergeau 0.12.4-3 - Fix spice-server crash when client sends a password which is too long Resolves: CVE-2013-4282