* [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc
@ 2015-01-30 2:14 arei.gonglei
2015-01-30 2:14 ` [Qemu-devel] [PATCH v2 1/3] vnc: fix qemu crash when not configure vnc option arei.gonglei
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: arei.gonglei @ 2015-01-30 2:14 UTC (permalink / raw)
To: qemu-devel; +Cc: Gonglei, kraxel, dslutz, peter.huangpeng
From: Gonglei <arei.gonglei@huawei.com>
Reproducer:
$ x86_64-softmmu/qemu-system-x86_64
qemu-system-x86_64: Invalid parameter 'to'
Segmentation fault (core dumped)
Fix:
https://bugs.launchpad.net/qemu/+bug/1414222
Patch 1~2 is bugfix, patch 3 is trivial.
v2 -> v1:
- change commit message of patch 1. (Don Slutz)
Gonglei (3):
vnc: fix qemu crash when not configure vnc option
vnc: correct missing property about vnc_display
vnc: using bool type instead of int for QEMU_OPT_BOOL
ui/vnc.c | 45 +++++++++++++++++++++++++++++++++++++--------
1 file changed, 37 insertions(+), 8 deletions(-)
--
1.7.12.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v2 1/3] vnc: fix qemu crash when not configure vnc option
2015-01-30 2:14 [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc arei.gonglei
@ 2015-01-30 2:14 ` arei.gonglei
2015-01-30 13:18 ` Don Slutz
2015-01-30 2:14 ` [Qemu-devel] [PATCH v2 2/3] vnc: correct missing property about vnc_display arei.gonglei
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: arei.gonglei @ 2015-01-30 2:14 UTC (permalink / raw)
To: qemu-devel; +Cc: Gonglei, kraxel, dslutz, peter.huangpeng
From: Gonglei <arei.gonglei@huawei.com>
Add missing vnc options: to, ipv4, ipv6 and fix
qemu crash.
Reproducer:
$ x86_64-softmmu/qemu-system-x86_64
qemu-system-x86_64: Invalid parameter 'to'
Segmentation fault (core dumped)
BTW the patch fix the below bug:
https://bugs.launchpad.net/qemu/+bug/1414222
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
ui/vnc.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/ui/vnc.c b/ui/vnc.c
index a742c90..08b8b24 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3276,6 +3276,15 @@ static QemuOptsList qemu_vnc_opts = {
.name = "connections",
.type = QEMU_OPT_NUMBER,
},{
+ .name = "to",
+ .type = QEMU_OPT_NUMBER,
+ },{
+ .name = "ipv4",
+ .type = QEMU_OPT_BOOL,
+ },{
+ .name = "ipv6",
+ .type = QEMU_OPT_BOOL,
+ },{
.name = "password",
.type = QEMU_OPT_BOOL,
},{
--
1.7.12.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v2 2/3] vnc: correct missing property about vnc_display
2015-01-30 2:14 [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc arei.gonglei
2015-01-30 2:14 ` [Qemu-devel] [PATCH v2 1/3] vnc: fix qemu crash when not configure vnc option arei.gonglei
@ 2015-01-30 2:14 ` arei.gonglei
2015-01-30 2:14 ` [Qemu-devel] [PATCH v2 3/3] vnc: using bool type instead of int for QEMU_OPT_BOOL arei.gonglei
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: arei.gonglei @ 2015-01-30 2:14 UTC (permalink / raw)
To: qemu-devel; +Cc: Gonglei, kraxel, dslutz, peter.huangpeng
From: Gonglei <arei.gonglei@huawei.com>
Missing three property for vnc socket connection,
revalue display variable with correct way.
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
ui/vnc.c | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index 08b8b24..23f413e 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3320,10 +3320,15 @@ void vnc_display_open(const char *id, Error **errp)
{
VncDisplay *vs = vnc_display_find(id);
QemuOpts *opts = qemu_opts_find(&qemu_vnc_opts, id);
- const char *display, *share, *device_id;
+ const char *share, *device_id;
QemuConsole *con;
int password = 0;
int reverse = 0;
+ const char *vnc;
+ const char *has_to;
+ char *display, *to = NULL;
+ bool has_ipv4 = false;
+ bool has_ipv6 = false;
#ifdef CONFIG_VNC_WS
const char *websocket;
#endif
@@ -3349,10 +3354,21 @@ void vnc_display_open(const char *id, Error **errp)
if (!opts) {
return;
}
- display = qemu_opt_get(opts, "vnc");
- if (!display || strcmp(display, "none") == 0) {
+ vnc = qemu_opt_get(opts, "vnc");
+ if (!vnc || strcmp(vnc, "none") == 0) {
return;
}
+
+ has_to = qemu_opt_get(opts, "to");
+ if (has_to) {
+ to = g_strdup_printf(",to=%s", has_to);
+ }
+ has_ipv4 = qemu_opt_get_bool(opts, "ipv4", false);
+ has_ipv6 = qemu_opt_get_bool(opts, "ipv6", false);
+ display = g_strdup_printf("%s%s%s%s", vnc,
+ has_to ? to : "",
+ has_ipv4 ? ",ipv4" : "",
+ has_ipv6 ? ",ipv6" : "");
vs->display = g_strdup(display);
password = qemu_opt_get_bool(opts, "password", false);
@@ -3632,6 +3648,8 @@ void vnc_display_open(const char *id, Error **errp)
}
#endif /* CONFIG_VNC_WS */
}
+ g_free(to);
+ g_free(display);
g_free(vs->display);
vs->display = dpy;
qemu_set_fd_handler2(vs->lsock, NULL,
@@ -3646,6 +3664,8 @@ void vnc_display_open(const char *id, Error **errp)
return;
fail:
+ g_free(to);
+ g_free(display);
g_free(vs->display);
vs->display = NULL;
#ifdef CONFIG_VNC_WS
--
1.7.12.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v2 3/3] vnc: using bool type instead of int for QEMU_OPT_BOOL
2015-01-30 2:14 [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc arei.gonglei
2015-01-30 2:14 ` [Qemu-devel] [PATCH v2 1/3] vnc: fix qemu crash when not configure vnc option arei.gonglei
2015-01-30 2:14 ` [Qemu-devel] [PATCH v2 2/3] vnc: correct missing property about vnc_display arei.gonglei
@ 2015-01-30 2:14 ` arei.gonglei
2015-02-05 10:19 ` [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc Stefano Stabellini
2015-02-10 10:14 ` Gerd Hoffmann
4 siblings, 0 replies; 10+ messages in thread
From: arei.gonglei @ 2015-01-30 2:14 UTC (permalink / raw)
To: qemu-devel; +Cc: Gonglei, kraxel, dslutz, peter.huangpeng
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
ui/vnc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index 23f413e..4bae970 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3322,8 +3322,8 @@ void vnc_display_open(const char *id, Error **errp)
QemuOpts *opts = qemu_opts_find(&qemu_vnc_opts, id);
const char *share, *device_id;
QemuConsole *con;
- int password = 0;
- int reverse = 0;
+ bool password = false;
+ bool reverse = false;
const char *vnc;
const char *has_to;
char *display, *to = NULL;
@@ -3333,11 +3333,11 @@ void vnc_display_open(const char *id, Error **errp)
const char *websocket;
#endif
#ifdef CONFIG_VNC_TLS
- int tls = 0, x509 = 0;
+ bool tls = false, x509 = false;
const char *path;
#endif
#ifdef CONFIG_VNC_SASL
- int sasl = 0;
+ bool sasl = false;
int saslErr;
#endif
#if defined(CONFIG_VNC_TLS) || defined(CONFIG_VNC_SASL)
@@ -3389,7 +3389,7 @@ void vnc_display_open(const char *id, Error **errp)
tls = qemu_opt_get_bool(opts, "tls", false);
path = qemu_opt_get(opts, "x509");
if (path) {
- x509 = 1;
+ x509 = true;
vs->tls.x509verify = qemu_opt_get_bool(opts, "x509verify", false);
if (vnc_tls_set_x509_creds_dir(vs, path) < 0) {
error_setg(errp, "Failed to find x509 certificates/keys in %s",
--
1.7.12.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/3] vnc: fix qemu crash when not configure vnc option
2015-01-30 2:14 ` [Qemu-devel] [PATCH v2 1/3] vnc: fix qemu crash when not configure vnc option arei.gonglei
@ 2015-01-30 13:18 ` Don Slutz
0 siblings, 0 replies; 10+ messages in thread
From: Don Slutz @ 2015-01-30 13:18 UTC (permalink / raw)
To: arei.gonglei, qemu-devel; +Cc: kraxel, dslutz, peter.huangpeng
On 01/29/15 21:14, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
>
> Add missing vnc options: to, ipv4, ipv6 and fix
> qemu crash.
>
> Reproducer:
> $ x86_64-softmmu/qemu-system-x86_64
> qemu-system-x86_64: Invalid parameter 'to'
> Segmentation fault (core dumped)
>
> BTW the patch fix the below bug:
> https://bugs.launchpad.net/qemu/+bug/1414222
>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
Looks good,
Reviewed-by: Don Slutz <dslutz@verizon.com>
-Don Slutz
> ui/vnc.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/ui/vnc.c b/ui/vnc.c
> index a742c90..08b8b24 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -3276,6 +3276,15 @@ static QemuOptsList qemu_vnc_opts = {
> .name = "connections",
> .type = QEMU_OPT_NUMBER,
> },{
> + .name = "to",
> + .type = QEMU_OPT_NUMBER,
> + },{
> + .name = "ipv4",
> + .type = QEMU_OPT_BOOL,
> + },{
> + .name = "ipv6",
> + .type = QEMU_OPT_BOOL,
> + },{
> .name = "password",
> .type = QEMU_OPT_BOOL,
> },{
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc
2015-01-30 2:14 [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc arei.gonglei
` (2 preceding siblings ...)
2015-01-30 2:14 ` [Qemu-devel] [PATCH v2 3/3] vnc: using bool type instead of int for QEMU_OPT_BOOL arei.gonglei
@ 2015-02-05 10:19 ` Stefano Stabellini
2015-02-05 12:35 ` Gonglei
2015-02-10 10:14 ` Gerd Hoffmann
4 siblings, 1 reply; 10+ messages in thread
From: Stefano Stabellini @ 2015-02-05 10:19 UTC (permalink / raw)
To: Gonglei; +Cc: peter.huangpeng, qemu-devel, dslutz, kraxel
On Fri, 30 Jan 2015, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
>
> Reproducer:
> $ x86_64-softmmu/qemu-system-x86_64
> qemu-system-x86_64: Invalid parameter 'to'
> Segmentation fault (core dumped)
>
> Fix:
> https://bugs.launchpad.net/qemu/+bug/1414222
>
> Patch 1~2 is bugfix, patch 3 is trivial.
It would be nice to get the patches applied as the issue is blocking the
Xen Project CI-loop.
> v2 -> v1:
> - change commit message of patch 1. (Don Slutz)
>
> Gonglei (3):
> vnc: fix qemu crash when not configure vnc option
> vnc: correct missing property about vnc_display
> vnc: using bool type instead of int for QEMU_OPT_BOOL
>
> ui/vnc.c | 45 +++++++++++++++++++++++++++++++++++++--------
> 1 file changed, 37 insertions(+), 8 deletions(-)
>
> --
> 1.7.12.4
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc
2015-02-05 10:19 ` [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc Stefano Stabellini
@ 2015-02-05 12:35 ` Gonglei
2015-02-09 8:33 ` Gerd Hoffmann
0 siblings, 1 reply; 10+ messages in thread
From: Gonglei @ 2015-02-05 12:35 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: kraxel, Huangpeng (Peter), dslutz, qemu-devel
On 2015/2/5 18:19, Stefano Stabellini wrote:
> On Fri, 30 Jan 2015, arei.gonglei@huawei.com wrote:
>> From: Gonglei <arei.gonglei@huawei.com>
>>
>> Reproducer:
>> $ x86_64-softmmu/qemu-system-x86_64
>> qemu-system-x86_64: Invalid parameter 'to'
>> Segmentation fault (core dumped)
>>
>> Fix:
>> https://bugs.launchpad.net/qemu/+bug/1414222
>>
>> Patch 1~2 is bugfix, patch 3 is trivial.
>
> It would be nice to get the patches applied as the issue is blocking the
> Xen Project CI-loop.
>
It seems that Gerd is not in maillist recently.
Regards,
-Gonglei
>
>> v2 -> v1:
>> - change commit message of patch 1. (Don Slutz)
>>
>> Gonglei (3):
>> vnc: fix qemu crash when not configure vnc option
>> vnc: correct missing property about vnc_display
>> vnc: using bool type instead of int for QEMU_OPT_BOOL
>>
>> ui/vnc.c | 45 +++++++++++++++++++++++++++++++++++++--------
>> 1 file changed, 37 insertions(+), 8 deletions(-)
>>
>> --
>> 1.7.12.4
>>
>>
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc
2015-02-05 12:35 ` Gonglei
@ 2015-02-09 8:33 ` Gerd Hoffmann
2015-02-09 8:47 ` Gonglei
0 siblings, 1 reply; 10+ messages in thread
From: Gerd Hoffmann @ 2015-02-09 8:33 UTC (permalink / raw)
To: Gonglei; +Cc: qemu-devel, Huangpeng (Peter), dslutz, Stefano Stabellini
Hi,
> It seems that Gerd is not in maillist recently.
Was sick, back online now, I'll try to have a closer look ASAP but I
have a big email backlog now ...
cheers,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc
2015-02-09 8:33 ` Gerd Hoffmann
@ 2015-02-09 8:47 ` Gonglei
0 siblings, 0 replies; 10+ messages in thread
From: Gonglei @ 2015-02-09 8:47 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel, Huangpeng (Peter), dslutz, Stefano Stabellini
On 2015/2/9 16:33, Gerd Hoffmann wrote:
> Hi,
>
>> It seems that Gerd is not in maillist recently.
>
> Was sick, back online now, I'll try to have a closer look ASAP but I
> have a big email backlog now ...
>
Hope you feel better now :)
Regards,
-Gonglei
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc
2015-01-30 2:14 [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc arei.gonglei
` (3 preceding siblings ...)
2015-02-05 10:19 ` [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc Stefano Stabellini
@ 2015-02-10 10:14 ` Gerd Hoffmann
4 siblings, 0 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2015-02-10 10:14 UTC (permalink / raw)
To: arei.gonglei; +Cc: qemu-devel, dslutz, peter.huangpeng
On Fr, 2015-01-30 at 10:14 +0800, arei.gonglei@huawei.com wrote:
> Gonglei (3):
> vnc: fix qemu crash when not configure vnc option
> vnc: correct missing property about vnc_display
> vnc: using bool type instead of int for QEMU_OPT_BOOL
Added to vnc queue.
thanks,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-02-10 10:14 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 2:14 [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc arei.gonglei
2015-01-30 2:14 ` [Qemu-devel] [PATCH v2 1/3] vnc: fix qemu crash when not configure vnc option arei.gonglei
2015-01-30 13:18 ` Don Slutz
2015-01-30 2:14 ` [Qemu-devel] [PATCH v2 2/3] vnc: correct missing property about vnc_display arei.gonglei
2015-01-30 2:14 ` [Qemu-devel] [PATCH v2 3/3] vnc: using bool type instead of int for QEMU_OPT_BOOL arei.gonglei
2015-02-05 10:19 ` [Qemu-devel] [PATCH v2 0/3] fix qemu crash about vnc Stefano Stabellini
2015-02-05 12:35 ` Gonglei
2015-02-09 8:33 ` Gerd Hoffmann
2015-02-09 8:47 ` Gonglei
2015-02-10 10:14 ` Gerd Hoffmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.