Re: [Qemu-devel] [PATCH 1/3] linux-user: Don't use MAP_FIXED in do_brk()

2011-04-21 Thread Peter Maydell
On 18 April 2011 16:34, Peter Maydell peter.mayd...@linaro.org wrote: Since mmap() with MAP_FIXED will map over the top of existing mappings, it's a bad idea to use it to implement brk(), because brk() with a large size is likely to overwrite important things like qemu itself or the host libc.

[Qemu-devel] [PATCH 1/3] linux-user: Don't use MAP_FIXED in do_brk()

2011-04-18 Thread Peter Maydell
Since mmap() with MAP_FIXED will map over the top of existing mappings, it's a bad idea to use it to implement brk(), because brk() with a large size is likely to overwrite important things like qemu itself or the host libc. So we drop MAP_FIXED and handle mapped but at different address as an