All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/2] qemu-ga patch queue for 4.2-rc0
@ 2019-11-04 17:30 Michael Roth
  2019-11-04 17:30 ` [PULL 1/2] qga-win: network-get-interfaces command name field bug fix Michael Roth
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Roth @ 2019-11-04 17:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

The following changes since commit 36609b4fa36f0ac934874371874416f7533a5408:

  Merge remote-tracking branch 'remotes/palmer/tags/palmer-for-master-4.2-sf1' into staging (2019-11-02 17:59:03 +0000)

are available in the Git repository at:

  git://github.com/mdroth/qemu.git tags/qga-pull-2019-11-04-tag

for you to fetch changes up to 28d8dd355be98da6239bd5569721980c833df6a1:

  qga: Add "guest-get-memory-block-info" to blacklist (2019-11-04 08:50:54 -0600)

----------------------------------------------------------------
qemu-ga patch queue for hard-freeze

* fix handling of Chinese network device names in
  guest-network-get-interfaces
* add missing blacklist entries for guest-get-memory-block-info for
  w32/non-linux builds

----------------------------------------------------------------
Basil Salman (1):
      qga: Add "guest-get-memory-block-info" to blacklist

Bishara AbuHattoum (1):
      qga-win: network-get-interfaces command name field bug fix

 qga/commands-posix.c |  3 ++-
 qga/commands-win32.c | 12 ++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)




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

* [PULL 1/2] qga-win: network-get-interfaces command name field bug fix
  2019-11-04 17:30 [PULL 0/2] qemu-ga patch queue for 4.2-rc0 Michael Roth
@ 2019-11-04 17:30 ` Michael Roth
  2019-11-04 17:30 ` [PULL 2/2] qga: Add "guest-get-memory-block-info" to blacklist Michael Roth
  2019-11-06 13:36 ` [PULL 0/2] qemu-ga patch queue for 4.2-rc0 Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Roth @ 2019-11-04 17:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Bishara AbuHattoum, peter.maydell, qemu-stable

From: Bishara AbuHattoum <bishara@daynix.com>

Network interface name is fetched as an encoded WCHAR array, (wide
character), then it is decoded using the guest's CP_ACP Windows code
page, which is the default code page as configure in the guest's
Windows, then it is returned as a byte array, (char array).

As stated in the BZ#1733165, when renaming a network interface to a
Chinese name and invoking this command, the returned name field has
the (\ufffd) value for each Chinese character the name had, this
value is an indication that the code page does not have the decoding
information for the given character.

This bug is a result of using the CP_ACP code page for decoding which
is an interchangeable code page, instead CP_UTF8 code page should be
used for decoding the network interface's name.

https://bugzilla.redhat.com/show_bug.cgi?id=1733165

Signed-off-by: Bishara AbuHattoum <bishara@daynix.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qga/commands-win32.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 6b67f16faf..64b1c754b0 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -1387,12 +1387,12 @@ static IP_ADAPTER_ADDRESSES *guest_get_adapters_addresses(Error **errp)
 static char *guest_wctomb_dup(WCHAR *wstr)
 {
     char *str;
-    size_t i;
+    size_t str_size;
 
-    i = wcslen(wstr) + 1;
-    str = g_malloc(i);
-    WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK,
-                        wstr, -1, str, i, NULL, NULL);
+    str_size = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
+    /* add 1 to str_size for NULL terminator */
+    str = g_malloc(str_size + 1);
+    WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, str_size, NULL, NULL);
     return str;
 }
 
-- 
2.17.1



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

* [PULL 2/2] qga: Add "guest-get-memory-block-info" to blacklist
  2019-11-04 17:30 [PULL 0/2] qemu-ga patch queue for 4.2-rc0 Michael Roth
  2019-11-04 17:30 ` [PULL 1/2] qga-win: network-get-interfaces command name field bug fix Michael Roth
@ 2019-11-04 17:30 ` Michael Roth
  2019-11-06 13:36 ` [PULL 0/2] qemu-ga patch queue for 4.2-rc0 Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Roth @ 2019-11-04 17:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Basil Salman

From: Basil Salman <bsalman@redhat.com>

Memory block commands are only supported for linux with sysfs,
"guest-get-memory-block-info" was not in blacklist for other
cases.

Reported on:
https://bugzilla.redhat.com/show_bug.cgi?id=1751431

Signed-off-by: Basil Salman <bsalman@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qga/commands-posix.c | 3 ++-
 qga/commands-win32.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index dfc05f5b8a..1c1a165dae 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -2730,7 +2730,8 @@ GList *ga_command_blacklist_init(GList *blacklist)
             "guest-suspend-hybrid", "guest-network-get-interfaces",
             "guest-get-vcpus", "guest-set-vcpus",
             "guest-get-memory-blocks", "guest-set-memory-blocks",
-            "guest-get-memory-block-size", NULL};
+            "guest-get-memory-block-size", "guest-get-memory-block-info",
+            NULL};
         char **p = (char **)list;
 
         while (*p) {
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 64b1c754b0..55ba5b263a 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -1894,7 +1894,7 @@ GList *ga_command_blacklist_init(GList *blacklist)
         "guest-suspend-hybrid",
         "guest-set-vcpus",
         "guest-get-memory-blocks", "guest-set-memory-blocks",
-        "guest-get-memory-block-size",
+        "guest-get-memory-block-size", "guest-get-memory-block-info",
         NULL};
     char **p = (char **)list_unsupported;
 
-- 
2.17.1



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

* Re: [PULL 0/2] qemu-ga patch queue for 4.2-rc0
  2019-11-04 17:30 [PULL 0/2] qemu-ga patch queue for 4.2-rc0 Michael Roth
  2019-11-04 17:30 ` [PULL 1/2] qga-win: network-get-interfaces command name field bug fix Michael Roth
  2019-11-04 17:30 ` [PULL 2/2] qga: Add "guest-get-memory-block-info" to blacklist Michael Roth
@ 2019-11-06 13:36 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2019-11-06 13:36 UTC (permalink / raw)
  To: Michael Roth; +Cc: QEMU Developers

On Mon, 4 Nov 2019 at 17:30, Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
>
> The following changes since commit 36609b4fa36f0ac934874371874416f7533a5408:
>
>   Merge remote-tracking branch 'remotes/palmer/tags/palmer-for-master-4.2-sf1' into staging (2019-11-02 17:59:03 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/mdroth/qemu.git tags/qga-pull-2019-11-04-tag
>
> for you to fetch changes up to 28d8dd355be98da6239bd5569721980c833df6a1:
>
>   qga: Add "guest-get-memory-block-info" to blacklist (2019-11-04 08:50:54 -0600)
>
> ----------------------------------------------------------------
> qemu-ga patch queue for hard-freeze
>
> * fix handling of Chinese network device names in
>   guest-network-get-interfaces
> * add missing blacklist entries for guest-get-memory-block-info for
>   w32/non-linux builds
>
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.

-- PMM


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

end of thread, other threads:[~2019-11-06 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-04 17:30 [PULL 0/2] qemu-ga patch queue for 4.2-rc0 Michael Roth
2019-11-04 17:30 ` [PULL 1/2] qga-win: network-get-interfaces command name field bug fix Michael Roth
2019-11-04 17:30 ` [PULL 2/2] qga: Add "guest-get-memory-block-info" to blacklist Michael Roth
2019-11-06 13:36 ` [PULL 0/2] qemu-ga patch queue for 4.2-rc0 Peter Maydell

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.