From: Felix Janda <felix.janda@posteo.de>
To: Riku Voipio <riku.voipio@iki.fi>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] linux-user: fix mremap for 64bit targets on 32bit hosts
Date: Thu, 22 Sep 2016 20:36:39 -0400 [thread overview]
Message-ID: <20160923003639.GA3472@nyan> (raw)
In-Reply-To: <20160922062210.GA28511@kos.to>
Riku Voipio wrote:
> Hi,
>
> On Sat, Sep 17, 2016 at 09:20:14PM -0400, Felix Janda wrote:
> > Signed-off-by: Felix Janda <felix.janda@posteo.de>
>
> 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
> >
next prev parent reply other threads:[~2016-09-23 0:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=20160923003639.GA3472@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 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).