stack size limit on ppc/ppc64

Paul Mackerras paulus at samba.org
Wed Nov 5 20:23:18 EST 2003


Alan Modra writes:

> ppc64 stack frames are required to be set up using stdu or stdux (set
> back chain and update sp atomically), so I can't see that it's necessary
> to check all the byte and word insns.

And on ppc32 the ABI says that they are set up with stwu or stwux.
The reason for allowing the other forms is that I was making the
kernel enforce the rule "no accesses allowed between the top of the
heap and the stack pointer" (actually some constant offset below the
stack pointer), where the "stack pointer" is interpreted to mean the
*final* stack pointer value for st*u[x] instructions.  I think it is
more appropriate for the kernel to enforce that rule than for the
kernel to require that programs follow the ELF ABI internally.

Regards,
Paul.

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list