GDB backtrace and signal trampolines

Hollis Blanchard hollisb at us.ibm.com
Fri Aug 12 23:58:32 EST 2005


On Aug 12, 2005, at 12:06 AM, Anton Blanchard wrote:
>
>> Would it make sense to limit the test to within a few hundred bytes of
>> the stack pointer? Or some better way to detect that the PC is in a
>> signal trampoline?
>
> With recent kernels we should be able to use the dwarf2 unwind
> information in the vdso I think.

I guess compatibility with older kernels will still need to be 
maintained, though.

I see this note in arch/ppc64/mm/fault.c:
         /*
          * N.B. The POWER/Open ABI allows programs to access up to
          * 288 bytes below the stack pointer.
          * The kernel signal delivery code writes up to about 1.5kB
          * below the stack pointer (r1) before decrementing it.
          * The exec code can write slightly over 640kB to the stack
          * before setting the user r1.  Thus we allow the stack to
          * expand to 1MB without further checks.
          */

So would 2KB be a reasonable limit to the signal frame check, as I 
described before?

-- 
Hollis Blanchard
IBM Linux Technology Center




More information about the Linuxppc64-dev mailing list