public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] sigaltstack and ar.bspstore
@ 2003-05-30 14:18 Matt Chapman
  2003-05-30 16:32 ` David Mosberger
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Matt Chapman @ 2003-05-30 14:18 UTC (permalink / raw)
  To: linux-ia64

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-06-23 19:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-30 14:18 [Linux-ia64] sigaltstack and ar.bspstore Matt Chapman
2003-05-30 16:32 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox