summary refs log tree commit diff stats
path: root/bsd-user/elfload.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-12-02 15:41:38 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-12-02 15:41:38 +0000
commit30a9fd5d13b0a4290382adc4c1bf619677066b89 (patch)
tree7327dbaa1da19f0e397dfef405a45755ff61a92c /bsd-user/elfload.c
parent9d7b969ea6d9663a94760c6c131481b366f4d38a (diff)
parent0c2d70c448b7853a91cfa63659aa3cc6630fb9be (diff)
downloadfocaccia-qemu-30a9fd5d13b0a4290382adc4c1bf619677066b89.tar.gz
focaccia-qemu-30a9fd5d13b0a4290382adc4c1bf619677066b89.zip
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* exec.c use after free
* Xen 32-on-64 breakage
* missing EINTR
* naughty warning under qtest

# gpg: Signature made Wed 02 Dec 2015 12:13:55 GMT using RSA key ID 78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"

* remotes/bonzini/tags/for-upstream:
  translate-all: ensure host page mask is always extended with 1's
  main-loop: suppress warnings under qtest
  qemu-char: retry g_poll on EINTR
  exec: Stop using memory after free

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'bsd-user/elfload.c')
-rw-r--r--bsd-user/elfload.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
index 351aab12e7..59a7bdf0cc 100644
--- a/bsd-user/elfload.c
+++ b/bsd-user/elfload.c
@@ -740,8 +740,7 @@ static void padzero(abi_ulong elf_bss, abi_ulong last_bss)
            size must be known */
         if (qemu_real_host_page_size < qemu_host_page_size) {
             abi_ulong end_addr, end_addr1;
-            end_addr1 = (elf_bss + qemu_real_host_page_size - 1) &
-                ~(qemu_real_host_page_size - 1);
+            end_addr1 = REAL_HOST_PAGE_ALIGN(elf_bss);
             end_addr = HOST_PAGE_ALIGN(elf_bss);
             if (end_addr1 < end_addr) {
                 mmap((void *)g2h(end_addr1), end_addr - end_addr1,