From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH v2 06/26] qemu-keymap: properly check return from xkb_keymap_mod_get_index
Date: Tue, 27 Jun 2023 10:56:08 +0100 [thread overview]
Message-ID: <87v8f91b4f.fsf@linaro.org> (raw)
In-Reply-To: <32624588-a714-6317-77e3-39ce7cdaa8db@linaro.org>
Richard Henderson <richard.henderson@linaro.org> writes:
> On 6/26/23 23:59, Alex Bennée wrote:
>> We can return XKB_MOD_INVALID which rightly gets flagged by sanitisers
>> as an overly wide shift attempt.
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> qemu-keymap.c | 24 ++++++++++++++++--------
>> 1 file changed, 16 insertions(+), 8 deletions(-)
>> diff --git a/qemu-keymap.c b/qemu-keymap.c
>> index 229866e004..8c80f7a4ed 100644
>> --- a/qemu-keymap.c
>> +++ b/qemu-keymap.c
>> @@ -140,6 +140,18 @@ static void usage(FILE *out)
>> names.options ?: "-");
>> }
>> +static xkb_mod_mask_t get_mod(struct xkb_keymap *map, const char
>> *name)
>> +{
>> + xkb_mod_index_t mod;
>> + xkb_mod_mask_t mask = 0;
>> +
>> + mod = xkb_keymap_mod_get_index(map, name);
>> + if (mod != XKB_MOD_INVALID) {
>> + mask = (1 << mod);
>> + }
>> + return mask;
>> +}
>
> You have yet to answer Peter's question -- asked twice -- about what
> changes in the keymaps with this. If nothing, should it in fact be an
> assert instead?
Ahh in the other thread. No change, it looks like AltGr just doesn't
exist for some keymaps:
🕙21:20:36 alex@zen:qemu.git/builds/all (399fc0c) (REBASING 2/22) [$!?]
➜ diff -ub gb.before gb.after
🕙21:20:43 alex@zen:qemu.git/builds/all (399fc0c) (REBASING 2/22) [$!?]
➜ diff -ub ara.before ara.after
🕙21:20:50 alex@zen:qemu.git/builds/all (399fc0c) (REBASING 2/22) [$!?]
➜ ag "Alt" ara.after
21:# 9: Alt
23:# 11: LAlt
24:# 12: RAlt
29:# 17: AltGr
294:Alt_L 0x38
1711:Alt_R 0xb8
🕙21:22:14 alex@zen:qemu.git/builds/all (399fc0c) (REBASING 2/22) [$!?]
➜ ag "Alt" gb.after
21:# 9: Alt
23:# 11: LAlt
24:# 12: RAlt
29:# 17: AltGr
338:Alt_L 0x38
1757:Alt_R 0xb8
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2023-06-27 9:57 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 21:59 [PATCH v2 00/26] maintainer omnibus: testing, fuzz, plugins, documentation Alex Bennée
2023-06-26 21:59 ` [PATCH v2 01/26] gitlab: explicit set artifacts publishing criteria Alex Bennée
2023-06-26 21:59 ` [PATCH v2 02/26] gitlab: ensure coverage job also publishes meson log Alex Bennée
2023-06-26 21:59 ` [PATCH v2 03/26] gitlab: reduce testing scope of check-gcov Alex Bennée
2023-06-26 21:59 ` [PATCH v2 04/26] docs/devel: remind developers to run CI container pipeline when updating images Alex Bennée
2023-06-26 21:59 ` [PATCH v2 05/26] tests/tcg: add mechanism to handle plugin arguments Alex Bennée
2023-06-26 21:59 ` [PATCH v2 06/26] qemu-keymap: properly check return from xkb_keymap_mod_get_index Alex Bennée
2023-06-27 6:50 ` Thomas Huth
2023-06-27 6:55 ` Richard Henderson
2023-06-27 9:56 ` Alex Bennée [this message]
2023-06-27 10:26 ` Peter Maydell
2023-06-27 11:10 ` Alex Bennée
2023-06-26 21:59 ` [PATCH v2 07/26] scripts/oss-fuzz: add a suppression for keymap Alex Bennée
2023-06-26 21:59 ` [PATCH v2 08/26] tests/qtests: clean-up and fix leak in generic_fuzz Alex Bennée
2023-06-27 7:43 ` Juan Quintela
2023-06-27 8:53 ` Philippe Mathieu-Daudé
2023-06-27 9:57 ` Alex Bennée
2023-06-27 7:54 ` Alexander Bulekov
2023-06-26 21:59 ` [PATCH v2 09/26] tests/docker: add test-fuzz Alex Bennée
2023-06-27 9:18 ` Alexander Bulekov
2023-06-26 21:59 ` [PATCH v2 10/26] Makefile: add lcitool-refresh to UNCHECKED_GOALS Alex Bennée
2023-06-26 21:59 ` [PATCH v2 11/26] tests/lcitool: update to latest version Alex Bennée
2023-06-26 21:59 ` [PATCH v2 12/26] tests/lcitool: Bump fedora container versions Alex Bennée
2023-06-26 21:59 ` [PATCH v2 13/26] tests/lcitool: add an explicit gcc-native package Alex Bennée
2023-06-26 21:59 ` [PATCH v2 14/26] tests/lcitool: introduce qemu-minimal Alex Bennée
2023-06-26 21:59 ` [PATCH v2 15/26] tests/docker: convert riscv64-cross to lcitool Alex Bennée
2023-06-26 21:59 ` [PATCH v2 16/26] tests/avocado: update firmware to enable sbsa-ref/max Alex Bennée
2023-06-26 21:59 ` [PATCH v2 17/26] plugins: force slow path when plugins instrument memory ops Alex Bennée
2023-06-26 21:59 ` [PATCH v2 18/26] plugins: fix memory leak while parsing options Alex Bennée
2023-06-26 21:59 ` [PATCH v2 19/26] plugins: update lockstep to use g_memdup2 Alex Bennée
2023-06-26 21:59 ` [PATCH v2 20/26] docs/devel: add some front matter to the devel index Alex Bennée
2023-06-26 21:59 ` [PATCH v2 21/26] include/migration: mark vmstate_register() as a legacy function Alex Bennée
2023-06-26 21:59 ` [PATCH v2 22/26] include/hw/qdev-core: fixup kerneldoc annotations Alex Bennée
2023-06-26 21:59 ` [PATCH v2 23/26] docs/devel/qom.rst: Correct code style Alex Bennée
2023-06-26 21:59 ` [PATCH v2 24/26] docs/devel: split qom-api reference into new file Alex Bennée
2023-06-26 21:59 ` [PATCH v2 25/26] docs/devel: introduce some key concepts for QOM development Alex Bennée
2023-06-26 21:59 ` [PATCH v2 26/26] tests/plugin: Remove duplicate insn log from libinsn.so Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8f91b4f.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.