mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
fe3b415231
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> |
||
---|---|---|
.. | ||
alpha | ||
arm | ||
cris | ||
i386 | ||
m68k | ||
microblaze | ||
mips | ||
mips64 | ||
mipsn32 | ||
ppc | ||
sh4 | ||
sparc | ||
sparc64 | ||
x86_64 | ||
elfload.c | ||
elfload32.c | ||
errno_defs.h | ||
flat.h | ||
flatload.c | ||
ioctls.h | ||
linux_loop.h | ||
linuxload.c | ||
m68k-sim.c | ||
main.c | ||
mmap.c | ||
qemu-types.h | ||
qemu.h | ||
signal.c | ||
socket.h | ||
strace.c | ||
strace.list | ||
syscall.c | ||
syscall_defs.h | ||
syscall_types.h | ||
uaccess.c | ||
vm86.c |