qemu/linux-user
Kirill A. Shutemov fe3b415231 linux-user: Rewrite mmap_find_vma() to work fine on 64-bit hosts with 32-bit targets
qemu's page table can be incomple if /proc/self/maps is unavailable or
host allocating a memory with mmap(), so we can't use it to find free
memory area.

New version mmap_find_vma() uses mmap() without MAP_FIXED to find free
memory.

Tested-by: Martin Mohring <martin.mohring@opensuse.org> :

quite some time ago this patch had been sent by Kirill to the QEMU ml.
At that time, the patch was rejected. Now we found out why the current
user mode memory allocator sometimes fails:

- Kernel Bug  linux/fs/proc/task_mmu.c (fixed after 2.6.27)
http://bugzilla.kernel.org/attachment.cgi?id=17219
- use of proc file system to find memory mappings => bad idea

So I please apply the attached patch from Kirill to qemu to fix this
longstanding bug, because it causes all older linux distros (using
kernel 2.6.26 or older) to fail the QEMU memory allocator in user mode.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-08-25 17:15:35 +03:00
..
alpha Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
arm rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN 2009-07-27 14:09:21 -05:00
cris CRIS: Add a bunch of syscall numbers. 2009-01-07 19:47:53 +00:00
i386 linux-user: update syscall list 2009-06-16 16:56:29 +03:00
m68k linux-user: update syscall list 2009-06-16 16:56:29 +03:00
microblaze microblaze: Add syscall, signal and termbits defs for linux-user. 2009-05-26 21:10:21 +02:00
mips linux-user: update syscall list 2009-06-16 16:56:29 +03:00
mips64 linux-user: update syscall list 2009-06-16 16:56:29 +03:00
mipsn32 linux-user: update syscall list 2009-06-16 16:56:29 +03:00
ppc Update to a hopefully more future proof FSF address 2009-07-16 20:47:01 +00:00
sh4 linux-user: update syscall list 2009-06-16 16:56:29 +03:00
sparc linux-user: update syscall list 2009-06-16 16:56:29 +03:00
sparc64 linux-user: update syscall list 2009-06-16 16:56:29 +03:00
x86_64 linux-user: update syscall list 2009-06-16 16:56:29 +03:00
elfload.c Fix symfind. 2009-08-10 13:05:25 -05:00
elfload32.c Remove unwanted executable properties 2008-04-06 06:04:39 +00:00
errno_defs.h Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
flat.h Support for 32 bit ABI on 64 bit targets (only enabled Sparc64) 2007-10-14 16:27:31 +00:00
flatload.c Update to a hopefully more future proof FSF address 2009-07-16 20:47:01 +00:00
ioctls.h Add MTIOCTOP, MTIOCGET and MTIOCPOS ioctls (Kirill Shutemov). 2008-09-20 03:03:09 +00:00
linux_loop.h Fix build failure with old kernel headers (loop.h is incompatible with 2008-05-23 16:06:43 +00:00
linuxload.c More NULL pointer fixes 2009-08-01 10:13:20 +00:00
m68k-sim.c Update to a hopefully more future proof FSF address 2009-07-16 20:47:01 +00:00
main.c Replace local ADDRX/PADDRX macros with TARGET_FMT_lx/plx 2009-08-16 11:13:18 +00:00
mmap.c linux-user: Rewrite mmap_find_vma() to work fine on 64-bit hosts with 32-bit targets 2009-08-25 17:15:35 +03:00
qemu-types.h linux-user: Move abi_* typedefs into qemu-types.h 2008-12-08 18:12:04 +00:00
qemu.h user: compile path.c only once 2009-08-15 07:51:59 +00:00
signal.c m68k, linux-user: add setup_rt_frame 2009-08-25 17:15:34 +03:00
socket.h Various linux-user structures and definitions fixes for PowerPC targets. 2007-12-10 08:24:59 +00:00
strace.c linux-user: strace now handles guest stringscorrectly [v2] 2009-06-19 02:51:47 +04:00
strace.list linux-user: strace now handles guest strings correctly [v2] 2009-06-16 16:56:28 +03:00
syscall.c linux-user: zero fstat buffer to initialize nsec fields 2009-08-25 17:15:35 +03:00
syscall_defs.h linux-user: fcntl fixes for LTP 2009-08-25 17:15:34 +03:00
syscall_types.h Add MTIOCTOP, MTIOCGET and MTIOCPOS ioctls (Kirill Shutemov). 2008-09-20 03:03:09 +00:00
uaccess.c Fix missing strnlen problems 2009-07-01 18:24:44 +00:00
vm86.c Update to a hopefully more future proof FSF address 2009-07-16 20:47:01 +00:00