From: Gerd Hoffmann <kraxel@redhat.com>
To: Rick Koshi <kvm@more-right-rudder.com>
Cc: kvm@vger.kernel.org
Subject: Re: building vgabios-stdvga.bin
Date: Tue, 20 Dec 2011 16:37:03 +0100 [thread overview]
Message-ID: <4EF0AB9F.5040403@redhat.com> (raw)
In-Reply-To: <201112201500.pBKF0mDY005298@hope.more-right-rudder.com>
[-- Attachment #1: Type: text/plain, Size: 593 bytes --]
Hi,
> I don't know if this is the right place to make this suggestion,
> but it would be nice if this version could make it into the
> qemu-kvm distribution.
> Do you know what the real constraints are? Do you know if they're
> imposed by the vgabios driver, the VNC module, or the guest
> operating system (Windows 7 in this case)?
vnc works with 16x16 internally, so a multiple of 16 should be fine.
Reminds me of a bug, I've trapped into this before, digging ...
Patch attached. Seems to be still not applied, has been on the
qemu-devel list several times already :-(
HTH,
Gerd
[-- Attachment #2: vnc.diff --]
[-- Type: text/plain, Size: 1213 bytes --]
commit a22fe41d90d484a68317e0ac46785611afab545f
Author: Gerd Hoffmann <kraxel@redhat.com>
Date: Mon Jun 14 12:28:23 2010 +0200
Fix vnc memory corruption with width = 1400
vnc assumes that the screen width is a multiple of 16 in several places.
If this is not the case vnc will overrun buffers, corrupt memory, make
qemu crash.
This is the minimum fix for this bug. It makes sure we don't overrun the
scanline, thereby fixing the segfault. The rendering is *not* correct
though, there is a black border at the right side of the screen, 8
pixels wide because 1400 % 16 == 8.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
diff --git a/ui/vnc.c b/ui/vnc.c
index e85ee66..afbf82c 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2445,7 +2445,7 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
guest_ptr = guest_row;
server_ptr = server_row;
- for (x = 0; x < vd->guest.ds->width;
+ for (x = 0; x + 15 < vd->guest.ds->width;
x += 16, guest_ptr += cmp_bytes, server_ptr += cmp_bytes) {
if (!test_and_clear_bit((x / 16), vd->guest.dirty[y]))
continue;
next prev parent reply other threads:[~2011-12-20 15:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-20 15:00 building vgabios-stdvga.bin Rick Koshi
2011-12-20 15:37 ` Gerd Hoffmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-12-19 18:06 Building vgabios-stdvga.bin Rick Koshi
2011-12-20 7:46 ` 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=4EF0AB9F.5040403@redhat.com \
--to=kraxel@redhat.com \
--cc=kvm@more-right-rudder.com \
--cc=kvm@vger.kernel.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 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).