qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/3] Misc next patches
@ 2022-04-26 15:13 Daniel P. Berrangé
  2022-04-26 20:12 ` Richard Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel P. Berrangé @ 2022-04-26 15:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Daniel P. Berrangé, Beraldo Leal, libvir-list,
	Philippe Mathieu-Daudé, Wainer dos Santos Moschetta,
	Gerd Hoffmann, Marc-André Lureau, Paolo Bonzini,
	Alex Bennée

The following changes since commit a1755db71e34df016ffc10aa0727360aae2c6036:

  Merge tag 'pull-block-2022-04-25' of https://gitlab.com/hreitz/qemu into staging (2022-04-25 13:35:41 -0700)

are available in the Git repository at:

  https://gitlab.com/berrange/qemu tags/misc-next-pull-request

for you to fetch changes up to 5cf434b5af386fadc3418df71d3738676cbb0549:

  github: fix config mistake preventing repo lockdown commenting (2022-04-26 16:12:26 +0100)

----------------------------------------------------------------
Misc patch queue

* Removes depecated --enable-fips QEMU system emulator option
* Fixes array bounds check in keycode conversion for ESCC device

----------------------------------------------------------------

Daniel P. Berrangé (3):
  softmmu: remove deprecated --enable-fips option
  hw/char: fix qcode array bounds check in ESCC impl
  github: fix config mistake preventing repo lockdown commenting

 .github/workflows/lockdown.yml  |  6 +++---
 docs/about/deprecated.rst       | 12 ------------
 docs/about/removed-features.rst | 11 +++++++++++
 hw/char/escc.c                  |  2 +-
 include/qemu/osdep.h            |  3 ---
 os-posix.c                      |  8 --------
 qemu-options.hx                 | 10 ----------
 ui/vnc.c                        |  7 -------
 util/osdep.c                    | 28 ----------------------------
 9 files changed, 15 insertions(+), 72 deletions(-)

-- 
2.35.1




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

* Re: [PULL 0/3] Misc next patches
  2022-04-26 15:13 Daniel P. Berrangé
@ 2022-04-26 20:12 ` Richard Henderson
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2022-04-26 20:12 UTC (permalink / raw)
  To: Daniel P. Berrangé, qemu-devel
  Cc: Thomas Huth, Beraldo Leal, libvir-list,
	Philippe Mathieu-Daudé, Wainer dos Santos Moschetta,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau,
	Alex Bennée

On 4/26/22 08:13, Daniel P. Berrangé wrote:
> The following changes since commit a1755db71e34df016ffc10aa0727360aae2c6036:
> 
>    Merge tag 'pull-block-2022-04-25' of https://gitlab.com/hreitz/qemu into staging (2022-04-25 13:35:41 -0700)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/berrange/qemu tags/misc-next-pull-request
> 
> for you to fetch changes up to 5cf434b5af386fadc3418df71d3738676cbb0549:
> 
>    github: fix config mistake preventing repo lockdown commenting (2022-04-26 16:12:26 +0100)
> 
> ----------------------------------------------------------------
> Misc patch queue
> 
> * Removes depecated --enable-fips QEMU system emulator option
> * Fixes array bounds check in keycode conversion for ESCC device

Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.


r~



> 
> ----------------------------------------------------------------
> 
> Daniel P. Berrangé (3):
>    softmmu: remove deprecated --enable-fips option
>    hw/char: fix qcode array bounds check in ESCC impl
>    github: fix config mistake preventing repo lockdown commenting
> 
>   .github/workflows/lockdown.yml  |  6 +++---
>   docs/about/deprecated.rst       | 12 ------------
>   docs/about/removed-features.rst | 11 +++++++++++
>   hw/char/escc.c                  |  2 +-
>   include/qemu/osdep.h            |  3 ---
>   os-posix.c                      |  8 --------
>   qemu-options.hx                 | 10 ----------
>   ui/vnc.c                        |  7 -------
>   util/osdep.c                    | 28 ----------------------------
>   9 files changed, 15 insertions(+), 72 deletions(-)
> 



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

* [PULL 0/3] Misc next patches
@ 2023-03-14 16:25 Daniel P. Berrangé
  2023-03-14 16:25 ` [PULL 1/3] Add qemu qcode support for keys F13 to F24 Daniel P. Berrangé
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2023-03-14 16:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marc-André Lureau, Peter Lieven, Hanna Reitz,
	Daniel P. Berrangé, Gerd Hoffmann, Ronnie Sahlberg,
	qemu-block, libvir-list, Paolo Bonzini, Kevin Wolf,
	Markus Armbruster, Eric Blake

The following changes since commit 5cfda4ce79dd455f1726874a555260a70f84b2ec:

  Merge tag 'pull-request-2023-03-13' of https://gitlab.com/thuth/qemu into staging (2023-03-13 17:09:33 +0000)

are available in the Git repository at:

  https://gitlab.com/berrange/qemu tags/misc-next-pull-request

for you to fetch changes up to c3a2c84ae3c1d5483ec30731321a674797dc5203:

  io/channel-tls: plug memory leakage on GSource (2023-03-14 13:41:21 +0000)

----------------------------------------------------------------
Miscellaneous fixes

 * Avoid memory leak in TLS GSource usage
 * Avoid sending key releases for lang1/lang2 keys in ps2 keyboard
 * Add missing key name constants for F13-F24 keys

----------------------------------------------------------------

Matheus Tavares Bernardino (1):
  io/channel-tls: plug memory leakage on GSource

Ross Lagerwall (1):
  ps2: Don't send key release event for Lang1, Lang2 keys

Willem van de Velde (1):
  Add qemu qcode support for keys F13 to F24

 hw/input/ps2.c   |  6 ++++++
 io/channel-tls.c |  1 +
 qapi/ui.json     | 15 ++++++++++++++-
 ui/keycodemapdb  |  2 +-
 4 files changed, 22 insertions(+), 2 deletions(-)

-- 
2.39.2



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

* [PULL 1/3] Add qemu qcode support for keys F13 to F24
  2023-03-14 16:25 [PULL 0/3] Misc next patches Daniel P. Berrangé
@ 2023-03-14 16:25 ` Daniel P. Berrangé
  2023-03-14 16:25 ` [PULL 2/3] ps2: Don't send key release event for Lang1, Lang2 keys Daniel P. Berrangé
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2023-03-14 16:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marc-André Lureau, Peter Lieven, Hanna Reitz,
	Daniel P. Berrangé, Gerd Hoffmann, Ronnie Sahlberg,
	qemu-block, libvir-list, Paolo Bonzini, Kevin Wolf,
	Markus Armbruster, Eric Blake, Willem van de Velde

From: Willem van de Velde <williamvdvelde@gmail.com>

To be able to use the function keys F13 to F24 these should be defined in de keycodemapdb and added to the qapi.
The keycodemapdb is updated in its own repository, this patch enables the use of those keys within qemu.

Signed-off-by: Willem van de Velde <williamvdvelde@gmail.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 qapi/ui.json    | 15 ++++++++++++++-
 ui/keycodemapdb |  2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/qapi/ui.json b/qapi/ui.json
index 0abba3e930..98322342f7 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -886,6 +886,19 @@
 # @lang1: since 6.1
 # @lang2: since 6.1
 #
+# @f13: since 8.0
+# @f14: since 8.0
+# @f15: since 8.0
+# @f16: since 8.0
+# @f17: since 8.0
+# @f18: since 8.0
+# @f19: since 8.0
+# @f20: since 8.0
+# @f21: since 8.0
+# @f22: since 8.0
+# @f23: since 8.0
+# @f24: since 8.0
+#
 # 'sysrq' was mistakenly added to hack around the fact that
 # the ps2 driver was not generating correct scancodes sequences
 # when 'alt+print' was pressed. This flaw is now fixed and the
@@ -918,7 +931,7 @@
             'volumeup', 'volumedown', 'mediaselect',
             'mail', 'calculator', 'computer',
             'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks',
-            'lang1', 'lang2' ] }
+            'lang1', 'lang2','f13','f14','f15','f16','f17','f18','f19','f20','f21','f22','f23','f24' ] }
 
 ##
 # @KeyValueKind:
diff --git a/ui/keycodemapdb b/ui/keycodemapdb
index d21009b1c9..f5772a62ec 160000
--- a/ui/keycodemapdb
+++ b/ui/keycodemapdb
@@ -1 +1 @@
-Subproject commit d21009b1c9f94b740ea66be8e48a1d8ad8124023
+Subproject commit f5772a62ec52591ff6870b7e8ef32482371f22c6
-- 
2.39.2



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

* [PULL 2/3] ps2: Don't send key release event for Lang1, Lang2 keys
  2023-03-14 16:25 [PULL 0/3] Misc next patches Daniel P. Berrangé
  2023-03-14 16:25 ` [PULL 1/3] Add qemu qcode support for keys F13 to F24 Daniel P. Berrangé
@ 2023-03-14 16:25 ` Daniel P. Berrangé
  2023-03-14 16:25 ` [PULL 3/3] io/channel-tls: plug memory leakage on GSource Daniel P. Berrangé
  2023-03-16  9:25 ` [PULL 0/3] Misc next patches Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2023-03-14 16:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marc-André Lureau, Peter Lieven, Hanna Reitz,
	Daniel P. Berrangé, Gerd Hoffmann, Ronnie Sahlberg,
	qemu-block, libvir-list, Paolo Bonzini, Kevin Wolf,
	Markus Armbruster, Eric Blake, Ross Lagerwall

From: Ross Lagerwall <ross.lagerwall@citrix.com>

The scancodes for the Lang1 and Lang2 keys (i.e. Hangeul, Hanja) are
special since they already have the 0x80 bit set which is commonly used
to indicate a key release in AT set 1. Reportedly, real hardware does
not send a key release scancode. So, skip sending a release for these
keys. This ensures that Windows behaves correctly and interprets it as a
single keypress rather than two consecutive keypresses.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 hw/input/ps2.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 3253ab6a92..45af76a837 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -402,6 +402,9 @@ static void ps2_keyboard_event(DeviceState *dev, QemuConsole *src,
                     ps2_put_keycode(s, 0xaa);
                 }
             }
+        } else if ((qcode == Q_KEY_CODE_LANG1 || qcode == Q_KEY_CODE_LANG2)
+                   && !key->down) {
+            /* Ignore release for these keys */
         } else {
             if (qcode < qemu_input_map_qcode_to_atset1_len) {
                 keycode = qemu_input_map_qcode_to_atset1[qcode];
@@ -497,6 +500,9 @@ static void ps2_keyboard_event(DeviceState *dev, QemuConsole *src,
                     ps2_put_keycode(s, 0x12);
                 }
             }
+        } else if ((qcode == Q_KEY_CODE_LANG1 || qcode == Q_KEY_CODE_LANG2) &&
+                   !key->down) {
+            /* Ignore release for these keys */
         } else {
             if (qcode < qemu_input_map_qcode_to_atset2_len) {
                 keycode = qemu_input_map_qcode_to_atset2[qcode];
-- 
2.39.2



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

* [PULL 3/3] io/channel-tls: plug memory leakage on GSource
  2023-03-14 16:25 [PULL 0/3] Misc next patches Daniel P. Berrangé
  2023-03-14 16:25 ` [PULL 1/3] Add qemu qcode support for keys F13 to F24 Daniel P. Berrangé
  2023-03-14 16:25 ` [PULL 2/3] ps2: Don't send key release event for Lang1, Lang2 keys Daniel P. Berrangé
@ 2023-03-14 16:25 ` Daniel P. Berrangé
  2023-03-16  9:25 ` [PULL 0/3] Misc next patches Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2023-03-14 16:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marc-André Lureau, Peter Lieven, Hanna Reitz,
	Daniel P. Berrangé, Gerd Hoffmann, Ronnie Sahlberg,
	qemu-block, libvir-list, Paolo Bonzini, Kevin Wolf,
	Markus Armbruster, Eric Blake, Matheus Tavares Bernardino,
	Philippe Mathieu-Daudé

From: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>

This leakage can be seen through test-io-channel-tls:

$ ../configure --target-list=aarch64-softmmu --enable-sanitizers
$ make ./tests/unit/test-io-channel-tls
$ ./tests/unit/test-io-channel-tls

Indirect leak of 104 byte(s) in 1 object(s) allocated from:
    #0 0x7f81d1725808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
    #1 0x7f81d135ae98 in g_malloc (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x57e98)
    #2 0x55616c5d4c1b in object_new_with_propv ../qom/object.c:795
    #3 0x55616c5d4a83 in object_new_with_props ../qom/object.c:768
    #4 0x55616c5c5415 in test_tls_creds_create ../tests/unit/test-io-channel-tls.c:70
    #5 0x55616c5c5a6b in test_io_channel_tls ../tests/unit/test-io-channel-tls.c:158
    #6 0x7f81d137d58d  (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x7a58d)

Indirect leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f81d1725a06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153
    #1 0x7f81d1472a20 in gnutls_dh_params_init (/lib/x86_64-linux-gnu/libgnutls.so.30+0x46a20)
    #2 0x55616c6485ff in qcrypto_tls_creds_x509_load ../crypto/tlscredsx509.c:634
    #3 0x55616c648ba2 in qcrypto_tls_creds_x509_complete ../crypto/tlscredsx509.c:694
    #4 0x55616c5e1fea in user_creatable_complete ../qom/object_interfaces.c:28
    #5 0x55616c5d4c8c in object_new_with_propv ../qom/object.c:807
    #6 0x55616c5d4a83 in object_new_with_props ../qom/object.c:768
    #7 0x55616c5c5415 in test_tls_creds_create ../tests/unit/test-io-channel-tls.c:70
    #8 0x55616c5c5a6b in test_io_channel_tls ../tests/unit/test-io-channel-tls.c:158
    #9 0x7f81d137d58d  (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x7a58d)

...

SUMMARY: AddressSanitizer: 49143 byte(s) leaked in 184 allocation(s).

The docs for `g_source_add_child_source(source, child_source)` says
"source will hold a reference on child_source while child_source is
attached to it." Therefore, we should unreference the child source at
`qio_channel_tls_read_watch()` after attaching it to `source`. With this
change, ./tests/unit/test-io-channel-tls shows no leakages.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 io/channel-tls.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/io/channel-tls.c b/io/channel-tls.c
index 8052945ba0..5a7a3d48d6 100644
--- a/io/channel-tls.c
+++ b/io/channel-tls.c
@@ -446,6 +446,7 @@ qio_channel_tls_read_watch(QIOChannelTLS *tioc, GSource *source)
     object_ref(OBJECT(tioc));
 
     g_source_add_child_source(source, child);
+    g_source_unref(child);
 }
 
 static GSource *qio_channel_tls_create_watch(QIOChannel *ioc,
-- 
2.39.2



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

* Re: [PULL 0/3] Misc next patches
  2023-03-14 16:25 [PULL 0/3] Misc next patches Daniel P. Berrangé
                   ` (2 preceding siblings ...)
  2023-03-14 16:25 ` [PULL 3/3] io/channel-tls: plug memory leakage on GSource Daniel P. Berrangé
@ 2023-03-16  9:25 ` Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2023-03-16  9:25 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: qemu-devel, Marc-André Lureau, Peter Lieven, Hanna Reitz,
	Gerd Hoffmann, Ronnie Sahlberg, qemu-block, libvir-list,
	Paolo Bonzini, Kevin Wolf, Markus Armbruster, Eric Blake

On Tue, 14 Mar 2023 at 16:26, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> The following changes since commit 5cfda4ce79dd455f1726874a555260a70f84b2ec:
>
>   Merge tag 'pull-request-2023-03-13' of https://gitlab.com/thuth/qemu into staging (2023-03-13 17:09:33 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/berrange/qemu tags/misc-next-pull-request
>
> for you to fetch changes up to c3a2c84ae3c1d5483ec30731321a674797dc5203:
>
>   io/channel-tls: plug memory leakage on GSource (2023-03-14 13:41:21 +0000)
>
> ----------------------------------------------------------------
> Miscellaneous fixes
>
>  * Avoid memory leak in TLS GSource usage
>  * Avoid sending key releases for lang1/lang2 keys in ps2 keyboard
>  * Add missing key name constants for F13-F24 keys


Applied, thanks.

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

-- PMM


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

end of thread, other threads:[~2023-03-16  9:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-14 16:25 [PULL 0/3] Misc next patches Daniel P. Berrangé
2023-03-14 16:25 ` [PULL 1/3] Add qemu qcode support for keys F13 to F24 Daniel P. Berrangé
2023-03-14 16:25 ` [PULL 2/3] ps2: Don't send key release event for Lang1, Lang2 keys Daniel P. Berrangé
2023-03-14 16:25 ` [PULL 3/3] io/channel-tls: plug memory leakage on GSource Daniel P. Berrangé
2023-03-16  9:25 ` [PULL 0/3] Misc next patches Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2022-04-26 15:13 Daniel P. Berrangé
2022-04-26 20:12 ` Richard Henderson

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