qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <rth@twiddle.net>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Riku Voipio <riku.voipio@iki.fi>
Subject: Re: [Qemu-devel] [PATCH 0/6] linux-user: safe_syscall updates
Date: Mon, 13 Jun 2016 23:09:17 +0100	[thread overview]
Message-ID: <CAFEAcA8FDMcGRPMvvRsyDZq=S+GfdZ4iGNQxDLSeT6UXDDvrAA@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-EKJWZb21cs5SepW1RdTk5ue0=_ps-X_Up3x0+QZDKqA@mail.gmail.com>

On 13 June 2016 at 22:53, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 13 June 2016 at 22:45, Richard Henderson <rth@twiddle.net> wrote:
>> Richard Henderson (6):
>>   linux-user: fix x86_64 safe_syscall
>>   linux-user: Provide safe_syscall for i386
>>   linux-user: Provide safe_syscall for arm
>>   linux-user: Provide safe_syscall for aarch64
>>   linux-user: Provide safe_syscall for s390x
>>   linux-user: Provide safe_syscall for ppc64
>
> I just spent today writing these for i386, arm and aarch64,
> so we've duplicated work here :-(

Also, I have a patchset which moves from the generic/hostdep.h
to having explicitly one hostdep.h per supported architecture.
That needs to go in before these, otherwise these break
compilation unless you do a 'make clean'.

I'll send that out tomorrow, working version in
 https://git.linaro.org/people/peter.maydell/qemu-arm.git/shortlog/refs/heads/sigrace-fixes

We also have a bug in the signal.c code which I noticed
trying to test my i386 safe_syscall: we call sigfillset()
on the uc_sigmask field of the ucontext_t* that the
kernel passes us as argument 3 of the signal handler.
This trashes a lot of stuff on the stack because the
libc headers say "sigset_t is 128 bytes" and the kernel
says "it's only 8 bytes", so the sigfillset() writes -1
to a lot of the stack that it shouldn't. (I don't know
why glibc exposes a struct that isn't actually what
the kernel provides here, but it's a very long standing
confusion :-( )

thanks
-- PMM

  reply	other threads:[~2016-06-13 22:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13 21:45 [Qemu-devel] [PATCH 0/6] linux-user: safe_syscall updates Richard Henderson
2016-06-13 21:45 ` [Qemu-devel] [PATCH 1/6] linux-user: fix x86_64 safe_syscall Richard Henderson
2016-06-14 11:58   ` Peter Maydell
2016-06-21 19:26   ` Riku Voipio
2016-06-13 21:45 ` [Qemu-devel] [PATCH 2/6] linux-user: Provide safe_syscall for i386 Richard Henderson
2016-06-14 11:58   ` Peter Maydell
2016-06-14 15:47     ` Richard Henderson
2016-06-13 21:45 ` [Qemu-devel] [PATCH 3/6] linux-user: Provide safe_syscall for arm Richard Henderson
2016-06-14 12:04   ` Peter Maydell
2016-06-14 15:53     ` Richard Henderson
2016-06-13 21:45 ` [Qemu-devel] [PATCH 4/6] linux-user: Provide safe_syscall for aarch64 Richard Henderson
2016-06-13 22:04   ` Peter Maydell
2016-06-13 22:21     ` Richard Henderson
2016-06-13 22:28       ` Peter Maydell
2016-06-13 22:31         ` Peter Maydell
2016-06-13 22:38         ` Richard Henderson
2016-06-13 22:40           ` Peter Maydell
2016-06-13 21:45 ` [Qemu-devel] [PATCH 5/6] linux-user: Provide safe_syscall for s390x Richard Henderson
2016-06-13 21:45 ` [Qemu-devel] [PATCH 6/6] linux-user: Provide safe_syscall for ppc64 Richard Henderson
2016-06-13 22:23   ` Peter Maydell
2016-06-13 21:53 ` [Qemu-devel] [PATCH 0/6] linux-user: safe_syscall updates Peter Maydell
2016-06-13 22:09   ` Peter Maydell [this message]
2016-06-21 19:08     ` Riku Voipio
2016-06-21 19:49       ` 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='CAFEAcA8FDMcGRPMvvRsyDZq=S+GfdZ4iGNQxDLSeT6UXDDvrAA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=rth@twiddle.net \
    /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).