qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user: fix mremap for 64bit targets on 32b


From: Felix Janda
Subject: Re: [Qemu-devel] [PATCH] linux-user: fix mremap for 64bit targets on 32bit hosts
Date: Thu, 22 Sep 2016 20:36:39 -0400
User-agent: Mutt/1.6.1 (2016-04-27)

Riku Voipio wrote:
> Hi,
> 
> On Sat, Sep 17, 2016 at 09:20:14PM -0400, Felix Janda wrote:
> > Signed-off-by: Felix Janda <address@hidden>
> 
> 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
> > 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]