This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH, RFC] MIPS: Implement the getcontext API
- From: David Daney <ddaney at caviumnetworks dot com>
- To: "Maciej W. Rozycki" <macro at codesourcery dot com>
- Cc: Ralf Baechle <ralf at linux-mips dot org>, linux-mips at linux-mips dot org, libc-ports at sourceware dot org, "Maciej W. Rozycki" <macro at linux-mips dot org>
- Date: Tue, 03 Mar 2009 08:56:25 -0800
- Subject: Re: [PATCH, RFC] MIPS: Implement the getcontext API
- References: <alpine.DEB.1.10.0902282326580.4064@tp.orcam.me.uk>
Maciej W. Rozycki wrote:
Hello,
Here is code to implement the getcontext API for MIPS.
[...]
The conclusion is what I am requesting is to get the structure of the
stack frame used by sigreturn(2) fixed in its current form and make sure
the syscall only ever uses data from the ucontext_t structure within. A
new syscall would have to be introduced if the kernel required a change in
the way sigreturn(2) behaves in the future. For the purpose of glibc the
structure of the stack frame is defined in the kernel_rt_sigframe.h header
provided with the patch.
Note the libgcc currently makes the assumption that the layout of the
stack for signal handlers is fixed. The DWARF2 unwinder needs this
information to be able to unwind through signal frames (see
gcc/config/mips/linux-unwind.h), so it is already a de facto part of the
ABI.
When (and if) we move the sigreturn trampoline to a vdso we should be
able to maintain the ABI.
Furthermore I am requesting that the kernel recognises the special
meaning of the value of one stored in the slot designated for the $zero
register and never places such a value itself there.
Seems reasonable to me as currently a zero is unconditionally stored there.
David Daney