* [Qemu-devel] [PATCH 0/3] fix qemu crash about vnc
@ 2015-01-29 12:52 arei.gonglei
2015-01-29 12:52 ` [Qemu-devel] [PATCH 1/3] vnc: fix qemu crash when not configure vnc option arei.gonglei
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: arei.gonglei @ 2015-01-29 12:52 UTC (permalink / raw)
To: qemu-devel; +Cc: Gonglei, kraxel, 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)
Patch 1~2 is bugfix, patch 3 is trivial.
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] 8+ messages in thread
* [Qemu-devel] [PATCH 1/3] vnc: fix qemu crash when not configure vnc option
2015-01-29 12:52 [Qemu-devel] [PATCH 0/3] fix qemu crash about vnc arei.gonglei
@ 2015-01-29 12:52 ` arei.gonglei
2015-01-29 16:14 ` Don Slutz
2015-01-29 12:52 ` [Qemu-devel] [PATCH 2/3] vnc: correct missing property about vnc_display arei.gonglei
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: arei.gonglei @ 2015-01-29 12:52 UTC (permalink / raw)
To: qemu-devel; +Cc: Gonglei, kraxel, 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)
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] 8+ messages in thread
* [Qemu-devel] [PATCH 2/3] vnc: correct missing property about vnc_display
2015-01-29 12:52 [Qemu-devel] [PATCH 0/3] fix qemu crash about vnc arei.gonglei
2015-01-29 12:52 ` [Qemu-devel] [PATCH 1/3] vnc: fix qemu crash when not configure vnc option arei.gonglei
@ 2015-01-29 12:52 ` arei.gonglei
2015-01-29 12:52 ` [Qemu-devel] [PATCH 3/3] vnc: using bool type instead of int for QEMU_OPT_BOOL arei.gonglei
2015-01-29 16:10 ` [Qemu-devel] [PATCH 0/3] fix qemu crash about vnc Don Slutz
3 siblings, 0 replies; 8+ messages in thread
From: arei.gonglei @ 2015-01-29 12:52 UTC (permalink / raw)
To: qemu-devel; +Cc: Gonglei, kraxel, 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] 8+ messages in thread
* [Qemu-devel] [PATCH 3/3] vnc: using bool type instead of int for QEMU_OPT_BOOL
2015-01-29 12:52 [Qemu-devel] [PATCH 0/3] fix qemu crash about vnc arei.gonglei
2015-01-29 12:52 ` [Qemu-devel] [PATCH 1/3] vnc: fix qemu crash when not configure vnc option arei.gonglei
2015-01-29 12:52 ` [Qemu-devel] [PATCH 2/3] vnc: correct missing property about vnc_display arei.gonglei
@ 2015-01-29 12:52 ` arei.gonglei
2015-01-29 16:10 ` [Qemu-devel] [PATCH 0/3] fix qemu crash about vnc Don Slutz
3 siblings, 0 replies; 8+ messages in thread
From: arei.gonglei @ 2015-01-29 12:52 UTC (permalink / raw)
To: qemu-devel; +Cc: Gonglei, kraxel, 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] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] fix qemu crash about vnc
2015-01-29 12:52 [Qemu-devel] [PATCH 0/3] fix qemu crash about vnc arei.gonglei
` (2 preceding siblings ...)
2015-01-29 12:52 ` [Qemu-devel] [PATCH 3/3] vnc: using bool type instead of int for QEMU_OPT_BOOL arei.gonglei
@ 2015-01-29 16:10 ` Don Slutz
2015-01-30 0:36 ` Gonglei
3 siblings, 1 reply; 8+ messages in thread
From: Don Slutz @ 2015-01-29 16:10 UTC (permalink / raw)
To: arei.gonglei, qemu-devel; +Cc: 1414222, kraxel, peter.huangpeng
On 01/29/15 07:52, 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)
>
This looks to be a fix for
Subject: [Qemu-devel] [Bug 1414222] [NEW] qemu-system-i386: -vnc
-Don Slutz
> Patch 1~2 is bugfix, patch 3 is trivial.
>
> 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(-)
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] vnc: fix qemu crash when not configure vnc option
2015-01-29 12:52 ` [Qemu-devel] [PATCH 1/3] vnc: fix qemu crash when not configure vnc option arei.gonglei
@ 2015-01-29 16:14 ` Don Slutz
2015-01-30 0:37 ` Gonglei
0 siblings, 1 reply; 8+ messages in thread
From: Don Slutz @ 2015-01-29 16:14 UTC (permalink / raw)
To: arei.gonglei, qemu-devel; +Cc: kraxel, peter.huangpeng
On 01/29/15 07:52, 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)
>
> 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,
> },{
>
The code change looks good, but does more then the commit message says.
Maybe include something like "Add missing vnc options: to, ipv4, ipv6".
-Don Slutz
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] fix qemu crash about vnc
2015-01-29 16:10 ` [Qemu-devel] [PATCH 0/3] fix qemu crash about vnc Don Slutz
@ 2015-01-30 0:36 ` Gonglei
0 siblings, 0 replies; 8+ messages in thread
From: Gonglei @ 2015-01-30 0:36 UTC (permalink / raw)
To: Don Slutz; +Cc: Huangpeng (Peter), 1414222, qemu-devel, kraxel
On 2015/1/30 0:10, Don Slutz wrote:
> On 01/29/15 07:52, 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)
>>
>
> This looks to be a fix for
>
> Subject: [Qemu-devel] [Bug 1414222] [NEW] qemu-system-i386: -vnc
>
Oh, yes. Thanks for your point. I'll add it in commit message :)
Regards,
-Gonglei
> -Don Slutz
>
>
>> Patch 1~2 is bugfix, patch 3 is trivial.
>>
>> 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(-)
>>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] vnc: fix qemu crash when not configure vnc option
2015-01-29 16:14 ` Don Slutz
@ 2015-01-30 0:37 ` Gonglei
0 siblings, 0 replies; 8+ messages in thread
From: Gonglei @ 2015-01-30 0:37 UTC (permalink / raw)
To: Don Slutz; +Cc: Huangpeng (Peter), qemu-devel, kraxel
On 2015/1/30 0:14, Don Slutz wrote:
> On 01/29/15 07:52, 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)
>>
>> 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,
>> },{
>>
>
> The code change looks good, but does more then the commit message says.
>
> Maybe include something like "Add missing vnc options: to, ipv4, ipv6".
>
Will do, thanks.
Regards,
-Gonglei
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-01-30 0:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29 12:52 [Qemu-devel] [PATCH 0/3] fix qemu crash about vnc arei.gonglei
2015-01-29 12:52 ` [Qemu-devel] [PATCH 1/3] vnc: fix qemu crash when not configure vnc option arei.gonglei
2015-01-29 16:14 ` Don Slutz
2015-01-30 0:37 ` Gonglei
2015-01-29 12:52 ` [Qemu-devel] [PATCH 2/3] vnc: correct missing property about vnc_display arei.gonglei
2015-01-29 12:52 ` [Qemu-devel] [PATCH 3/3] vnc: using bool type instead of int for QEMU_OPT_BOOL arei.gonglei
2015-01-29 16:10 ` [Qemu-devel] [PATCH 0/3] fix qemu crash about vnc Don Slutz
2015-01-30 0:36 ` Gonglei
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.