From: Markus Armbruster <armbru@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, Huawei PSIRT <PSIRT@huawei.com>,
P J P <ppandit@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] input: limit kbd queue depth
Date: Fri, 28 Apr 2017 14:27:39 +0200 [thread overview]
Message-ID: <87h918iuo4.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20170428084237.23960-1-kraxel@redhat.com> (Gerd Hoffmann's message of "Fri, 28 Apr 2017 10:42:37 +0200")
Gerd Hoffmann <kraxel@redhat.com> writes:
> Apply a limit to the number of items we accept into the keyboard queue.
>
> Impact: Without this limit vnc clients can exhaust host memory by
> sending keyboard events faster than qemu feeds them to the guest.
>
> Cc: P J P <ppandit@redhat.com>
> Cc: Huawei PSIRT <PSIRT@huawei.com>
> Reported-by: jiangxin1@huawei.com
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> ui/input.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/ui/input.c b/ui/input.c
> index ed88cda6d6..fb1f404095 100644
> --- a/ui/input.c
> +++ b/ui/input.c
> @@ -41,6 +41,8 @@ static QTAILQ_HEAD(QemuInputEventQueueHead, QemuInputEventQueue) kbd_queue =
> QTAILQ_HEAD_INITIALIZER(kbd_queue);
> static QEMUTimer *kbd_timer;
> static uint32_t kbd_default_delay_ms = 10;
> +static uint32_t queue_count;
> +static uint32_t queue_limit = 1024;
Drive-by comment, feel free to ignore: I'd be tempted to lower the limit
to something comparable to actual hardware, then dumb down the queue to
an array.
[...]
next prev parent reply other threads:[~2017-04-28 12:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 8:42 [Qemu-devel] [PATCH] input: limit kbd queue depth Gerd Hoffmann
2017-04-28 8:49 ` Daniel P. Berrange
2017-04-28 9:05 ` Gerd Hoffmann
2017-04-28 9:09 ` P J P
2017-04-28 12:27 ` Markus Armbruster [this message]
2017-05-02 7:12 ` Gerd Hoffmann
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=87h918iuo4.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=PSIRT@huawei.com \
--cc=kraxel@redhat.com \
--cc=ppandit@redhat.com \
--cc=qemu-devel@nongnu.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.