Messages in this thread | | | Subject | Re: [PATCH] Set TIF_IRET in more places | From | Zack Weinberg <> | Date | Tue, 07 Jan 2003 11:27:32 -0800 |
| |
Jamie Lokier <lk@tantalophile.demon.co.uk> writes:
> Zack Weinberg wrote: >> Consider SA_RESTORER - there isn't a guarantee that user space will >> use the same code as the kernel's trampoline. glibc happens to, but >> only because GDB has a hardwired idea of what a signal trampoline >> looks like. Of course, you could simply document that sigreturn() is >> another of the system calls that must be made through int 0x80. > > Glibc must use the same code as the kernel's trampoline because of > MD_FALLBACK_FRAME_STATE_FOR() in GCC's exception handling... (or > libgcc.so must change). > > It explicitly checks for the opcode sequences 0x58b877000000cd80 and > 0xb8ad000000cd80 in order to unwind exception frames around a > handled signal. Ugly, isn't it?
We're open to better ideas ...
>> Tangentially, I've seen people claim that the trampoline ought to be >> able to avoid entering the kernel, although I'm not convinced (how >> does the signal mask get reset, otherwise?) > > Welcome to a wonderful if rather unsightly optimisation: [...]
I would want to be very sure that this was actually a performance win before implementing it, and since it requires data tables in user space I don't see how it could possibly be done in the vsyscall page.
zw - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |