From: Gerhard Wiesinger <lists@wiesinger.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC
Date: Fri, 09 Nov 2012 08:13:58 +0100 [thread overview]
Message-ID: <509CAD36.1070800@wiesinger.com> (raw)
In-Reply-To: <509C1F16.2090808@redhat.com>
On 08.11.2012 22:07, Gerd Hoffmann wrote:
> Hi,
>
>> I think this is fixing this at the wrong level. Either we
>> should require that drivers (in this case vmware_vga.c)
>> must not call dpy_gfx_update() with out of range values,
>> or we should do the clipping in the console.c layer, but
>> I don't think requiring every UI backend to clip is the
>> right thing. Anthony?
> Agree. IMHO vmware_vga.c is at fault here and should be fixed. We can
> add some asserts to console.[ch] to enforce this ...
>
Regarding fail safe programming I think it should be fixed/handled in
both modules:
vmware_vga.c should not trigger wrong values but also other modules
should verify or even correct there input parameters.
(think of situations where bits might not be accurate due to CPU bugs or
even QEMU/KVM in aerospace where
bits fall to other states due to high energy cosmic ray).
Best solution is IHMO for vnc.c:
1.) Log the problem (that other modules can be fixed, too).
2.) Fix parameters (so that program doesn't crash)
In mission critical software application like aerospace, airplanes,
cars, etc. (e.g. where people might get unhealthy) handling such
situations where input parameters aren't as expected is a must.
See:
https://en.wikipedia.org/wiki/Fail-safe
https://en.wikipedia.org/wiki/Cosmic_ray#Effect_on_electronics
https://en.wikipedia.org/wiki/Radiation_hardening
Precondition:
https://en.wikipedia.org/wiki/Eiffel_%28programming_language%29#Design_by_Contract
Ciao,
Gerhard
next prev parent reply other threads:[~2012-11-09 7:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-01 20:06 [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC Gerhard Wiesinger
2012-11-04 10:28 ` Gerhard Wiesinger
2012-11-08 18:53 ` Gerhard Wiesinger
2012-11-08 19:09 ` Peter Maydell
2012-11-08 21:07 ` Gerd Hoffmann
2012-11-08 23:55 ` BALATON Zoltan
2012-11-09 9:00 ` Michael Tokarev
2012-11-09 9:06 ` Michael Tokarev
2012-11-09 7:13 ` Gerhard Wiesinger [this message]
2012-11-09 7:18 ` Peter Maydell
2012-11-09 9:42 ` Anthony Liguori
2012-11-09 9:50 ` Peter Maydell
2012-11-09 13:31 ` Gerd Hoffmann
2012-11-09 23:45 ` Marek Vasut
2012-11-09 23:52 ` Peter Maydell
2012-11-10 7:45 ` Gerhard Wiesinger
2012-11-10 16:54 ` Marek Vasut
2012-11-12 9:38 ` Gerd Hoffmann
2012-11-12 9:33 ` Gerd Hoffmann
2012-11-12 11:45 ` BALATON Zoltan
2012-11-10 13:47 ` Blue Swirl
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=509CAD36.1070800@wiesinger.com \
--to=lists@wiesinger.com \
--cc=aliguori@us.ibm.com \
--cc=kraxel@redhat.com \
--cc=peter.maydell@linaro.org \
--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 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).