On Thu, Nov 15, 2007 at 09:46:25AM +0100, Franck Bui-Huu wrote: > Ralf Baechle wrote: > > Another reason is to get rid of the classic trampoline the kernel installs > > on the stack. On some multiprocessor systems it requires a cacheflush > > BTW, could we get rid of the trampoline so easily ? I mean won't we have > to keep it for backward compatibility reasons ? The trampolines are an implementation detail. Little software needs to know about it, so while I expect some slight colateral damage from getting rid of trampolines it's not going to be painful. GDB is the primary piece of software that will need to change. Some of the other architectures have an sa_restorer field in struct sigaction but we don't have that on MIPS. One way to deal with this would be to do a similar as IRIX where the sigaction(2) takes a 4th argument which takes the role of sa_restorer. For backward compatibility an SA_RESTORER field. So if the SA_RESTORER is clear we'd be using a classic trampoline, if it's set the value of the 4th argument. Or slightly crazier, put a kernel address into the $ra register of the invoked signal handler. So the signal handler will cause an address error exception which then can be trapped. Additional advantage - some of the "Don't let your children do this ..." sections of code can go away ;-) Ralf