qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Sebastian Herbszt" <herbszt@gmx.de>
To: qemu-devel@nongnu.org, Jamie Lokier <jamie@shareable.org>
Cc: Gleb Natapov <gleb@qumranet.com>, Chris Lalancette <clalance@redhat.com>
Subject: [Qemu-devel] Re: Re: [PATCH 0/3]: Add UUID command-line option
Date: Thu, 31 Jul 2008 21:45:41 +0200	[thread overview]
Message-ID: <02e701c8f346$5cb38bb0$0201a8c0@zeug> (raw)
In-Reply-To: 20080728154849.GA13000@shareable.org

Jamie Lokier wrote:
>> >void uuid_probe(void)
>> >{
>> >#ifdef BX_QEMU
>> >    uint32_t eax, ebx, ecx, edx;
>> >
>> >    // check if backdoor port exists
>> >    asm volatile ("outl %%eax, %%dx"
>> >        : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
>> >        : "a" (0x564d5868), "c" (0xa), "d" (0x5658));
>> >    if (ebx == 0x564d5868) {
> 
> Has a bug.
> 
> EBX is not initialised prior to the ASM, and could contain the same
> value as EAX.
> 
> If the I/O doesn't do anything (like on a real PC), it could match the
> condition which says its a backdoor.
> 
> The ASM should initialise EBX to something else:
> 
>   asm volatile ("outl %%eax, %%dx"
>       : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
>       : "a" (0x564d5868), "b" (0), "c" (0xa), "d" (0x5658));

Fixed in cvs (rombios32.c r1.29) now. Thanks for spotting it.

- Sebastian

  reply	other threads:[~2008-07-31 19:48 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-28 13:25 [Qemu-devel] [PATCH 0/3]: Add UUID command-line option Chris Lalancette
2008-07-28 14:15 ` [Qemu-devel] " Gleb Natapov
2008-07-28 14:37   ` Anthony Liguori
2008-07-28 14:41     ` Chris Lalancette
2008-07-28 15:02       ` Anthony Liguori
2008-07-28 15:09         ` Chris Lalancette
2008-07-28 15:12           ` Anthony Liguori
2008-07-28 15:42             ` Chris Lalancette
2008-07-28 16:02               ` Gleb Natapov
2008-07-28 16:17                 ` Anthony Liguori
2008-07-28 16:27                   ` Gleb Natapov
2008-07-28 17:41                     ` Blue Swirl
2008-07-28 16:28                   ` Jamie Lokier
2008-07-28 19:02                     ` Anthony Liguori
2008-07-28 20:00                       ` Jamie Lokier
2008-07-28 20:25                         ` Anthony Liguori
2008-07-28 20:40                           ` Paul Brook
2008-07-28 20:55                             ` Anthony Liguori
2008-07-29  6:31                           ` Gleb Natapov
2008-07-28 15:48             ` Jamie Lokier
2008-07-31 19:45               ` Sebastian Herbszt [this message]
2008-07-28 15:49             ` Jamie Lokier
2008-07-28 16:06               ` Anthony Liguori
2008-07-28 15:35     ` Gleb Natapov
2008-07-29 19:22       ` Anthony Liguori
2008-07-29 19:50         ` Gleb Natapov
2008-07-30 17:32           ` Blue Swirl
2008-08-05 14:33             ` Gleb Natapov
2008-08-06  2:35               ` Anthony Liguori
2008-08-06 16:26                 ` Blue Swirl
2008-08-06 16:33                   ` Anthony Liguori
2008-08-06 22:07                     ` [Qemu-devel] " Sebastian Herbszt
2008-08-06 22:11                       ` [Qemu-devel] " Anthony Liguori
2008-07-29  8:15     ` Daniel P. Berrange
2008-07-29  8:42       ` Chris Lalancette
2008-07-28 15:51   ` Jamie Lokier

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='02e701c8f346$5cb38bb0$0201a8c0@zeug' \
    --to=herbszt@gmx.de \
    --cc=clalance@redhat.com \
    --cc=gleb@qumranet.com \
    --cc=jamie@shareable.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).