All of lore.kernel.org
 help / color / mirror / Atom feed
From: joserz@linux.vnet.ibm.com
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH Risu 1/2] risu_ppc64: Fix Risu to run under qemu linux user
Date: Tue, 31 Jan 2017 20:09:08 -0200	[thread overview]
Message-ID: <20170131220908.GA19075@pacoca> (raw)
In-Reply-To: <CAFEAcA_juuc1jxnLqE6BFOcROM7uR_UEkY+d1Zrh2b17CiaVjQ@mail.gmail.com>

On Mon, Jan 30, 2017 at 11:49:34AM +0000, Peter Maydell wrote:
> On 30 January 2017 at 02:47, Jose Ricardo Ziviani
> <joserz@linux.vnet.ibm.com> wrote:
> > Qemu linux-user doesn't fill uc_mcontext completely like full emul. does.
> > For instance, uc->uc_mcontext.regs->nip is an invalid so this
> > commit replaces it by uc->uc_mcontext.gp_regs[PT_NIP]
> 
> It's not clear to me from this commit message whether this is
> a bug in QEMU's userspace emulation which this is trying to work
> around (in which case we should just fix it in QEMU), or a
> bug in risu where we were incorrectly relying on something the
> kernel doesn't actually guarantee. Which is it?
> 
> Also, looking at the kernel source and headers as far
> as I can see uc_context.regs is a pointer set up such that
> uc->uc_mcontext.regs->nip is pointing at the same bit of
> memory where uc->uc_mcontext.gp_regs[PT_NIP] is,
> and the QEMU code does similar, so I don't see how you can
> get two different values from the two things.
> 
> (It is certainly the case that risu is quite good at exercising
> odd corner cases of the signal handling code in QEMU which most
> normal programs don't care about...)

Peter

I just sent a patch "linux-user: fill target sigcontext struct accordingly" to fix it in QEMU. Please, forget this patchset, I'll reorganize it and send it later.

Thank you

Ziviani

  reply	other threads:[~2017-01-31 22:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-30  2:47 [Qemu-devel] [PATCH Risu 0/2] PPC64 improvements Jose Ricardo Ziviani
2017-01-30  2:47 ` [Qemu-devel] [PATCH Risu 1/2] risu_ppc64: Fix Risu to run under qemu linux user Jose Ricardo Ziviani
2017-01-30 11:26   ` Alex Bennée
2017-01-30 11:49   ` Peter Maydell
2017-01-31 22:09     ` joserz [this message]
2017-01-30  2:47 ` [Qemu-devel] [PATCH Risu 2/2] risu_ppc64: Compare FPSCR flags Jose Ricardo Ziviani
2017-02-03 11:47   ` Peter Maydell

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=20170131220908.GA19075@pacoca \
    --to=joserz@linux.vnet.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@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 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.