qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Samuel Seay <lightningth@gmail.com>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] Modifications to fix PowerPC on 64bit host, bug #1052857
Date: Wed, 2 Jan 2013 20:38:53 +0000	[thread overview]
Message-ID: <CAFEAcA_i_SbQQyQbzJqyewJKfe3itda2-nLELP5caWH2zrH1Bw@mail.gmail.com> (raw)
In-Reply-To: <1357156566-38368-1-git-send-email-LightningTH@GMail.com>

On 2 January 2013 19:56, Samuel Seay <lightningth@gmail.com> wrote:
> Removed h2g() macro around the ka->_sa_handler due to _sa_handler being a guest value
> Changed the __put_user macro as it was attempting to put a value to a guest memory location without converting to the guest area
>
> Signed-off-by: Samuel Seay <LightningTH@GMail.com>
> ---
>  linux-user/signal.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/linux-user/signal.c b/linux-user/signal.c
> index 95e2ffa..d0d24fc 100644
> --- a/linux-user/signal.c
> +++ b/linux-user/signal.c
> @@ -4584,7 +4584,7 @@ static void setup_frame(int sig, struct target_sigaction *ka,
>
>      signal = current_exec_domain_sig(sig);
>
> -    err |= __put_user(h2g(ka->_sa_handler), &sc->handler);
> +    err |= __put_user(ka->_sa_handler, &sc->handler);
>      err |= __put_user(set->sig[0], &sc->oldmask);
>  #if defined(TARGET_PPC64)
>      err |= __put_user(set->sig[0] >> 32, &sc->_unused[3]);
> @@ -4606,7 +4606,7 @@ static void setup_frame(int sig, struct target_sigaction *ka,
>
>      /* Create a stack frame for the caller of the handler.  */
>      newsp = frame_addr - SIGNAL_FRAMESIZE;
> -    err |= __put_user(env->gpr[1], (target_ulong *)(uintptr_t) newsp);
> +    err |= put_user(env->gpr[1], (target_ulong)(uintptr_t) newsp, target_ulong);

newsp is already a target_ulong, you don't need either of these casts.

-- PMM

      reply	other threads:[~2013-01-02 20:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-02 19:56 [Qemu-devel] [PATCH v2] Modifications to fix PowerPC on 64bit host, bug #1052857 Samuel Seay
2013-01-02 20:38 ` Peter Maydell [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=CAFEAcA_i_SbQQyQbzJqyewJKfe3itda2-nLELP5caWH2zrH1Bw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=lightningth@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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).