All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: linaro-dev <linaro-dev@lists.linaro.org>,
	"Dann Frazier" <dann.frazier@canonical.com>,
	"Michael Matz" <matz@suse.de>, "Alexander Graf" <agraf@suse.de>,
	"linaro-toolchain@lists.linaro.org"
	<linaro-toolchain@lists.linaro.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Wook Wookey" <wookey@linaro.org>,
	"Andreas Färber" <afaerber@suse.de>,
	"Christoffer Dall" <Christoffer.Dall@linaro.org>
Subject: Re: [Qemu-devel] Call for testing QEMU aarch64-linux-user emulation
Date: Fri, 28 Feb 2014 17:08:12 +0000	[thread overview]
Message-ID: <87mwhbf9ni.fsf@linaro.org> (raw)
In-Reply-To: <CAFEAcA_w-j_bRS1AHAWV=r8DmncgFPbOnR=hE2y9uHE2ia1QHw@mail.gmail.com>


Peter Maydell <peter.maydell@linaro.org> writes:

> On 28 February 2014 14:27, Alexander Graf <agraf@suse.de> wrote:
>> Could we check the instruction at the sognaling pc and check
>> if it's a known syscall instruction? No need to replace glibc
>> wrappers then.
>
> No, because the behaviour we want for "started handling
> syscall in qemu" through to "PC anything up to but not
> including the syscall insn" is "back out and take signal
> then try again", which means we need to be able to unwind
> anything we were doing. If we (effectively) longjmp out of
> the middle of glibc we're liable to leave locked mutexes
> and otherwise mess up glibc internals.

The other option is roll the real PC forward until you know you are at a
point that everything is in a known state - in this case a labelled
syscall instruction. You can achieve this with a host interpreter (which
would be a lot of work to add to QEMU) or maybe achieve the same magic
with ptrace?

If you really want to avoid too much messing about you mask off all your
signals until you really know you can do something about them.

It goes without saying I hope that any serious attempt to fix this needs
a decent set of test cases because the edge cases are numerous.

-- 
Alex Bennée

  reply	other threads:[~2014-02-28 17:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17 13:40 [Qemu-devel] Call for testing QEMU aarch64-linux-user emulation Alex Bennée
2014-02-24 13:01 ` Janne Grunau
2014-02-25 15:54   ` Alex Bennée
2014-02-25 17:11     ` Janne Grunau
2014-03-06 11:40       ` Alex Bennée
2014-03-06 16:04         ` Janne Grunau
2014-02-24 20:58 ` Dann Frazier
2014-02-25  8:39   ` Alex Bennée
2014-02-25  8:49     ` Andreas Färber
2014-02-25 13:33       ` Michael Matz
2014-02-25 13:46         ` Peter Maydell
2014-02-25 14:56           ` Michael Matz
2014-02-28 14:12             ` Alex Bennée
2014-02-28 14:21               ` Peter Maydell
2014-02-28 14:27                 ` Alexander Graf
2014-02-28 14:49                   ` Peter Maydell
2014-02-28 17:08                     ` Alex Bennée [this message]
2014-02-28 17:17                       ` Peter Maydell
2014-02-26 22:06     ` Dann Frazier
2014-02-27 13:20       ` Michael Matz
2014-02-27 19:47         ` Dann Frazier
2014-03-14 14:20         ` Peter Maydell
2014-03-09 23:37     ` Dann Frazier
2014-03-09 23:51       ` Peter Maydell
2014-03-10 11:28         ` Alex Bennée
2014-03-10 11:45           ` Peter Maydell
2014-03-10 13:56           ` Michael Matz

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=87mwhbf9ni.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=Christoffer.Dall@linaro.org \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=dann.frazier@canonical.com \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linaro-toolchain@lists.linaro.org \
    --cc=matz@suse.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wookey@linaro.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.