All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <Laurent@vivier.eu>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Riku Voipio <riku.voipio@iki.fi>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] linux-user: correct msgrcv()
Date: Sun, 20 Jan 2013 00:29:36 +0100	[thread overview]
Message-ID: <1358638176.3091.2.camel@Quad> (raw)
In-Reply-To: <CAFEAcA9E=aZ6-+i494vOJX2zzpp91XV7X=yBAKW9Q5fG6kMq+A@mail.gmail.com>

Le mercredi 02 janvier 2013 à 00:03 +0000, Peter Maydell a écrit :
> On 20 December 2012 21:00, Laurent Vivier <laurent@vivier.eu> wrote:
> > All parameters must be swapped before the call of do_msgrcv().
> > --- a/linux-user/syscall.c
> > +++ b/linux-user/syscall.c
> > @@ -2901,7 +2901,7 @@ static inline abi_long do_msgrcv(int msqid, abi_long msgp,
> >          return -TARGET_EFAULT;
> >
> >      host_mb = g_malloc(msgsz+sizeof(long));
> > -    ret = get_errno(msgrcv(msqid, host_mb, msgsz, tswapal(msgtyp), msgflg));
> > +    ret = get_errno(msgrcv(msqid, host_mb, msgsz, msgtyp, msgflg));
> >
> >      if (ret > 0) {
> >          abi_ulong target_mtext_addr = msgp + sizeof(abi_ulong);
> > @@ -3199,7 +3199,7 @@ static abi_long do_ipc(unsigned int call, int first,
> >                      break;
> >                  }
> >
> > -                ret = do_msgrcv(first, tmp->msgp, second, tmp->msgtyp, third);
> > +                ret = do_msgrcv(first, tswapal(tmp->msgp), second, tswapal(tmp->msgtyp), third);
> >
> >                  unlock_user_struct(tmp, ptr, 0);
> >                  break;
> 
> Untested but looks right.
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

ping ?

Laurent
-- 
"Just play. Have fun. Enjoy the game."
- Michael Jordan

      reply	other threads:[~2013-01-19 23:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-20 21:00 [Qemu-devel] [PATCH] linux-user: correct msgrcv() Laurent Vivier
2013-01-01 23:10 ` Laurent Vivier
2013-01-02  0:03 ` Peter Maydell
2013-01-19 23:29   ` Laurent Vivier [this message]

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=1358638176.3091.2.camel@Quad \
    --to=laurent@vivier.eu \
    --cc=peter.maydell@linaro.org \
    --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.