From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnEVQ-0005Zt-42 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 20:38:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnEVM-0006EJ-VJ for qemu-devel@nongnu.org; Thu, 22 Sep 2016 20:38:20 -0400 Received: from mout02.posteo.de ([185.67.36.66]:38529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnEVM-0006DP-Os for qemu-devel@nongnu.org; Thu, 22 Sep 2016 20:38:16 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 5D00720A32 for ; Fri, 23 Sep 2016 02:38:06 +0200 (CEST) Date: Thu, 22 Sep 2016 20:36:39 -0400 From: Felix Janda Message-ID: <20160923003639.GA3472@nyan> References: <20160918012014.GA11017@nyan> <20160922062210.GA28511@kos.to> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160922062210.GA28511@kos.to> Subject: Re: [Qemu-devel] [PATCH] linux-user: fix mremap for 64bit targets on 32bit hosts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Riku Voipio Cc: qemu-devel@nongnu.org Riku Voipio wrote: > Hi, > > On Sat, Sep 17, 2016 at 09:20:14PM -0400, Felix Janda wrote: > > Signed-off-by: Felix Janda > > Have you run the mremap tests of ltp with this on your host/guest > combo? I have just run the tests. My host is arm and my guest is aarch64. Without the patch all but mremap02 fail. With the patch all but mremap04 pass. The mremap04 test indicates that shmat is broken. > > --- > > 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 > >