Saving to 32 bits of GPRs in signal context

Ulrich Weigand Ulrich.Weigand at de.ibm.com
Tue May 29 23:53:55 EST 2007


Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote on 05/29/2007 
09:24:15 AM:

> Specifically, are everybody using the uc_regs pointer to get to the
> mcontext or are some people likely to expect the mcontext to always be
> at the same offset from the beginning of the signal frame ?

As far as I can see, both GDB and the GCC unwind-from-signal code
always read the uc_regs pointer. (Or the sigcontext.regs pointer for
old-style signal frames.)

> There are a few other issues... one is, the pad fields aren't cleared.
> Thus how can userland or rt_sigreturn differenciate between a valid
> highregs pointers and ramdom junk ? Is there a trick one of you can come
> up with that I could do to let userland/gdb/rt_sigreturn know that
> there's something there ?

One idea we had about this was to use a bit in uc_flags.  Those are
completely unused today, but should always have been initialized to 0.


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

-- 
  Dr. Ulrich Weigand | Phone: +49-7031/16-3727
  GNU compiler/toolchain for Linux on System z and Cell BE
  IBM Deutschland Entwicklung GmbH
  Vorsitzender des Aufsichtsrats: Martin Jetter | Geschäftsführung: 
Herbert Kircher
  Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht 
Stuttgart, HRB 243294
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070529/71b5e7e3/attachment.htm>


More information about the Linuxppc-dev mailing list