qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user: fix mremap for 64bit targets on 32bit hosts
@ 2016-09-18  1:20 Felix Janda
  2016-09-22  6:22 ` Riku Voipio
  2016-09-28 23:30 ` Peter Maydell
  0 siblings, 2 replies; 5+ messages in thread
From: Felix Janda @ 2016-09-18  1:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-29  2:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-18  1:20 [Qemu-devel] [PATCH] linux-user: fix mremap for 64bit targets on 32bit hosts Felix Janda
2016-09-22  6:22 ` Riku Voipio
2016-09-23  0:36   ` Felix Janda
2016-09-28 23:30 ` Peter Maydell
2016-09-29  2:46   ` Felix Janda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).