[RFC PATCH] powerpc/64/signal: balance return predictor stack in signal trampoline

Nicholas Piggin npiggin at gmail.com
Sat Apr 18 20:44:52 AEST 2020


Excerpts from Alan Modra's message of April 18, 2020 9:40 am:
> On Fri, Apr 17, 2020 at 07:17:47PM +1000, Nicholas Piggin wrote:
>> I don't know much about dwarf, gdb still seems to recognize the signal
>> frame and unwind properly if I break inside a signal handler.
> 
> Yes, the dwarf unwind info still looks good.  The commented out dwarf
> near the end of sigtramp.S should probably go.  At least if you really
> can't take an async signal in the trampoline (a kernel question, not
> anything to do with gcc support of async signals as the comment
> wrongly says).  If you *can* take an async signal at some point past
> the trampoline addi, then delete the comment and uncomment the code.

I don't think the kernel has anything that holds off signals from being 
raised in the tramp area, so it looks like we could get a signal there.

> Note that the advance_loc there bitrotted ever since the nop was added
> before the trampoline, so you'd need to change that to an advance_loc
> that moves from .Lsigrt_start to immediately after the addi, ie. 0x42.

Okay, would you do the honors of fixing it for upstream kernel? I'd just 
be repeating what you wrote without understand it if I write a patch.

Thanks,
Nick


More information about the Linuxppc-dev mailing list