From: Matt Chapman <matthewc@cse.unsw.edu.au>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] sigaltstack and ar.bspstore
Date: Fri, 30 May 2003 14:18:39 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590723706086@msgid-missing> (raw)
Currently when using an alternate stack for signal handling, the
trampoline code switches to the new register stack without saving
bspstore. When returning to the original register stack, it calculates
the bspstore as:
bspstore0 = rse_skip_regs(bsp0, -rse_num_regs(bsp1 - (loadrs >> 19), bsp1));
where bsp0 is sc->sc_ar_bsp and bsp1 is the current bsp
Presumably the result should be the same as the original bspstore.
However, it isn't in the case when the original bspstore is pointing to
slot 63 (the RNAT word). The new bspstore comes out pointing to slot 0
of the next group, and the RNAT bits never get written. This happens
more often then you'd expect, since it seems that current
implementations make the optimisation of writing the RNAT word together
with the first word of the new group instead of the last word of the old
group (sensible because it potentially saves a write).
I'd propose that the trampoline code should save bspstore in the
sigcontext structure and restore it from there rather than recalculating
it. I can send a patch, but first is there any reason why it shouldn't
be done that way?
Matt
next reply other threads:[~2003-05-30 14:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-30 14:18 Matt Chapman [this message]
2003-05-30 16:32 ` [Linux-ia64] sigaltstack and ar.bspstore David Mosberger
2003-05-31 1:31 ` Matt Chapman
2003-05-31 3:16 ` David Mosberger
2003-06-21 6:05 ` David Mosberger
2003-06-21 6:58 ` Matt Chapman
2003-06-23 19:16 ` David Mosberger
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=marc-linux-ia64-105590723706086@msgid-missing \
--to=matthewc@cse.unsw.edu.au \
--cc=linux-ia64@vger.kernel.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