All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Janda <felix.janda@posteo.de>
To: qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>
Subject: [Qemu-devel] [PATCH] linux-user: fix mremap for 64bit targets on 32bit hosts
Date: Sat, 17 Sep 2016 21:20:14 -0400	[thread overview]
Message-ID: <20160918012014.GA11017@nyan> (raw)

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 linux-user/mmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index c4371d9..4882816 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -682,7 +682,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
 
     if (flags & MREMAP_FIXED) {
         host_addr = (void *) syscall(__NR_mremap, g2h(old_addr),
-                                     old_size, new_size,
+                                     (size_t) old_size, (size_t) new_size,
                                      flags,
                                      g2h(new_addr));
 
@@ -701,7 +701,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
             host_addr = MAP_FAILED;
         } else {
             host_addr = (void *) syscall(__NR_mremap, g2h(old_addr),
-                                         old_size, new_size,
+                                         (size_t) old_size, (size_t) new_size,
                                          flags | MREMAP_FIXED,
                                          g2h(mmap_start));
             if (reserved_va) {
-- 
2.7.3

             reply	other threads:[~2016-09-18  1:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-18  1:20 Felix Janda [this message]
2016-09-22  6:22 ` [Qemu-devel] [PATCH] linux-user: fix mremap for 64bit targets on 32bit hosts Riku Voipio
2016-09-23  0:36   ` Felix Janda
2016-09-28 23:30 ` Peter Maydell
2016-09-29  2:46   ` Felix Janda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160918012014.GA11017@nyan \
    --to=felix.janda@posteo.de \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.