• Paul Mackerras's avatar
    powerpc: Increase stack redzone for 64-bit userspace to 512 bytes · 573ebfa6
    Paul Mackerras authored
    The new ELFv2 little-endian ABI increases the stack redzone -- the
    area below the stack pointer that can be used for storing data --
    from 288 bytes to 512 bytes.  This means that we need to allow more
    space on the user stack when delivering a signal to a 64-bit process.
    To make the code a bit clearer, we define new USER_REDZONE_SIZE and
    KERNEL_REDZONE_SIZE symbols in ptrace.h.  For now, we leave the
    kernel redzone size at 288 bytes, since increasing it to 512 bytes
    would increase the size of interrupt stack frames correspondingly.
    Gcc currently only makes use of 288 bytes of redzone even when
    compiling for the new little-endian ABI, and the kernel cannot
    currently be compiled with the new ABI anyway.
    In the future, hopefully gcc will provide an option to control the
    amount of redzone used, and then we could reduce it even more.
    This also changes the code in arch_compat_alloc_user_space() to
    preserve the expanded redzone.  It is not clear why this function would
    ever be used on a 64-bit process, though.
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    CC: <stable@vger.kernel.org> [v3.13]
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
ptrace.h 6.98 KB