This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, RFC] MIPS: Implement the getcontext API


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]