]> git.proxmox.com Git - qemu.git/commit - linux-user/syscall.c
linux-user: Don't use MAP_FIXED in do_brk()
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 18 Apr 2011 15:34:24 +0000 (16:34 +0100)
committerRiku Voipio <riku.voipio@iki.fi>
Tue, 21 Jun 2011 17:29:01 +0000 (20:29 +0300)
commit00faf08c951fcc351467faac5697307a86edb077
tree3a85f8adb1b674999861b2cee5ff658e2d41d86b
parentf3ed1f5d476bfc18c4b2e27bf2386f54c98561f1
linux-user: Don't use MAP_FIXED in do_brk()

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 error case instead.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user/syscall.c