qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu-user: relocating target code weakness


From: Mike Frysinger
Subject: Re: [Qemu-devel] qemu-user: relocating target code weakness
Date: Mon, 24 Jan 2011 16:21:03 -0500

On Mon, Jan 24, 2011 at 15:58, Stefano Bonifazi wrote:
>> review the mmap() man page ... MAP_FIXED is always a *suggestion* and
>> never a requirement.  the app must check the return value to see what
>> the kernel actually gave it.
>
> Sorry, wrong!
>
> MAP_FIXED
>               Don't interpret addr as a hint: place the mapping at exactly
> that
>               address. [] If the specified address cannot be used, mmap()
> will fail.[]

err, yes.  i was thinking the specified address when MAP_FIXED isnt
used.  since qemu itself has its own mappings, there is a slightly
greater possibility of the simulated program making a MAP_FIXED
request that clashes with qemu itself, or with addresses that are free
in the simulated arch's ABI but reserved in the host processor's ABI.
but that can happen with the app running natively too, so any app not
handling MAP_FIXED failures is buggy and not qemu's problem.
-mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]