From: Richard Henderson <rth@twiddle.net>
To: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] linux-user mmap bug
Date: Fri, 21 May 2010 09:38:17 -0700 [thread overview]
Message-ID: <4BF6B6F9.3070802@twiddle.net> (raw)
In-Reply-To: <20100521132817.GA8021@edde.se.axis.com>
On 05/21/2010 06:28 AM, Edgar E. Iglesias wrote:
> ptr = mmap(g2h(addr), size, PROT_NONE,
> - MAP_ANONYMOUS|MAP_PRIVATE|MAP_NORESERVE, -1, 0);
> + /* When the kernel returns addresses that the guest
> + cannot use we might need to fallback to fixed
> + allocations. */
> + (addr ? MAP_FIXED : 0)
> + | MAP_ANONYMOUS|MAP_PRIVATE|MAP_NORESERVE, -1, 0);
NACK. We are in fact probing for a free address in this loop,
so you don't know that the address being tested is in fact free.
I have a patch series that attempts to clean this up, but it
isn't quite optimal. I'll post it for reference, however.
r~
next prev parent reply other threads:[~2010-05-21 16:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 13:28 [Qemu-devel] linux-user mmap bug Edgar E. Iglesias
2010-05-21 16:38 ` Richard Henderson [this message]
2010-05-21 17:39 ` Richard Henderson
2010-05-24 14:57 ` Edgar E. Iglesias
2010-05-24 15:45 ` Richard Henderson
2010-05-25 9:19 ` Edgar E. Iglesias
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=4BF6B6F9.3070802@twiddle.net \
--to=rth@twiddle.net \
--cc=edgar.iglesias@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).