qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Unposted reserved_va patch
@ 2010-06-02 17:20 Richard Henderson
  2010-06-03  4:54 ` [Qemu-devel] " Paul Brook
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2010-06-02 17:20 UTC (permalink / raw)
  To: Paul Brook; +Cc: qemu-devel

Re: 68a1c816868b3e35a1da698af412b29e61b1948a

In general, I like the idea (especially since I've proposed it before.  ;-)

However:

+        if (have_guest_base) {
+            flags |= MAP_FIXED;
+        }

I think this is broken.  If the user specifies -G n -R m they're hoping
or guessing that the range [n,n+m) is free.  What they're not expecting
is for the qemu application or any of the required shared libraries to
get forcibly unmapped.

I think instead you should simply adjust the error reporting after the
mmap attempt without MAP_FIXED.



r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: Unposted reserved_va patch
  2010-06-02 17:20 [Qemu-devel] Unposted reserved_va patch Richard Henderson
@ 2010-06-03  4:54 ` Paul Brook
  2010-06-03 14:05   ` Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Brook @ 2010-06-03  4:54 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel

> Re: 68a1c816868b3e35a1da698af412b29e61b1948a
> 
> In general, I like the idea (especially since I've proposed it before.  ;-)
> 
> However:
> 
> +        if (have_guest_base) {
> +            flags |= MAP_FIXED;
> +        }
> 
> I think this is broken.  If the user specifies -G n -R m they're hoping
> or guessing that the range [n,n+m) is free.  What they're not expecting
> is for the qemu application or any of the required shared libraries to
> get forcibly unmapped.
> 
> I think instead you should simply adjust the error reporting after the
> mmap attempt without MAP_FIXED.

Hmm, maybe. My reasoning was that this is consistent with the current behavior 
of the ELF loader.  If you specify -G then the target application will be 
splatted at that address, regardless of whether it's already used by the host.

Paul

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: Unposted reserved_va patch
  2010-06-03  4:54 ` [Qemu-devel] " Paul Brook
@ 2010-06-03 14:05   ` Richard Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2010-06-03 14:05 UTC (permalink / raw)
  To: Paul Brook; +Cc: qemu-devel

On 06/02/2010 09:54 PM, Paul Brook wrote:
> Hmm, maybe. My reasoning was that this is consistent with the current behavior 
> of the ELF loader.  If you specify -G then the target application will be 
> splatted at that address, regardless of whether it's already used by the host.

Well, sort-of.  Before you removed PAGE_RESERVED we'd yield a
very cryptic error message about mmap failed and exit.


r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-03 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-02 17:20 [Qemu-devel] Unposted reserved_va patch Richard Henderson
2010-06-03  4:54 ` [Qemu-devel] " Paul Brook
2010-06-03 14:05   ` Richard Henderson

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).