qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: TeLeMan <geleman@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH]bug fix for softmmu slow_st unaligned access
Date: Tue, 30 Oct 2007 19:59:41 -0700 (PDT)	[thread overview]
Message-ID: <13502111.post@talk.nabble.com> (raw)
In-Reply-To: <fb249edb0710301916ifd6c84fs96c7ce07024e1bf@mail.gmail.com>




andrzej zaborowski wrote:
> 
> Hi,
> 
> On 28/10/2007, TeLeMan <geleman@gmail.com> wrote:
>> For example, the memory address 0x10008000 is on an unwritable page.When
>> the
>> instruction "add dword ptr [0x10007FFF],0x12345678" is executed,the OS
>> will
>> set 0x10008000 page be a writable page and re-execute this instruction.
>> But
>> softmmu has modifed the value of 0x10007FFF,so after re-executing this
>> instruction, the final result is wrong(double-added on 0x10007FFF).
>> Reversing the stored byte order can fix this bug.
> 
> I'm not sure I understand, but what happens if now the 10008000 page
> is writable and 10007fff isn't, thus the OS needs to make it writable
> and re-execute? I guess reversing the accesses order is not a
> solution?
> 
> Regards,
> Andrew
> 
> 

If the 0x10008000 page is writable and 0x10007FFF isn't, softmmu can raise
this exception before modifing 0x10007FFF-0x10008002 because softmmu checks
0x10007FFF at first. I don't know if reversing the order is an exact
solution,but its simple and working.

btw, I found this bug because I found the some windows dll reloc offset are
calculated incorrectly by the guest OS. If you need a sample, I can give it
to you.
-- 
View this message in context: http://www.nabble.com/-PATCH-bug-fix-for-softmmu-slow_st-unaligned-access-tf4705397.html#a13502111
Sent from the QEMU - Dev mailing list archive at Nabble.com.

  reply	other threads:[~2007-10-31  2:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-28  4:00 [Qemu-devel] [PATCH]bug fix for softmmu slow_st unaligned access TeLeMan
2007-10-31  2:16 ` andrzej zaborowski
2007-10-31  2:59   ` TeLeMan [this message]
2007-11-17  9:54     ` andrzej zaborowski

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=13502111.post@talk.nabble.com \
    --to=geleman@gmail.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 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).