From: Laurent Vivier <lvivier@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Michael Karcher <mkarcher@zedat.fu-berlin.de>,
QEMU Developers <qemu-devel@nongnu.org>,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Subject: Re: [Qemu-devel] [PATCH] linux-user: Enable sigaltstack syscall for sh4
Date: Thu, 19 Nov 2015 13:20:37 +0100 [thread overview]
Message-ID: <564DBE95.9070807@redhat.com> (raw)
In-Reply-To: <CAFEAcA9qDiYiEqrtScSQwonx_2F+d9+oeSJD0Lw9u2vWjDLo-g@mail.gmail.com>
On 19/11/2015 12:15, Peter Maydell wrote:
> On 19 November 2015 at 10:22, Laurent Vivier <lvivier@redhat.com> wrote:
>> Hi,
>>
>> On 19/11/2015 10:28, John Paul Adrian Glaubitz wrote:
>>> On 11/19/2015 10:17 AM, Peter Maydell wrote:
>>>> Unfortunately this isn't sufficient. You also need to add
>>>> the code to the sh4-specific functions in linux-user/signal.c
>>>> which honours the requested sigaltstack when taking and returning
>>>> from signal handlers.
>>
>> it seems all needed functions for sh4 signal handling are already
>> written in linux-user/signal.c, I thing about setup_frame(),
>> setup_rt_frame(), do_sigreturn() and do_rt_sigreturn().
>
> Other architectures have calls to do_sigaltstack or other
> sigaltstack handling in their frame setup and sigreturn
> functions. SH4 doesn't, which implied to me that we were
> missing something beyond just enabling the call to do_sigaltstack.
> Maybe that's for something else?
Well, I didn't really check the code in these functions, but SH4 has the
call in do_rt_sigreturn().
The only check I did is to compare setup_frame() with the one from
kernel and it seems ok.
But I think the patch from Adrian is just fixing a forgetting in the
original SH4 patch:
c3b5bc8 SH4: Signal handling for the user space emulator, by Magnus Damm.
This patch uses do_sigaltstack() without enabling sigaltstack() syscall.
> (Incidentally the only targets other than SH4 not listed in
> this ifdef are CRIS, Microblaze, TileGX and Unicore32.
> Maybe we should just go ahead and remove the ifdef entirely,
> if do_sigaltstack() doesn't really have any target-specific
> requirements?)
I don't know if these targets have a lot of users. At least for SH4, we
can enable it and see if someone is screaming (I like the "crash-test
method" :) ). I think Adrian will take care of this (and I can help).
Thanks,
Laurent
next prev parent reply other threads:[~2015-11-19 12:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 22:15 [Qemu-devel] [PATCH] linux-user: Enable sigaltstack syscall for sh4 John Paul Adrian Glaubitz
2015-11-18 22:15 ` John Paul Adrian Glaubitz
2015-11-19 9:17 ` Peter Maydell
2015-11-19 9:28 ` John Paul Adrian Glaubitz
2015-11-19 10:22 ` Laurent Vivier
2015-11-19 11:15 ` Peter Maydell
2015-11-19 12:20 ` Laurent Vivier [this message]
2015-11-19 12:28 ` John Paul Adrian Glaubitz
2015-11-19 12:54 ` 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=564DBE95.9070807@redhat.com \
--to=lvivier@redhat.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=mkarcher@zedat.fu-berlin.de \
--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 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).