linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Grundler <grantgrundler@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>,
	Carlos O'Donell <carlos@systemhalted.org>,
	John David Anglin <dave.anglin@bell.net>
Cc: linux-parisc@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-arch@vger.kernel.org
Subject: Re: [parisc] double restarts on multiple signal arrivals
Date: Fri, 18 May 2012 13:12:13 -0700	[thread overview]
Message-ID: <CAP6odjgyK3af7yqHAFTTs38SSNM9H49oWiH=a4byp4MerirE0g@mail.gmail.com> (raw)
In-Reply-To: <20120518195610.GV22082@ZenIV.linux.org.uk>

+patofiero,anglin

On Fri, May 18, 2012 at 12:56 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> On Fri, May 18, 2012 at 11:05:46AM -0700, Grant Grundler wrote:
>> On Fri, May 18, 2012 at 10:58 AM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>> ...
>> >?Except for that mess with multiple
>> > pending signals, the value we have in r28 on syscall entry doesn't
>> > seem to affect the syscall behaviour... ?Some HPUX compat fun?
>>
>> We stopped trying to support HPUX compat support probably 8 or so
>> years ago. Since HP didn't care, no one else did either.  So no need
>> to consider it now.
>
> BTW, what should we put into the trampolines of subsequent sigframes
> when we are building more that one?

Sorry - I only knew about the state of the HPUX support...Carlos and
Dave (and a few others) understand the syscall interface. I've include
them directly and hopefully they can respond soon.

cheers,
grant

>  I.e. suppose we are in a syscall
> and see two signals.  We build a sigframe for the first one, with
> r25 = 1, call rt_sigreturn() in it.  Return address of original syscall
> is stored into sigcontext of that frame, our return address set to the
> entry point of handler1.  Now we see the second signal and build another
> sigframe.  That one will have the entry point of the first handler stored
> in sigframe and we'll set the things up so that return to userland will
> land us in the entry of handler2.  Fine, but... what should we have in r25
> for rt_sigreturn() in the second trampoline?
>
> We return to userland and find ourselves in the beginning of handler2.
> It's executed and eventually we return from it.  We are at the beginning
> of the second trampoline now.  rt_sigreturn() is called, restores the
> registers from the second sigcontext and returns to userland.  We are at
> the beginning of handler1.  It is executed and returns.  We are at the
> beginning of the first trampoline.  rt_sigreturn() _there_ restores the
> original registers from the first sigcontext and we finally return to the
> insn right after the original syscall (or to the syscall itself if we
> took a syscall restart).
>
> That final rt_sigreturn() will go through syscall_exit; OK, no problem
> with that.  But should the earlier one (done after return from handler2()
> and landing us at the entry of handler1) go through syscall_exit or
> through syscall_exit_rfi?

  parent reply	other threads:[~2012-05-18 20:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18 17:58 [parisc] double restarts on multiple signal arrivals Al Viro
2012-05-18 17:58 ` Al Viro
2012-05-18 18:05 ` Grant Grundler
2012-05-18 18:57   ` Al Viro
2012-05-18 18:57     ` Al Viro
2012-05-18 19:56   ` Al Viro
2012-05-18 19:56     ` Al Viro
2012-05-18 20:12     ` Grant Grundler [this message]
2012-05-18 20:15       ` Carlos O'Donell
2012-05-18 22:24         ` Al Viro
2012-05-19  1:36           ` Carlos O'Donell
2012-05-19  5:26           ` Al Viro
2012-05-19 13:37             ` Al Viro
2012-05-19 13:37               ` Al Viro
2012-05-20  8:40           ` Al Viro
2012-05-20  8:40             ` Al Viro
2012-05-20  9:04             ` Al Viro
2012-05-20  9:04               ` Al Viro
2012-05-20 18:46               ` John David Anglin
2012-05-20 18:46                 ` John David Anglin
2012-05-20 20:38                 ` Carlos O'Donell

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='CAP6odjgyK3af7yqHAFTTs38SSNM9H49oWiH=a4byp4MerirE0g@mail.gmail.com' \
    --to=grantgrundler@gmail.com \
    --cc=carlos@systemhalted.org \
    --cc=dave.anglin@bell.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).